Skip to content

Docker tools for CTF pwning πŸ‘©πŸ»β€πŸ’»πŸ‘¨πŸ»β€πŸ’»πŸš©

License

Notifications You must be signed in to change notification settings

nankeen/pwndocker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

82 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Pwndocker

A Docker environment for CTF pwning based on a modified Ubuntu 20.04 phusion/baseimage:master-amd64.

Forked from skysider/pwndocker.

Screenshot

Usage

$ docker run --rm -v "$PWD":/ctf/work \
  --cap-add=SYS_PTRACE -it pwndocker:latest

Included software

  • pwntools β€”β€” CTF framework and exploit development library
  • pwndbg β€”β€” A GDB plug-in that makes debugging with GDB suck less, with a focus on features needed by low-level software developers, hardware hackers, reverse-engineers and exploit developers
  • pwngdb β€”β€” GDB for pwn
  • ROPgadget β€”β€” Facilitate ROP exploitation tool
  • roputils β€”β€” A Return-oriented Programming toolkit
  • one_gadget β€”β€” A searching one-gadget of execve('/bin/sh', NULL, NULL) tool for amd64 and i386
  • z3 β€”β€” The Z3 Theorem Prover
  • angr β€”β€” A platform-agnostic binary analysis framework
  • radare2 β€”β€” A rewrite from scratch of radare in order to provide a set of libraries and tools to work with binary files
  • seccomp-tools β€”β€” Provide powerful tools for seccomp analysis
  • tmux β€”β€” A terminal multiplexer
  • ltrace β€”β€” Trace library function call
  • strace β€”β€” Trace system call
  • qemu β€”β€” A generic and open source machine emulator and virtualizer

Included glibc

Default compiled glibc path is /glibc.

  • 2.19 β€”β€” Ubuntu 12.04 default libc version
  • 2.23 β€”β€” Ubuntu 16.04 default libc version
  • 2.24 β€”β€” Introduce vtable check in file struct
  • 2.27 β€”β€” Pwndocker default glibc version
  • 2.28~2.31 β€”β€” Latest libc versions

Running custom libc versions

ld.so files for each libc version can be found in their respective folders under /glibc/<version>/<arch>/lib/ld-<version>.so.

$ cp /glibc/2.27/64/lib/ld-2.27.so /tmp/ld-2.27.so
$ patchelf --set-interpreter /tmp/ld-2.27.so ./test
$ LD_PRELOAD=./libc.so.6 ./test

or

from pwn import *
p = process(["/path/to/ld.so", "./test"], env={"LD_PRELOAD":"/path/to/libc.so.6"})

About

Docker tools for CTF pwning πŸ‘©πŸ»β€πŸ’»πŸ‘¨πŸ»β€πŸ’»πŸš©

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published