PWN环境搭建
0x1.安装虚拟机
- 安装ubuntu链接:清华大学开源软件镜像站
0x2.更换国内软件源
- 将除partner源的其他全删掉
nano /etc/apt/sources.list
- 将清华源复制粘贴,然后保存文件
0x3.安装工具
安装完成后,将pwngdb中的插件修改为pwndbg
vim .gdbinit
将其前面修改为
source ~/pwndbg/gdbinit.py
source ~/Pwngdb/pwngdb.py
source ~/Pwngdb/angelheap/gdbinit.py
输入 :wq 保存退出
-
安装pwntools
安装依赖库:
git clone https://github.com/aquynh/capstone
cd capstone
make
make install
python3:
apt-get update
apt-get install python3 python3-pip python3-dev git libssl-dev libffi-dev build-essential
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade pwntools
python2:
apt-get update
apt-get install python python-pip python-dev git libssl-dev libffi-dev build-essential
python2 -m pip install --upgrade pip==20.3.4
python2 -m pip install --upgrade pwntools
- 安装ROPgadgets或者ropper
ROPgadgets:
sudo apt-get install python-capstone
git clone https://github.com/JonathanSalwan/ROPgadget.git
cd ROPgadget
sudo python setup.py install
ropper:
sudo pip3 install filebytes==0.9.18
git clone https://github.com/sashs/Ropper.git
cd Ropper
sudo python3 setup.py install
- 安装one_gadget
sudo apt -y install ruby
sudo gem install one_gadget
标签:git,环境,apt,dev,install,pip,python3,搭建
From: https://www.cnblogs.com/Starry-blog/p/16798810.html