3 ms·
Does anyone know about something similar on macOS? Environment variables like DYLD_INSERT_LIBRARIES or functions like mach_inject, dl_open and others are automa
by maddieuwu 5y ago
Does anyone know about something similar on macOS? Environment variables like DYLD_INSERT_LIBRARIES or functions like mach_inject, dl_open and others are automatically disabled for processes protected by hardened runtime. I'm wondering if it's possible to inject to process only by exploiting the OS.
- saagarjha 5y agoYou will need to disable SIP (and library validation) to do this, because your code signature will not match the target process's, which is kind of what this is intended to prevent. This is also why you cannot attach a debugger to arbitrary processes when those protections are engaged. But once you turn that off, there's a lot you can do, here's one of my projects that might give you an idea of one way to do this: https://gist.github.com/a70d44951cb72f82efee3317d80ac07f https://gist.github.com/a70d44951cb72f82efee3317d80ac07f
- maddieuwu 5y agoI think that disabling SIP can break some programs and it's hard to do for a normal user right? I'm curious how anti-malware software is doing this, because it's doing a lot of fancy stuff, maybe I should look into it by reverse engineering one of them. Thanks for the link I'll definitely check it out.