Pwnbox: A Docker Container For Reverse Engineering & Exploitation!

Since I blogged a bit about docker security tools, I thought of continuing the trend and introduce Pwnbox, is an open source docker container that has tools to aid you in reverse engineering and exploitation. It allows you to package up an container with all of the tools of trade you need in a capture-the-flag situation, or elsewhere too!


What is Pwnbox?

We know that, Docker is an open-source project that automates the deployment of applications inside software containers, so that developers and sysadmins can build, ship, and run distributed applications in a short amount of time. Consider you are in a CTF and want a preset number of tools for this particular task and you have forgotten your faithful USB drive containing all your favourite tools elsewhere. What do you do? With pwnbox, you can simply spin up a container with your favourite tools and be one your way to glory!

Tools pwnbox installs:

  • sudo
  • build-essential
  • gcc-multilib
  • g++-multilib
  • gdb
  • gdb-multiarch
  • python-dev
  • python3-dev
  • python-pip
  • python3-pip
  • ipython
  • default-jdk
  • net-tools
  • nasm
  • cmake
  • vim
  • tmux
  • git
  • binwalk
  • strace
  • ltrace
  • autoconf
  • socat
  • netcat
  • nmap
  • wget
  • exiftool
  • squashfs-tools
  • unzip
  • virtualenvwrapper
  • upx-ucl
  • man-db
  • manpages-dev
  • libtool-bin
  • bison
  • libini-config-dev
  • libssl-dev
  • libffi-dev
  • libglib2.0-dev
  • libc6
  • libncurses5
  • libstdc++6
  • libc6-dev-i386
  • binutils

Via python-pip, pwnbox installs the following:

  • pycipher
  • uncompyle
  • ropgadget
  • distorm3
  • filebytes
  • r2pipe
  • python-constraint
  • angr
  • pwntools
  • docopt

It then goes on to install tools like capstone, radare2, ropper, ropme, rp++, retargetable decompiler scripts, villoc, libformatstr, preeny, xortool, tmux-resurrect, libc-database, peda, gef and lastly pwndbg. If you have certain customizations (such as .radare2rc, .bashrc, .vimrc, etc.), they can be stored in the ./rc directory. Ofcourse, you can customize such a list per CTF basis.

The container is designed to be isolated so no directories are mounted from the host. This allows you to have multiple containers hosting files from different CTFs – this is both good and bad, depending on the tools and the environment you need.

Download pwnbox:

More information about getting pwnbox can be found here.