jm33-m0 / emp3r0r

Linux/Windows post-exploitation framework made by linux user
https://infosec.exchange/@jm33
MIT License
1.26k stars 232 forks source link

Injector: syscall.Ptrace*: no such process #13

Closed jm33-m0 closed 3 years ago

jm33-m0 commented 3 years ago

This seems to be an issue with golang itself. When the tracee is not our child process, and/or ptrace attribute is not set to true, we lose control to the tracee immediately.

The reason: PtraceAttach and PtraceGetRegs are from different processes/threads

image

jm33-m0 commented 3 years ago

https://github.com/golang/go/issues/7699

jm33-m0 commented 3 years ago

https://github.com/golang/go/issues/43685 fixed with https://github.com/jm33-m0/emp3r0r/commit/464e15153863140b6ab656f1c74e8136092e79a3