Skip to content

Instantly share code, notes, and snippets.

@stong
Last active June 26, 2026 19:12
Show Gist options
  • Select an option

  • Save stong/774f19a39f9d84f4dea25627c305de5e to your computer and use it in GitHub Desktop.

Select an option

Save stong/774f19a39f9d84f4dea25627c305de5e to your computer and use it in GitHub Desktop.
debugging a webshell
#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
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