Skip to content

Instantly share code, notes, and snippets.

@marcpalmer
Created October 1, 2017 19:23
Show Gist options
  • Save marcpalmer/5012f5d14529286cfb30f79976b7b273 to your computer and use it in GitHub Desktop.
Save marcpalmer/5012f5d14529286cfb30f79976b7b273 to your computer and use it in GitHub Desktop.
-static void DisableGDB() {
- void *handle = dlopen(0, RTLD_GLOBAL | RTLD_NOW);
- ptrace_ptr_t ptrace_ptr = dlsym(handle, "ptrace");
- ptrace_ptr(PT_DENY_ATTACH, 0, 0, 0);
- dlclose(handle);
-}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment