GDB-attach-pid没有权限解决方法
2018/11/09

gab调试时遇到

pwndbg> attach 15790
Attaching to process 15790
Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
warning: process 15790 is a zombie - the process has already terminated
ptrace: 不允许的操作.

解决方法:

➜  ~ sudo vi /etc/sysctl.d/10-ptrace.conf

kernel.yama.ptrace_scope = 1

改为

kernel.yama.ptrace_scope = 0

重启即可

请杯咖啡呗~
支付宝
微信
本文作者:ios
版权声明:本文首发于ios的博客,转载请注明出处!