Install gdb
sudo apt install -y gdb
Install peda / Pwngdb
https://github.com/longld/peda
https://github.com/scwuaptx/Pwngdb
cd ~
git clone https://github.com/longld/peda.git
git clone https://github.com/scwuaptx/Pwngdb.git
cp ~/Pwngdb/.gdbinit ~/
$ cat ~/.gdbinit
source ~/peda/peda.py
source ~/Pwngdb/pwngdb.py
source ~/Pwngdb/angelheap/gdbinit.py
define hook-run
python
import angelheap
angelheap.init_angelheap()
end
end
Install pwndbg
https://github.com/pwndbg/pwndbg
cd ~
git clone https://github.com/pwndbg/pwndbg.git
cd pwndbg
./setup.sh
$ cat ~/.gdbinit
source /home/h0meb0dy/pwndbg/gdbinit.py
Install gef
https://github.com/hugsy/gef
cd ~
sudo apt install -y curl binutils
bash -c "$(curl -fsSL https://gef.blah.cat/sh)"
$ cat ~/.gdbinit
source ~/.gef-8f0f4443bd01f82ec9f4151600ff226318467439.py
Set gdbinit
# peda
# source ~/peda/peda.py
# source ~/Pwngdb/pwngdb.py
# source ~/Pwngdb/angelheap/gdbinit.py
# define hook-run
# python
# import angelheap
# angelheap.init_angelheap()
# end
# end
# pwndbg
# source ~/pwndbg/gdbinit.py
# gef
source ~/.gef-8f0f4443bd01f82ec9f4151600ff226318467439.py
References