OWASP Juice Shop CTF


The NPM package juice-shop-ctf-cli
published from this repository 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.

Installation
npm i -g juice-shop-ctf-cli
Usage
Open a command line and run:
juice-shop-ctf
Then simply follow the instructions of the command line tool. Finally, apply the generated insert-ctfd-challenges.sql
following the steps described in the next section.
Setting up CTFd and populating its database
-
Setup Docker host and Docker compose.
-
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 use Ctrl-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 run docker-compose up
again:
ports:
- "3306:3306"
-
You can then use your favourite MySQL client to connect to the CTFd database (default credentials are root with no password) and run the INSERT
statement you created.
-
When that is done, 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 to docker-compose.yml
and then do docker-compose up
again and you are ready to go!
Alternative approach without node.js
- Download the
GenerateCTFdInserts.html file.
- Open that file in your local browser and follow the instructions
inside.
Troubleshooting 
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
to
0.0.0.0:XXXX
for TCP in the default
VM's network adapter in
VirtualBox. For CTFd you need ports 8000
permanantly and 3306
during setup.
Contributing

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.
Donations
PayPal 
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.
Others


Contributors
Ordered by date of first contribution.
Auto-generated on Wed, 01 Feb
2017 20:01:35 GMT.
Licensing 
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.
