pwntools README

The project's README from github.com/Gallopsled/pwntools. As one markdown file: README.md.

pwntools - CTF toolkit

pwntools logo

PyPI Docs GitHub Workflow Status (dev) Coveralls MIT License Packaging status Discord Twitter

Pwntools is a CTF framework and exploit development library. Written in Python, it is designed for rapid prototyping and development, and intended to make exploit writing as simple as possible.

from pwn import *
context(arch = 'i386', os = 'linux')

r = remote('exploitme.example.com', 31337)
# EXPLOIT CODE GOES HERE
r.send(asm(shellcraft.sh()))
r.interactive()

Documentation

Our documentation is available at docs.pwntools.com

A series of tutorials is also available online

To get you started, we've provided some example solutions for past CTF challenges in our write-ups repository.

Installation

Pwntools is best supported on 64-bit Ubuntu LTS releases (22.04 and 24.04). Most functionality should work on any Posix-like distribution (Debian, Arch, FreeBSD, OSX, etc.).

Pwntools supports Python 3.10+ since version 5.0.0. Use Pwntools 4.x for older versions as well as Python 2.7. Most of the functionality of pwntools is self-contained and Python-only. You should be able to get running quickly with

sudo apt-get update
sudo 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

However, some of the features (assembling/disassembling foreign architectures) require non-Python dependencies. For more information, see the complete installation instructions here.

Contribution

See CONTRIBUTING.md

Contact and Community

If you have any questions not worthy of a bug report, join the Discord server at https://discord.gg/96VA2zvjCB

pwntools (Gallopsled/pwntools)

Searching Database…

13.8K ·GitHub
这是做什么的?Pwntools 是一个用 Python 编写的 CTF 框架和漏洞利用开发库,专为快速原型开发而设计,目标是让编写漏洞利用代码尽可能简单。
它是我导入自己脚本里的 Python 库,还是一个独立工具?它是一个导入到你的漏洞利用脚本中的 Python 库——大部分功能都是自包含的纯 Python 实现。
我需要哪个 Python 版本?当前的 5.x 版本需要 Python 3.10 或更高;如果是更旧的解释器,包括 Python 2.7,请改用 4.x 分支。
执行 'pip install' 之后所有功能都能直接用吗?基本可以——pip 能覆盖大部分功能,但要对其他 CPU 架构的代码进行汇编和反汇编,还需要额外安装一些非 Python 的依赖。
我不是打 CTF 的,用它还有价值吗?它面向 CTF 选手和漏洞利用开发者——任何需要快速写出可用漏洞利用代码的人都适用,无论是现场比赛还是练习靶场。
我用的不是 Ubuntu,能跑吗?可以——Ubuntu LTS(64 位,22.04 或 24.04)只是支持最好的目标平台;大部分功能在任何类 POSIX 的系统上都能用,比如 Debian、Arch、FreeBSD 或 macOS。
装好之后该从哪里入手?先看 docs.pwntools.com 上的文档和在线教程系列;write-ups 仓库里有以往 CTF 题目的完整示例解答。
pwntools 还在积极维护吗?是的——它从 2013 年开发至今,在 GitHub 上大约有 13.7k star,仓库还配有 CI 工作流,用于更新变更日志、代码检查和 Docker 构建。
写 shellcode 和 ROP 时它能帮到我什么?两者都是一等公民:rop 和 shellcode 开发是项目官方列出的主题之一,而且这个库能对其他 CPU 架构的代码进行汇编和反汇编——这正是经典二进制漏洞利用的核心。
Creator
Gallopsled
Size
28.3 MB
Stars
13.8K
Age
13y
Commits · 90 Days