Last active
June 29, 2022 23:19
-
-
Save timb-machine/6177721c3eafba3e95abdf112b2a5902 to your computer and use it in GitHub Desktop.
Stealing a PID PoC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ nc -v -l -p 5000 & ps -aef | grep nc; sudo gdb /bin/nc `pgrep nc` | |
timb 3976 952 0 00:22 pts/0 00:00:00 nc -v -l -p 5000 | |
[1] 3976 | |
listening on [any] 5000 ... | |
(gdb) info variable environ | |
All variables matching regular expression "environ": | |
(gdb) print execve("/bin/bash", 0x00007f717f158118, 0) | |
process 3976 is executing new program: /bin/bash | |
$ ps -aef | grep timb | |
timb 3976 952 0 00:22 pts/0 00:00:00 ?.#.?. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment