Admin 479 Report post Posted January 26, 2018 This code will allow you to bypass anti debug protection on apps that have debugging protection. This was not made by me, I found it somewhere in my old files.Here is the Tweak.xm:[hide] #import <substrate.h> #if !defined(PT_DENY_ATTACH) #define PT_DENY_ATTACH 31 #endif //declare orig of ptrace static int (*_ptraceHook)(int request, pid_t pid, caddr_t addr, int data); //implementation of the hook static int $ptraceHook(int request, pid_t pid, caddr_t addr, int data) { if (request == PT_DENY_ATTACH) { //check if the request is PT_DENY_ATTACH request = -1; //invalidate if it is PT_DENY_ATTACH } return _ptraceHook(request,pid,addr,data); //call orig } %ctor { MSHookFunction((void *)MSFindSymbol(NULL,"_ptrace"), (void *)$ptraceHook, (void **)&_ptraceHook); } 1 Ezi reacted to this Quote Share this post Link to post Share on other sites
preditor1000 0 Report post Posted January 26, 2018 Damn man, dope stuff right there! Quote Share this post Link to post Share on other sites
Fr0sTy7u7 0 Report post Posted January 26, 2018 I can code too hehehehehehehehheehhe jk I cannot code anyting im su smert yey Quote Share this post Link to post Share on other sites
Ezi 768 Report post Posted May 2, 2018 What is that Quote Share this post Link to post Share on other sites
AnonymousX 2 Report post Posted December 6, 2018 I would recommend adding syscall also. Changes are as follows #import #if !defined(PT_DENY_ATTACH)#define PT_DENY_ATTACH 31#endif #if !defined(sys_ptrace_request)#define sys_ptrace_request 26#endif static int (*_ptraceHook)(int request, pid_t pid, caddr_t addr, int data);static int (*_syscall)(long request, long pid, long addr, long data); static int $ptraceHook(int request, pid_t pid, caddr_t addr, int data) { if (request == PT_DENY_ATTACH) { request = -1; } return _ptraceHook(request,pid,addr,data);} static int $syscall(long request, long pid, long addr, long data) { if (request == sys_ptrace_request) { return 0; } return _syscall(request,pid,addr,data);} %ctor { MSHookFunction((void *)MSFindSymbol(NULL,"_ptrace"), (void *)$ptraceHook, (void **)&_ptraceHook); MSHookFunction((void *)MSFindSymbol(NULL,"_syscall"),(void *)$syscall,(void **)&_syscall);} 1 1 Tchl and Zeus31 reacted to this Quote Share this post Link to post Share on other sites