How to prevent another process to debug syscall with ptrace

跟風遠走 提交于 2020-06-17 15:54:42

问题


In ptrace I can debug another process to print all the syscall numver that the remote process call.l , with this steps.

  1. Attach to process with PTRACE_ATTACH.
  2. waitpid (with `__WALL flags) to be sure the remote process has been stopped.
  3. In while (cond) print on register that store the syscall number with PTRACE_PEEKUSER

How the remote process can prevent that ?is there any signal that it can to register and print "stop debug me!!"??

PTRACE_ATTACH send SIGSTOP for remote process,but process can't handle that. And PTRACE_PEEKUSER do not send any signal to remote process.

来源:https://stackoverflow.com/questions/61667231/how-to-prevent-another-process-to-debug-syscall-with-ptrace

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!