I previously built a ctfd platform and now I'm trying to install GZCTF to see the differences between the two. According to the official documentation, it is recommended to deploy GZCTF using the docker + K8s separation deployment method.
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 the GZCTF platform#
Install it on the machine with docker installed, with the IP address: 192.168.31.254
Wait for a moment, 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 challenge as an example:
ctftraining/qwb_2019_supersqli:latest
Click on "Management" on the left side.
After entering, click on "Create 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 you will see the following page:
Pay attention to the container image. Create a test container by filling in the docker image address, and click on "Create Test Container" as shown below:
Enable the challenge.
Next, to access the challenge, you need to create a team and add the corresponding members to the team.
In the "Information Audit" section, you can enable team registration without audit. This means that if a team wants to register, it needs to be approved by an administrator. Otherwise, joining a team requires the approval of the team manager. People who are not in a team cannot access the challenges.
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 does not have the "no audit" option enabled, 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:
The provided ws connection is because the TCP over WebSocket 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