Skip to content

Docker environment for Pwn in CTF! Fuck the environment setup that's why this repo is created.

License

Notifications You must be signed in to change notification settings

BuptMerak/NoPwnDocker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NoPwnDocker

ENGLISH | 中文

license

Beautiful and powerful terminal Docker environment for Pwn in CTF! Fuck the environment setup that's why this repo created.

I created this just for myself. It is my very first time making an image.

If you wish, you can modify it on your own, or open an issue to suggest how should I improve it. (Or simply open a PR!)

Included

  • zsh
  • oh-my-zsh
  • starship
  • pwntools —— CTF framework and exploit development library
  • gef
  • 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
  • angr —— A platform-agnostic binary analysis framework
  • seccomp-tools —— Provide powerful tools for seccomp analysis
  • tmux —— a terminal multiplexer
  • ltrace —— trace library function call
  • strace —— trace system call

How to use?

Easiest Way

git clone https://github.com/Nova-Noir/NoPwnDocker
cd NoPwnDocker
sudo docker compose up -d
sudo docker exec -it ub18 /bin/zsh

Recommended Way

git clone https://github.com/Nova-Noir/NoPwnDocker
cd NoPwnDocker
export ctf_name="<FOLDER_NAME>"
docker build . -t nopwndocker:ubuntu18.04
docker run  -it \
            -h ${ctf_name} \
            --name ${ctf_name} \
            -v $(pwd)/${ctf_name}:/ctf/ \
            --cap-add=SYS_PTRACE \
            nopwndocker:ubuntu18.04

Configuration

There's not much can be modified. But you do can change something.

  • open Dockerfile, you can change the version and proxy.
  • open docker-compose.yml, you can change the container name.
  • modify starship.toml to use your own starship style.
  • modify .gdbinit to use your own gdbinit config.

Usage or features

gdb

init-gefinit-pwndbg to load different gdb plugin.

zsh

zsh-syntax-highlighting and zsh-autosuggestions plugins

build_glibc

A shell file to build glibc source with debug in one command. bash ~/build_glibc.sh -h

There could be some bug when building older version of glibc. Check below to see the solution. (at least for me)

`loc1@GLIBC_2.2.5' can't be versioned to common symbol 'loc1'

see https://patchwork.ozlabs.org/project/glibc/patch/20170623161158.GA5384@gmail.com/

Update frequency

Maybe never. Or once I come up with some useful utilities in Pwn.

Update Log

2023/03/23

🔥 Remove build_glibc32.sh and build_glibc64.sh, add build_glibc.sh for general usage. :fire: Remove built-in glibc to reduce the docker size and build time.

About

Docker environment for Pwn in CTF! Fuck the environment setup that's why this repo is created.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 50.2%
  • Shell 44.5%
  • GDB 5.3%