Skip to content

A sandboxed coding platform for use in info-security Capture the Flag (CTF) competitions.

License

Notifications You must be signed in to change notification settings

strellic/CodeExec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CodeExec

CodeExec is a sandboxed coding platform for use in info-security Capture the Flag (CTF) competitions. Initially created for GHCHS's CyberSecurity club, CodeExec was used in the club's two CTFs: BryceCTF and trevzCTF.

CodeExec uses the epicbox Python library to start one-use Docker containers to sandbox unsafe code.

Supports ASM64, C, C++, C#, Java 11, NodeJS 10.13.0, and Python 3.8.5.

Uses socket.io to communicate between a client and server.

Screenshots

Installation

  1. Install all of the necessary Docker images:
docker pull strellic/epicbox-asm64:latest && \
docker pull stepik/epicbox-gcc:6.3.0 && \
docker pull stepik/epicbox-mono:5.0.0 && \
docker pull stepik/epicbox-java:11.0.1 && \
docker pull strellic/epicbox-node:latest && \
docker pull strellic/epicbox-python:latest

(OPTIONAL) Use venv to make a virtual environment:

python3 -m venv env
source env/bin/activate
  1. Install the Python requirements with pip:
pip install -r requirements.txt
  1. Run the app once in debug mode to generate settings.json and problems.json in the data folder:
python3 app.py
  1. Modify settings.json and problems.json to change the port and add challenges.

  2. When you want to switch to a production server, start the app with Gunicorn.

gunicorn -c config.py app:app

(If at this point, gunicorn doesn't work, install gunicorn or gunicorn3 from your package manager and run the previous command again.)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

About

A sandboxed coding platform for use in info-security Capture the Flag (CTF) competitions.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published