The goal of this project is for users to be able to learn cyber security in hackthebox like environment. This project is divided into 5 main parts.
- Frontend: Here, users will be be interacting with a terminal to try to solve a puzzle. We also plan to have interactions with a llm here to assist in learning. For this, we plan to use a react js app with the react-terminal package.
- Vulnerable machines: These will be randomly generated vulnerable docker images. One goal we have is to make the game similar to a rogue like so we will want to randomly generate these images. However, if every user will be able to randomly spin up a dockerfile in the backend, that will be a scalability nightmare. So the current plan is to have 4 randomly generated dockerfiles which will rotate every day or so. That way there will be no need to spin up new images.
- Backend: The main task of the backend is connect the frontend to the ssh logs of the vulnerable machine and also connect the llm with the frontend.
- LLM: This LLM will be inspired by pentest gpt and will be the main part I will be working on. My goal is to have a minimal "teacher" model which can help with pentesting while not providing answers and not hallucinating.
- Attacker machine: These will be an attacker machine to attack vulnerable containers
As the project becomes more complicated, I suspect we will need to include celery and redis for scalability but for now this should do. I also added a postgres dataset in docker-compose just for future use. THe main idea for the dataset is used to correct user commands for future improvement
git clone https://github.com/isamu-isozaki/gamified-cybersecurity-frontend.git frontend
git clone https://github.com/isamu-isozaki/gamified-cybersecurity-backend.git backend
git clone https://github.com/isamu-isozaki/gamified-cybersecurity-ai-server.git ai-server
To update do
cd frontend
git checkout main
git pull origin main
cd ../backend
git checkout main
git pull origin main
cd ../ai-server
git checkout main
git pull origin main
cd ..
Then, make a .env file in frontend folder with the following contents
REACT_APP_API_URL='http://localhost:10000'
In the backend folder, make a .env file with the following contents
APP_PORT=10000
API_URL="http://localhost:3000"
TEMP_DIR="imgs"
SSH_HOST="localhost"
SSH_USER="root"
SSH_PASS="root"
SSH_PORT=1022
Then, do
docker-compose up
I recommend commenting out the frontend part of docker-compose and just do
cd frontend
yarn
yarn start
and if you are developing backend, you can just do
npm install
npm run dev
To start testing out, you should have with an url localhost:3000. Put in the command ls in there and you should get the terminal output.