PointerSearcher-X
PointerSearcher-X copied to clipboard
Cannot inject process on macOS 13.4.1 on M1 device
Hello, I've been using this inject tool for a long time without any problem. https://github.com/LIJI32/MIP Recently I found that it cannot inject processes successfully on macOS 13.4 on M1 device, which would cause target processes to crash immediately. Then I came across your inject tool, but it also failed to inject and print this error: Error: Other("invalid file") Could you please take a look at this problem? Or would you like to contribute any fix to the MIP code? Thanks!
Can you make sure your file is an aarch64 dylib, and that the target process is also aarch64?
Yes. I inject a demo dylib into the Finder process, which is arm64e. I also cannot inject into other arm64 processes. SIP is disabled on my system. The inject tool is code-signed with proper entitlements and run as root user.
I can launch the target process manually to load my dylib using the DYLD_INSERT_LIBRARIES environment variable, but I also need to inject running processes.
#include <stdlib.h>
void install(void) __attribute__((constructor));
void install()
{
system("sh -c 'open -a Calculator'");
}
build clang -shared main.c -o libhello.dylib
Can you try this code?