Jump to content
Aerosol

pwntools - CTF toolkit

Recommended Posts

Posted

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

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()

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.

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.).

Most of the functionality of pwntools is self-contained and Python-only. You should be able to get running quickly with

pip install pwntools

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

Download: https://github.com/Gallopsled/pwntools

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...