Skip to content
This repository has been archived by the owner on Sep 22, 2020. It is now read-only.

redpwn/rDeploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rDeploy is deprecated. Use rCDS instead.

RedpwnCTF Deployment

RedpwnCTF's automated deployment solution

Problem Files

RedpwnCTF uses standardized YAML "challenge definition files" to specify deployment instructions to the automated deployment software. Also, the information stored in the file is generally useful information that the organizers use to put the challenges on CTFd.

The problem directory should be cloned into data and specified in config/config.json.

The directory structure should look as so, which is how the current redpwnCTF challenge directories are setup.

root /
  pwn /
    chall1 / 
    chall2 /
    chall3 /
  web /
    chall1 /
    chall2 /
  crypto /
    ...
  ...

Configuration

## CHALLENGE CONFIGURATION

# the name of the challenge
name: Example Challenge

# Use one of the two to specify a flag
flag: flag{example_flag} # Hard coded flag in config
flag_file: ./flag.txt # Reference a flag file. This file should only contain the flag. This is preferable to prevent desync when accidently changing flag in one place.

# the estimated point value
value: 500 # Unless you have a good reason, don't change it from 500

# the challenge author, comma separated if multiple
author: Author 1, Author 2

# challenge description in markdown

# Templating Options
# {{host}} and {{port}} will be replaced by script
# {{url}} will be equivilant to http://{{host}}:{{port}} and can be used for convenience

description: "think you know pwn? you're wrong\n\ntry your luck and rop to the top!\n\nCommand: netcat {{host}} {{port}}" 


# this tells the script what to allow the user to access, referenced as a relative path from the root of the problem directory
provide:
- ./bin/roptotop
- ./Dockerfile

# Deployment is done entirely through docker
# If a ./docker-compose.yml file exists, the docker-compose file will be used. In this case, you should bind to the external port ${PORT}
# For example, in *docker-compose.yml*
# problem:
#   build: .
#   ports: 
#     - ${PORT}:80

# If a ./docker-compose.yml file does not exist, a ./Dockerfile must exist for deployment and will be used instead. 
# If neither a ./docker-compose.yml file nor a ./Dockerfile exists, your challenge will be assumed entirely static and nothing will be run.

# this is the port that your application will listen on within the Docker container (will be forwarded)
# You only need to specify it if you have a ./Dockerfile (no need if you have docker-compose.yml)
port: 9999

# For pwn only, this tells it which binary to use for xinetd. file will be autogenerated. 
# You should ONLY use this option if you want to autogenerate a ctf.xinetd (this is a utility feature)
binary: ./binary

Usage

To build the challenges files

python main.py build

The files will be built in config.exportDirectory (defaults to export/). You can copy this to .rdeploy for use with rCTF.

To start all the docker containers

python main.py start