Skip to content

Repository files navigation

CTF Project

This workspace contains a Capture The Flag (CTF) project with 5 challenges and a hacker-style web dashboard.

Repository contents

  • index.html — main CTF dashboard and challenge launcher
  • styles.css — visual styling for the dashboard
  • requirements.txt — Python dependencies for the web challenge
  • 01-web/ — web challenge directory with Flask app and flag
  • 02-crypto/ — cryptography challenge files
  • 03-reverse/ — reverse engineering challenge files
  • 04-pwn/ — binary exploitation challenge files
  • 05-forensics/ — forensic analysis challenge files

What GitHub needs

This repository is ready for GitHub. The key files include:

  • README.md — repository overview, setup instructions, and requirements
  • requirements.txt — Python dependency list for the Flask web challenge
  • challenge directories and source files

Optional but recommended for GitHub:

  • .gitignore — to exclude generated files and local environment artifacts
  • LICENSE — if you want to set a project license

What to download before running

Required tools:

  • Python 3.11 or newer
  • pip package manager
  • Flask (installed via requirements.txt)
  • GitHub Desktop (for uploading and syncing to GitHub)
  • A C compiler for challenge 3 and 4:
    • Windows: Visual Studio Build Tools, MinGW, or WSL with gcc
    • macOS/Linux: gcc or clang
  • A web browser to view index.html

Recommended tools:

  • Visual Studio Code or another code editor
  • A terminal or command prompt

Install requirements

From the repository root:

python -m pip install -r requirements.txt

If you do not have pip installed, install Python from https://www.python.org and enable the option to add Python to your PATH.

Run the CTF locally

1. Serve the static dashboard

You can open index.html directly in a browser, or run a simple local server:

cd c:\Users\samue\Desktop\studies
python -m http.server 8000

Then open:

http://127.0.0.1:8000

2. Start the web challenge app

From the 01-web folder:

cd 01-web
python app.py

Then open:

http://127.0.0.1:5000

3. Compile C challenges

For 03-reverse and 04-pwn, compile the C source code before running or inspecting it:

gcc 03-reverse/challenge.c -o 03-reverse/challenge
gcc 04-pwn/vuln.c -o 04-pwn/vuln

On Windows, use the appropriate compiler command for your toolchain.

Challenge workflow

  • Open the dashboard in your browser
  • Complete each challenge in order
  • The dashboard unlocks the next challenge when the previous one is solved
  • Use the individual challenge folders for additional details and source files

GitHub Desktop instructions

  1. Open GitHub Desktop.
  2. Click FileAdd local repository....
  3. Select the folder: c:\Users\samue\Desktop\studies.
  4. Review the changes in the Changes tab.
  5. Enter a commit message and click Commit to main.
  6. Click Publish repository to upload it to GitHub.

If the repository already exists on GitHub, use FileClone repository... instead and copy the project files into the cloned folder.

Notes

  • The web challenge depends on Flask and the local Python runtime.
  • The reverse and pwn challenges are source-level C challenges and require a compiler to build or inspect.
  • The forensics challenge is data analysis and uses the provided capture.txt.
  • Keep flag.txt files private if you do not want to expose the flags publicly.

About

Fun way to learn :)

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages