This repository contains the Kali Linux build for Capture the Flag.
docker volume create kali-ctf >nul 2>&1 & docker exec -ti ctf "/bin/zsh" 2>nul || docker start ctf >nul 2>&1 && docker attach ctf 2>nul || docker run --privileged -ti --name ctf -v kali-ctf:/var/lib/zerotier/ -p 10122:10122 ghcr.io/niapollab/kali-ctf:master "/bin/zsh"
docker build --pull --tag kali-ctf .
docker volume create kali-ctf
If you want to use GUI application inside docker container install Alpine before:
-
Install Alpine from Microsoft Store or:
winget install --disable-interactivity alpine
-
Run Alpine.exe
-
Open DockerDesktop.exe. Goto
Settings -> Resources -> WSL Integration
, turn on Alpine support and clickApply & restart
.
docker create --privileged -ti --name ctf -v kali-ctf:/var/lib/zerotier/ -p 10122:10122 --mount "type=bind,src=\\wsl.localhost\Alpine\mnt\wslg,dst=/tmp" kali-ctf "/bin/zsh"
docker create --privileged -ti --name ctf -v kali-ctf:/var/lib/zerotier/ -p 10122:10122 kali-ctf "/bin/zsh"
If you want to use your own local network through ZeroTier register identity. It's need for saving identity context through docker containers:
mkdir -p /var/lib/zerotier && zerotier-one -i generate /var/lib/zerotier/identity.secret /var/lib/zerotier/identity.public && chown zerotier-one:zerotier-one /var/lib/zerotier/*
-
Set a custom rights mask for the volume directory:
setfacl -d -m g::rwx /<volume directory>
-
Launch the container with flag
--user :$(id -g)
.
Run ctf.cmd or use command:
docker start ctf & docker attach ctf