GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ghidragolf/ctfd-fileupload: Fileupload plugin for CTFd for users to submit Ghidra Scripts

BranchesTags
Open more actions menu

Latest commit

 

History

10 Commits
10 Commits

Folders and files

NameName
Last commit message
Last commit date
consumer
consumer
 
 
ctfd_script_challenges
ctfd_script_challenges
 
 
img
img
 
 
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
docker-compose.yml
docker-compose.yml
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

Script Challenges Plugin

A CTFd plugin that allows competitors to upload scripts. The scripts are queued through RabbitMQ to be handled by a runner.

Simple Configuration

If you would like a very simple deployment, and the fastest way to get up and running, you can set some simple enviroment varibles and have a basic script configuration ready to go.

Environment Variable Default Value Description
RABBITMQ_URL amqp://user:pass@rabbit:5672 RabbitMQ configuration URL
RABBITMQ_QUEUE ctfd The queue that CTFd will send the scripts through
EXECUTION_TIMEOUT 120 seconds Timeout (in seconds) for submissions to become invalid.
ALLOWED_EXTENSIONS .py;.java;.txt File extension list the the competitors are allowed to upload.

By modifying these settings a basic deployment will be set up that passes upload scripts to the example consumer.

Advanced Configuration

For more advanced deployment types, you will want to modify ./ctfd_script_challenges/config.py. You can override all the settings mentioned above, as well as the validate_file function and the JSON data that is passed into RabbitMQ.

Consumer

The consumer takes the script from RabbitMQ, basic information about the challenge and user who sumbitted, and returns the results back to CTFd.

An example consumer has been provided in this repo for testing, for the actual consumer used in GhidraGolf, see gg-consumer

Note: The example consumer does NOT execute scripts and simply returns "hello world"

Running

Run the CTFd stack with docker compose

$> docker-compose build
$> docker-compose up -d

Creating Challenges

  1. To create new script challenges in CTFd, select the "script" type and create your challenge as normal.

  1. Create a new multi flag. Each line in this flag must be contained in the script results returned from the server.

Disclaimer

Executing untrusted user scripts can be dangerous. Make sure you validate the uploaded submissions and implement safeguards to prevent attacks. Always execute the uploaded scripts on a different system than the CTFd server to ensure the integrity of the competition. see the gg-consumer repo for strategies on defensive deployments.

About

Fileupload plugin for CTFd for users to submit Ghidra Scripts

ghidra.golf/

Topics

ctfdctfd-pluginreverse-engineering

Resources

Readme
Apache-2.0 license
Activity
Custom properties

Stars

3 stars

Watchers

4 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.