🎯 Docker-in-Docker CTF is a Capture The Flag challenge that can be deployed using Docker or as a VirtualBox image. Follow the instructions below to set up and start playing!
Complete this CTF on TryHackMe:
- Join the room here.
- Launch the provided machine and start solving the challenge.
- Pull docker-ctf image from Docker-Hub
sudo docker image pull ilolm/docker-ctf
- Then, run the Docker container with the following command:
sudo docker container run -it --rm --privileged --hostname docker-ctf --name docker-ctf -p 8080:8080 -p 22:22 -p 23:23 -p 3306:3306 ilolm/docker-ctf
- After that wait for internal docker compose to be deployed.
Note: If you use -d option(you will not see the docker compose deployment progress)
If you prefer to build the Docker image yourself, follow these steps:
-
Clone the repository:
git clone https://github.com/ilolm/docker-CTF.git cd docker-CTF
-
Build the Docker image:
sudo docker image build -t docker-ctf:latest .
-
Run the Docker container:
sudo docker container run -it --rm --privileged --hostname docker-ctf --name docker-ctf -p 8080:8080 -p 22:22 -p 23:23 -p 3306:3306 docker-ctf
-
After that wait for internal docker compose to be deployed.
Note: If you use -d option(you will not see the docker compose deployment progress)
Alternatively, you can deploy the CTF using a VirtualBox image:
-
Download the VirtualBox image from the releases section.
-
Open VirtualBox, and either create a new VM or import the downloaded OVA file.
-
Set the network adapter to Bridged Adapter mode to ensure the VM can be accessed on the same network as your host machine.
-
Start the VM and note the assigned IP address.
-
Access the CTF challenge via the assigned IP address.
For verifying flags, use the CTF Flag Verification Site. This site is specifically designed to work seamlessly with this CTF challenge.
- 🚫 No Peeking: Do not attempt to access or open the flags during the Docker build process. The real challenge is finding them through gameplay. 💡
- 🎉 Have Fun: This CTF is designed to challenge your skills and knowledge, so enjoy the process and learn as you go!
Happy hacking! 🚀