gdb를 사용하는데 gef나 peda를 나눠서 사용하고 싶을 때 유용한 방법을 정리한다.
git clone https://github.com/pwndbg/pwndbg cd pwndbg ./setup.sh cd .. mv pwndbg ~/pwndbg-src echo "source ~/pwndbg-src/gdbinit.py" > ~/.gdbinit_pwndbg
git clone https://github.com/longld/peda.git ~/peda
wget -q -O ~/.gdbinit-gef.py https://github.com/hugsy/gef/raw/master/gef.py echo source ~/.gdbinit-gef.py >> ~/.gdbinit
define init-peda
source ~/peda/peda.py
end
document init-peda
Initializes the PEDA (Python Exploit Development Assistant for GDB) framework
end
define init-pwndbg
source ~/.gdbinit_pwndbg
end
document init-pwndbg
Initializes PwnDBG
end
define init-gef
source ~/.gdbinit-gef.py
end
document init-gef
Initializes GEF (GDB Enhanced Features)
end
#!/bin/sh
exec gdb -q -ex init-peda "$@"
#!/bin/sh
exec gdb -q -ex init-pwndbg "$@"
#!/bin/sh
exec gdb -q -ex init-gef "$@"
root@kali:~#chmod +x /usr/bin/gdb-*
root@kali:~# gdb-peda
gdb-peda$
https://medium.com/bugbountywriteup/pwndbg-gef-peda-one-for-all-and-all-for-one-714d71bf36b8