CTF-All-In-One/doc/2.7_pwntools.md
2017-08-18 20:51:19 +08:00

46 lines
979 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 2.6 Pwntools
* [安装](#安装)
* [使用pwntools](#使用pwntools)
pwntools是一个CTF框架和漏洞利用开发库用Python开发由rapid设计旨在让使用者简单快速的编写exp脚本。包含了本地执行、远程连接读写、shellcode生成、ROP链的构建、ELF解析、符号泄露众多强大功能。
## 安装
1. 安装binutils
```shell
git clone https://github.com/Gallopsled/pwntools-binutils
sudo apt-get install software-properties-common
sudo apt-add-repository ppa:pwntools/binutils
sudo apt-get update
sudo apt-get install binutils-arm-linux-gnu
```
2. 安装capstone
```shell
git clone https://github.com/aquynh/capstone
cd capstone
make
sudo make install
```
3. 安装pwntools:
```shell
sudo apt-get install libssl-dev
sudo pip install pwntools
```
测试安装是否成功:
```python
>>> import pwn
>>> pwn.asm("xor eax,eax")
'1\xc0'
```
## 使用pwntools