Mozilla CTF

by giomke

GitHub Readme.md

Setup

Deploy on Heroku (free ($0/month) dyno)

  1. Click the button below and follow the instructions

Deploy

This is the quickest way to get a running instance! If you have forked this repository, the deploy button will automatically pick up your fork for deployment! As long as you do not perform any DDoS attacks you are free to use any tools or scripts to hack your instance on Heroku!

From Sources

  1. Install node.js
  2. Run git clone https://github.com/mozilla-services/ctf-austin.git (or clone your own fork of the repository)
  3. Go into the cloned folder with cd ctf-austin
  4. Run npm install (only has to be done before first start or when you change the source code)
  5. Run npm start
  6. Browse to http://localhost:3000

Docker Container Docker Automated build Docker Pulls

  1. Install Docker
  2. Run docker pull mozilla/ctf-austin
  3. Run docker run -d -p 3000:3000 mozilla/ctf-austin
  4. Browse to http://localhost:3000 (on macOS and Windows browse to http://192.168.99.100:3000 if you are using docker-machine instead of the native docker installation )

Even easier: Run Docker Container from Docker Toolbox (Kitematic)

  1. Install and launch Docker Toolbox
  2. Search for ctf-austin and click Create to download image and run container
  3. Click on the Open icon next to Web Preview to browse to OWASP Juice Shop

Amazon EC2 Instance

  1. Setup an Amazon Linux AMI instance
  2. In Step 3: Configure Instance Details unfold Advanced Details and copy the script below into User Data
  3. In Step 6: Configure Security Group add a Rule that opens port 80 for HTTP
  4. Launch instance
  5. Browse to your instance's public DNS
#!/bin/bash
yum update -y
yum install -y docker
service docker start
docker pull mozilla-services/ctf-austin
docker run -d -p 80:3000 mozilla-services/ctf-austin

Technically Amazon could view hacking activity on any EC2 instance as an attack on their AWS infrastructure! We highly discourage aggressive scanning or automated brute force attacks! You have been warned!

Vagrant

  1. Install Vagrant and Virtualbox
  2. Run git clone https://github.com/mozilla-services/ctf-austin.git (or clone your own fork of the repository)
  3. Run cd vagrant && vagrant up
  4. Browse to 192.168.33.10

To show the possible impact of XSS, assume you received and (of course) clicked this inconspicuous phishing link and login. Apart from the visual/audible effect, the attacker also installed an input logger to grab credentials! This could easily run on a 3rd party server in real life!

This feature is only available when running a Vagrant box. A recording of the effect is available on Youtube: 📺

Node.js version compatibility

The following versions of node.js are supported, in line as close as possible with the official node.js LTS schedule. Docker images and packaged distributions are offered accordingly:

node.js Docker image Packaged distributions 6.x latest (current official release), snapshot (preview from develop branch) ctf-austin-<version>_node6_windows_x64.zip, ctf-austin-<version>_node6_linux_x64.tgz 8.x ctf-austin-<version>_node8_windows_x64.zip, ctf-austin-<version>_node8_linux_x64.tgz