Skip to content

csxark/CyberGauntlet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

134 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CyberGauntlet

CyberGauntlet is a lightweight CTF-style platform focused on cipher challenges. Players download encrypted assets, apply provided hints to recover plaintext, and submit flags or answers. This repository contains a React + TypeScript frontend and a simple challenge layout served from public/challenges.

🎨 UI Preview

A quick visual overview of the platform:

🏁 Landing Page

Landing UI

πŸ” Login / Registration

Login UI

🎯 Mission Objectives

Objective UI


Features

  • Static challenge delivery via public/
  • Frontend: Vite + React + TypeScript
  • Optional Supabase integration for auth/leaderboards (src/lib/supabase.ts)

Quick start

Install dependencies and start the development server:

npm install
npm run dev

Docker (Optional)

This repository supports an optional Docker-based local development workflow. It is intended to reduce setup friction and keep environments consistent across OSes.

Start the dev stack:

docker compose up --build

For a deeper walkthrough, see docker_guide.md.

Build and preview a production bundle:

npm run build
npm run preview

Challenge layout

Challenges are organized under public/challenges. Each challenge should reside in its own folder (for example q1, q2, ...). Recommended contents:

  • hint.txt β€” concise hints or instructions
  • assets/ β€” encrypted files, ciphertext dumps, images, etc.
  • README.md β€” (optional) description and expected flag format (for example FLAG{...})

Example:

public/challenges/q1/
β”œβ”€ cipher_collection.txt
└─ hint.txt

Solver workflow

  1. Open the challenge page and download the provided assets.
  2. Use the hints to determine the cipher or encoding.
  3. Decrypt or decode assets locally to recover the flag.
  4. Submit the flag following the challenge rules.

Files in public/ are served statically by the dev server and are available for download in the browser.

Encryption / decryption examples

Use standard command-line tooling. Example (OpenSSL, AES-256-CBC):

# Encrypt
openssl enc -aes-256-cbc -salt -in secretnote.txt -out secretnote.txt.enc -k "yourpassword"

# Decrypt
openssl enc -d -aes-256-cbc -in secretnote.txt.enc -out secretnote.txt -k "yourpassword"

Simple Python example (Caesar cipher, shift = 3):

from pathlib import Path

text = Path('cipher_collection.txt').read_text()

def caesar(s: str, shift: int = 3) -> str:
    out = []
    for c in s:
        if c.isupper():
            out.append(chr((ord(c) - ord('A') - shift) % 26 + ord('A')))
        elif c.islower():
            out.append(chr((ord(c) - ord('a') - shift) % 26 + ord('a')))
        else:
            out.append(c)
    return ''.join(out)

print(caesar(text))

Authoring new challenges

To add a challenge:

  1. Create public/challenges/qX/ (replace qX with a new identifier).
  2. Add assets and a hint.txt or README.md describing the objective and flag format.
  3. Verify assets are downloadable from the dev server.

Security and best practices

  • Do not commit secrets (API keys, credentials) to the repository.
  • For hosted competitions, perform server-side submission validation and rate limiting.

Developer notes & next steps

  • Tech stack: Vite + React + TypeScript (see package.json for scripts).
  • Recommended improvements:
    • Challenge authoring CLI to standardize asset creation.
    • Server-side submission validation and scoreboard.
    • Unit tests and CI workflow for lint/typecheck.

Contact

If you would like assistance adding challenges, integrating a scoreboard, or automating challenge creation, please open an issue or request changes in the repository.

Contribution

Contributions are welcome and appreciated.

Before contributing, please read the following documents to understand our guidelines and expectations:

To contribute:

  1. Fork the repository
  2. Create a new branch for your changes git checkout <feature-branch>
  3. Make your changes following the project standards git add <FILE>
  4. Commit and push your changes to your fork
git commit -m "<commit-message>"
git push origin <feature-branch>
  1. Open a Pull Request for review

By participating in this project, you agree to follow the Code of Conduct.

License

This project is licensed under the MIT License. See the LICENSE file for details.

πŸ“ Folder Architecture

πŸ“ CyberGauntlet/
β”œβ”€β”€β”€πŸ“ Databases/
β”‚   β””β”€β”€β”€πŸ“ supabase/
β”‚       β””β”€β”€β”€πŸ“ migrations/
|           β”œβ”€β”€β”€πŸ“„ <date>_create_leaderboard.sql
|           β”œβ”€β”€β”€πŸ“„ <date>_create_public_schema.sql
|           β”œβ”€β”€β”€πŸ“„ <date>_posts_rls_policies.sql
|           β””β”€β”€β”€πŸ“„ <date>_create_team_sessions.sql
β”œβ”€β”€β”€πŸ“ Docs/
β”‚   β””β”€β”€β”€πŸ“ screenshots/
|        β”œβ”€β”€β”€πŸ“„ Landing.png
|        β”œβ”€β”€β”€πŸ“„ Login.png
|        β””β”€β”€β”€πŸ“„ Objective.png
|   β”œβ”€β”€β”€πŸ“„ ADMIN_SETUP.md
|   β”œβ”€β”€β”€πŸ“„ CODE_OF_CONDUCT.md
|   β”œβ”€β”€β”€πŸ“„ Contributor.md
|   β”œβ”€β”€β”€πŸ“„ LEADERBOARD.md
|   β””β”€β”€β”€πŸ“„ LEADERBOARD_IMPLEMENTATION.md
β”œβ”€β”€β”€πŸ“ Json/
|   β”œβ”€β”€β”€πŸ“„ index.html
|   β”œβ”€β”€β”€πŸ“„ package-lock.json
|   β”œβ”€β”€β”€πŸ“„ package.json
|   β”œβ”€β”€β”€πŸ“„ tsconfig.app.json
|   β”œβ”€β”€β”€πŸ“„ tsconfig.json
|   β””β”€β”€β”€πŸ“„ tsconfig.node.json
β”œβ”€β”€β”€πŸ“ public/
β”‚   β””β”€β”€β”€πŸ“ challenges/
β”‚       β”œβ”€β”€β”€πŸ“ q1/
|       |   β”œβ”€β”€β”€πŸ“„ cipher_collection.txt
|       |   β””β”€β”€β”€πŸ“„ hint.txt
β”‚       β”œβ”€β”€β”€πŸ“ q3/
|       |   β””β”€β”€β”€πŸ“„ security.c
β”‚       β”œβ”€β”€β”€πŸ“ q4/
|           β””β”€β”€β”€πŸ“„ secretnote.txt
β””β”€β”€β”€πŸ“ src/
    β”œβ”€β”€β”€πŸ“ components/
    |   β”œβ”€β”€β”€πŸ“„ ChallengePage.tsx
    |   β”œβ”€β”€β”€πŸ“„ DocsPage.tsx
    |   β”œβ”€β”€β”€πŸ“„ GlitchText.tsx
    |   β”œβ”€β”€β”€πŸ“„ LandingPage.tsx
    |   β”œβ”€β”€β”€πŸ“„ Leaderboard.tsx
    |   β””β”€β”€β”€πŸ“„ TerminalBox.tsx
    β”œβ”€β”€β”€πŸ“ context/
    |   β””β”€β”€β”€πŸ“„ AuthContext.tsx
    β”œβ”€β”€β”€πŸ“ data/
    |   β””β”€β”€β”€πŸ“„ teamData.ts
    β”œβ”€β”€β”€πŸ“ lib/
    |   β””β”€β”€β”€πŸ“„ supabase.ts
    β””β”€β”€β”€πŸ“ pages/
    |   β”œβ”€β”€β”€πŸ“„ Dashboard.tsx
    |   β”œβ”€β”€β”€πŸ“„ LeaderboardPage.tsx
    |   β”œβ”€β”€β”€πŸ“„ Login.tsx
    |   β”œβ”€β”€β”€πŸ“„ Profile.tsx
    |   β””β”€β”€β”€πŸ“„ ProtectedRoute.tsx
    β”œβ”€β”€β”€πŸ“„ App.tsx
    β”œβ”€β”€β”€πŸ“„ index.css
    β”œβ”€β”€β”€πŸ“„ main.tsx
    β””β”€β”€β”€πŸ“„ vite-env.d.ts
β”œβ”€β”€β”€πŸ“„ index.html
β”œβ”€β”€β”€πŸ“„ (... 17 more files)
    

πŸ“ Project Structure

πŸ“ docs/            β†’ README.md, ADMIN_SETUP.md, Contributor.md,LEADERBOARD_IMPLEMENTATION.md,CODE_OF_CONDUCT.md,
πŸ“ screenshots
πŸ“ src/             β†’ Application source code  
πŸ“ public/          β†’ Public assets and challenges  
πŸ“ database/        β†’ Supabase migrations  
πŸ“ config/          β†’ ESLint, Vite, Tailwind, PostCSS, TSConfig files  

Feel free to use and modify the code as needed for your own CTF events!

About

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors