I previously built a ctfd playground and now I'm trying to install GZCTF to see the differences between the two. The official documentation suggests deploying GZCTF using docker + K8s separation.
Here, I directly use the GZCTF-Auto project for automated deployment. It supports both single docker
and docker+k3s
deployment.
I chose the docker+k3s
deployment method, which requires two Ubuntu machines, one for installing docker and the other for installing k3s.
Both machines are running Ubuntu 20.04.
Installing k3s#
IP: 192.168.31.171
curl -sfL https://rancher-mirror.rancher.cn/k3s/k3s-install.sh | INSTALL_K3S_MIRROR=cn sh -
Installing GZCTF Platform#
Install on the machine with docker installed, with IP address: 192.168.31.254
Wait for a while, the deployment will be successful.
Access http://192.168.31.254:81 and login with your account and password.
Testing the Challenges#
Take this docker playground for testing:
ctftraining/qwb_2019_supersqli:latest
Click on "Management" on the left side.
After entering, click on "New Competition" and fill in the competition title.
After creating, it will look like this:
Click on the icon on the right side to go to the following page:
Click on "Challenge Management" and create a new challenge.
You can choose the type of challenge.
Choose "Dynamic Container" and go to the following page:
Pay attention to the container image. Create a test container, fill in the docker image address, and click "Create Test Container", as shown in the following image:
Enable the challenge.
Next, to access the challenge, you need to create a team and add the respective members.
In the information review section, you can enable team registration without review. This means that registering a team will require administrator approval, otherwise joining will require the administrator's consent. People who are not in a team cannot access the challenge.
Click on "Team Management" to create a team or join a team.
To join a team, you need an invitation code from another team member.
Click on "Create Team".
After creating, you can generate an invitation code.
Go back to the homepage and you can sign up for the competition.
If the above problem occurs, it means that the competition has not enabled the review exemption, and the administrator needs to review it.
Log in again with the test account, and now you can enter the competition.
After entering the competition and creating a container, you will see the following image:
The provided ws connection is because the tcp over ws proxy mode is enabled.
To access it, you need to download the WebSocketReflectorX client.
After installation, open it and enter the ws connection address.
It will provide the challenge's IP and port.
Then access the challenge using this link: http://127.0.0.1:64143/
Language Switching#
References#
Cover image from:
https://wallhaven.cc/w/kx5v57