The NPM package
juice-shop-ctf-cli
lets you create a list of INSERT
statements for the
CTFd database that will populate the platform for a
Capture the Flag
event using
OWASP Juice Shop.
npm install -g juice-shop-ctf-cli
Open a command line and run:
juice-shop-ctf
Then simply follow the instructions of the command line tool:
Populating the CTFd database
Apply the generated insert-ctfd-challenges.sql
following the steps
describing your own CTFd setup.
- Get CTFd with
git clone https://github.com/CTFd/CTFd.git
. - Perform steps 1 and 3 from the CTFd installation instructions.
- Use your favourite SQLite client to connect to the CTFd database and
execute the
INSERT
statements you created. - Browse to your CTFd instance UI (by default http://127.0.0.1:4000) and create an admin user and CTF name
-
Follow steps 2-4 from the CTFd Docker setup to download the source code, create containers and start them.
-
After running
docker-compose up
from previous step, you should be able to browse to your CTFd instance UI (<<docker host IP>>:8000
by default) and create an admin user and CTF name. -
Once you have done this, run
docker-compose down
or useCtrl-C
to shut down CTFd. Note: Unlike a usual Docker container, data will persist even afterwards. -
Add the following section to the
docker-compose.yml
file and then rundocker-compose up
again:ports: - "3306:3306"
-
Use your favourite MySQL client to connect to the CTFd database (default credentials are root with no password) and execute the
INSERT
statements you created. -
Browse back to your CTFd instance UI and check everything has worked correctly.
-
If everything has worked, do another
docker-compose down
, remove the ports section you added todocker-compose.yml
and then dodocker-compose up
again and you are ready to go!
If you need help with the application setup please check the Troubleshooting section below or post your specific problem or question in the official Gitter Chat.
- If using Docker Toolbox on Windows make sure that you also enable port
forwarding for all required ports from Host
127.0.0.1:XXXX
to0.0.0.0:XXXX
for TCP in thedefault
VM's network adapter in VirtualBox. For CTFd you need ports8000
permanantly and3306
during setup.
Found a bug? Got an idea for enhancement? Improvement for cheating prevention?
Feel free to create an issue or post your ideas in the chat! Pull requests are also highly welcome - please refer to CONTRIBUTING.md for details.
PayPal donations via above button go to the OWASP Foundations and are earmarked for "Juice Shop". This is the preferred way to support the project.
Ordered by date of first contribution. Auto-generated on Wed, 01 Feb 2017 20:01:35 GMT.
- Björn Kimminich aka
bkimminich
- Josh Grossman aka
tghosth
This program is free software: you can redistribute it and/or modify it under the terms of the MIT license. OWASP Juice Shop and any contributions are Copyright © by Bjoern Kimminich 2016-2017.