pwn.college - Docker Setup
On Host Machine
-
Download sample Dockerfile
-
Build Custom Docker Image
docker image prune -f && docker build -t pwncollege_custom:v1 .
docker image prune -fforcefully removes unused images [optional]-tgives image a tag in 'name:tag' format.specifies location of Dockerfile is in current working directory
- Run Docker Container
docker image prune -f && docker run -it --rm --name pwncollege_challenges pwncollege_custom:v1 /bin/bash
docker image prune -fforcefully removes unused images [optional]-itkeeps STDIN open even if not attached and allocates pseudo-TTY--rmautomatically removes container when it exits--name pwncollege_challengesassigns name to containerpwncollege_custom:v1custom Docker image from step 1 above/bin/bashcommand run by container
- [optional] Connect to Running Container (from another terminal)
docker exec -it pwncollege_challenges /bin/bash
In Docker Container
- Copy ELF binary, then set privileges and setuid
sudo cp /challenges/<module_dir>/<elf_binary> / && sudo chmod 4755 /<elf_binary>