操作系统
优选Ubuntu 16, 因为在heap应用的时候要用libc版本是2.23,新Ubuntu是2.27, 无法利用成功。
环境安装
我写了一个小sh脚本,直接跑,能够装pwndbg, pwntools和onegadget,基本够用了。
#!/bin/bash
sudo apt-get -y install git
git clone https://github.com/pwndbg/pwndbg
cd pwndbg
./setup.sh
echo "source ~/pwndbg/pwndbg.py">> ~/.gdbinit
echo "DONE! debug your program with gdb and enjoy"
sudo apt-get -y install libc6-dev
echo "Successfully installed libc6-dev"
echo "Install pwntools"
sudo apt-get -y install python-pip
sudo apt-get -y install python-dev
python -m pip install setuptools
sudo pip install pwn
echo "Install OneGadget"
sudo apt -y install ruby
sudo gem install one_gadget