mirror of
https://github.com/nganhkhoa/CTF-All-In-One.git
synced 2024-12-25 11:41:16 +07:00
46 lines
979 B
Markdown
46 lines
979 B
Markdown
# 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
|
||
|