Skip to content

rgajendran/ctf_marker

Repository files navigation

Flawed Fortress

Capture The Flag Marker

Summary

Flawed Fortress is a front end platform for hosting Capture the Flag Event (CTF), it is programmed with PHP, JQuery, JavaScript and phpMyAdmin. Currently, It is designed to import SecGen CTF challenges using `marker.xml` file (which is generated in the project folder when creating a CTF Challenge)

Features

Admin Account

  • Create Teams
  • Generate Tokens (Allow players to register with their preferred logins)
  • Generate Random Username & Password (Allow players to instantly login)
  • Check Token Registration Status
  • Send Live Announcement
  • Restrict Users to Login
  • Import SecGen CTF Challenges
  • Update Homepage and Event Countdown Timer
  • Database Management (Create or Drop all necessary tables)
  • System Status (Check if there is any misconfiguration before the CTF event)
  • Export Team Tokens as PDF file
  • Export Username & Password as PDF file

User Account

  • Team Scoreboard
  • Team Activity
  • Team Chat
  • View Other Team Progress
  • Challenges are represented as country map
  • Live Timer
  • Live Notification Update (For Scoreboard, Team, Chat, Flag, Announcement, Timer and Hints)

Installation

Step 1

Create database in `phpMyAdmin` with secure db_username and db_password

Step 2

git clone https://github.com/rgajendran/ctf_marker.git

Step 3

<?php
    $connection = mysqli_connect('HOSTNAME','DB_USERNAME','DB_PASSWORD','DATABASE_NAME');
?>

Open the project folder, navigate to template/connection.php file and update with your server/database login credentials.

Step 4

Transfer the entire project folder to your server domain eg.www/

Step 5

Navigate to Admin Account http://DOMAIN_NAME/admin.php

You don't need any username or password to access admin.php page for the first time.

Step 6

Create Database

Flawed Fortress front end has the capability to auto generate all required tables automatically in a click of a button.

Open   > admin.php page
Select > Options
Select > DATABASE MANAGEMENT
Click  > Create (SecGen Hint & Flag Table)
Click  > Create (Chat, Logger & Report Table)
Click  > Create (Scoreboard, Updater & Options Table)
Click  > Create (Users & Teams Table)
Click  > Create (SecGen Map Table)

Step 7

Once you create all the tables, Select SYSTEM STATUS tab in the admin account to check if there are any table errors.

Step 8

After creating Users & Team Table, the page will automatically redirect you to index.php (To secure the admin account). Direct access using http://DOMAIN_NAME/admin.php will be restricted. You would need default login details to get admin access. You can change the password after logging in.

Default Admin Login Details

Username : admin

Password : admin

Usage

  • Step 1

    • Login to admin account and create teams.
  • Step 2

    • Choose registration method (Generate Tokens or Username and Password).
  • Step 3

    • Export login credential as PDF and distribute with team players.
  • Step 4

    • Import SecGen challenges (Import same challenges for all the registered teams or Import seperate challenges for every single team)
  • Step 5

    • Set Game End Timer
  • Step 6

    • Allow Users Login
  • Step 7

    • Start your Game

Contributing

  1. Fork the repository on GitHub
  2. Clone the project to your own machine git clone https://github.com/rgajendran/ctf_marker.git
  3. Commit changes to your own branch
  4. Push your work to your fork
  5. Submit your Pull request for review