Git Product home page Git Product logo

ctfengine's Introduction

ctfEngine

ctfEngine is a platform designed to host small Capture The Flag (CTF) competitions, making it ideal for onsite events, classes, and smaller gatherings.

State of Development

ctfEngine is currently in the early stages of development, resembling an alpha version. It has been tested in events with approximately 10 players.

Design Goals

ctfEngine is built with the following design goals:

  • Easy Deployment and Usage:

    • Runs seamlessly in a containerized environment.
    • Eliminates dependencies on external Database Management Systems (DBMS).
    • All necessary resources are included in the binary.
    • Combines frontend and backend into a single service.
  • Versatility for Various CTF Projects:

    • Supports different CTF projects.
    • CTFs are structured in a format that can be stored in a Git repository.
      • CTFs are organized in a folder structure.
      • Utilizes plaintext files where applicable.

CTF Definition

To use ctfEngine, you need a CTF project in the correct format. Specify the location of your CTF project while starting ctfEngine using the -l parameter or place your CTD in /ctf (like in the docker container).

To start the example project you could run

# go run ctfEngine -l example_ctf

 ┌───────────────────────────────────────────────────┐ 
 │                     ctfEngine                     │ 
 │                   Fiber v2.51.0                   │ 
 │               http://127.0.0.1:3000               │ 
 │       (bound on host 0.0.0.0 and port 3000)       │ 
 │                                                   │ 
 │ Handlers ............ 19  Processes ........... 1 │ 
 │ Prefork ....... Disabled  PID ............. 19503 │ 
 └───────────────────────────────────────────────────┘ 

CTF Structure

The CTF structure consists mainly of .yml files and folders.

├── challenges
│   ├── <challenge id>
│   ├── ...
│   └── <challenge id>
└── ctf.yml

Challenge Structure

<challenge id>
├── files
│   ├── <challenge file>
│   ├── ...
│   └── <challenge file>
├── Dockerfile (optional)
└── challenge.yml

challenge.yml

The challenge.yml files should be formatted like the following example:

name: Example Challenge
description: >
  This is an example challenge that requires participants to...
value: 100
flag: CTF{example_flag}
category: Web Exploitation
hints:
  - description: "Consider looking into..."
    cost: 10
  - description: "Another hint suggestion..."
    cost: 20
service:
  port: 1337

SignUp Tokens

It is possible to enable a feature, that requires users to provide a single use token to sign up. To enable this feature, ctf.yml needs to be extended by the following line:

registrationToken: True

Further, you need to add tokens to the database.

# go run ctfEngine -a "f47ac10b-58cc-4372-a567-0e02b2c3d479" -l example_ctf
added signup token to DB

Contribution

You are welcome to contribute to ctfEngine and enhance its capabilities.

Feel free to:

  • Report issues
  • Suggest new features
  • Submit pull requests

Your contributions help make ctfEngine better for everyone. Thank you for your support!

ctfengine's People

Contributors

nwhirschfeld avatar dependabot[bot] avatar

Stargazers

GoatFoo avatar

Watchers

GoatFoo avatar  avatar Adrian Pistol avatar

Forkers

jaypikay

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.