Last active
June 26, 2026 19:12
-
-
Save stong/774f19a39f9d84f4dea25627c305de5e to your computer and use it in GitHub Desktop.
debugging a webshell
This file contains hidden or 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
| #alias zit="gzip | base64 | tr -d '\n' && echo" | |
| #cat payload.bin | zit | |
| tar czv payload.bin gdbscript.txt | base64 | tr -d '\n' |pbcopy | |
| #echo 'asdf' | base64 -d | gzip -d > payload.bin | |
| #echo 'fdsa' | base64 -d | gzip -d > gdbscript.txt | |
| echo 'xxxx' | base64 -d | tar xzv; gdb -q ./vuln -x gdbscript.txt |
This file contains hidden or 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
| set confirm off | |
| set sysroot / | |
| set logging file /tmp/gdb.log | |
| set logging on | |
| run < payload.bin | |
| backtrace | |
| info registers | |
| x/8gx $rsp | |
| x/8gx $rip | |
| info proc mappings | |
| info proc stat | |
| info proc status | |
| kill | |
| quit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment