参考文档:https://github.com/leungbless/pwnVM-ovf
0x00 环境
- 操作系统:Ubuntu 16.04
0x01 更换源
- cd ~ && mkdir .pip
- cd ~/.pip && touch pip.conf
- sudo gedit pip.conf
然后写入以下内容:
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=mirrors.aliyun.com
- sudo apt-get update
- sudo apt-get upgrade
0x02 安装 git,gdb 和 gdb-multiarch,同时安装 binfmt 用来识别文件类型
- sudo apt-get update
- sudo apt-get install git gdb gdb-multiarch
- sudo apt-get install "binfmt*"
0x03 安装gdb的插件pwndbg
- git clone https://github.com/pwndbg/pwndbg
- cd pwndbg
- ./setup.sh
0x04 安装PwnTools
- sudo apt-get install python2.7 python-pip python-dev git libssl-dev libffi-dev build-essential
- pip install -U setuptools
- pip install --upgrade pip
- pip install --upgrade pwntools
这里如果出现报错,尝试: - wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
- python get-pip.py
- pip install --upgrade pwntools
0X05 安装ssh
- sudo apt-get install ssh
0x06 安装ROPgadget工具
- pip install ropgadget
0x07 安装qemu
- sudo apt-get install qemu-user
0x08 安装LibcSearcher(用处: 用来泄露libc库中函数的偏移的库)
- git clone https://github.com.cnpmjs.org/lieanu/LibcSearcher.git
- cd LibcSearcher
- sudo python setup.py develop
0x09 安装32位程序依赖的环境
- sudo dpkg --add-architecture i386
- sudo apt-get -y install lib32z1 lib32ncurses5