Re:The Ptrace Anti-Re Trick
by ysfr on Monday August 28, 2023 @08:33AM
(#37293014)
Yes. Or if it's using dynamic libraries and not compiled static, you can use LD_PRELOAD and overwrite ptrace() to do nothing. You don't have to patch anything then, which might be easier.
And compile it:
Afterwards you can eiher
or for gdb
[ Parent
| on HN ]
Thanks, both! This was used in a static build that decrypted and checksummed its binary before execution, which ruled out naive implementations of the attacks above. I agree there are ways round these too, but I believe it was just intended to discourage amateurs rather than protect against serious hacking.