Skip to content

Latest commit

 

History

History
98 lines (71 loc) · 3.22 KB

README.md

File metadata and controls

98 lines (71 loc) · 3.22 KB

pwntools - CTF toolkit

Docs latest Docs 2.1.3 PyPI Gittip Travis

This is the CTF framework used by Gallopsled in every CTF.

Most code is inside the pwnlib folder with some functionality inside pwn or bin. It is typically used as:

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

# EXPLOIT HERE

However we have made command-line frontends for some of the functionality in pwnlib. These are:

  • asm/disasm: Small wrapper for various assemblers.
  • constgrep: Tool for finding constants defined in header files.
  • cyclic: De Bruijn sequence generator and lookup tool.
  • hex/unhex: Command line tools for doing common hexing/unhexing operations.
  • shellcraft: Frontend to our shellcode.
  • phd: Replacement for hexdump with colors.

Documentation

Our documentation is available at http://docs.pwntools.com

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 Ubuntu 12.04 and 14.04, but most functionality should work on any Posix-like distribution (Debian, Arch, FreeBSD, OSX, etc.).

Prerequisites

In order to get the most out of pwntools, you should have the following system libraries installed.

Released Version

Pwntools is available as a pip packag for easy installation.

apt-get install python2.7 python2.7-dev python-pip
pip install pwntools

Latest Version

You can also use the version from github.

git clone https://github.com/Gallopsled/pwntools
cd pwntools
python setup.py install

Contribution

If you'd like to hack on pwntools, this is how we set things up:

git clone https://github.com/Gallopsled/pwntools
PWN=$(realpath pwntools)
cd $PWN
pip2 install -r requirements.txt
export PATH="$PWN/bin:$PATH"
export PYTHONPATH="$PWN:$PYTHONPATH"

If you want to make these settings permanent:

>>~/.bashrc cat <<EOF
# Set up path for Pwntools
export PATH="$PWN/bin:\$PATH"
export PYTHONPATH="$PWN:\$PYTHONPATH"
EOF

Contact

If you have any questions not worthy of a bug report, feel free to join us at #gallopsled on Freenode and ask away. Click here to connect.