Skip to content

sabyabhoi/boi-ctf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

boi-ctf

A Capture-The-Flag Server for improving your cyber-security skills

How does it work?

  1. First a vulnerable program - like an unsafe C program making use of gets function call - is compiled.
  2. This program is then hosted on a given port of the server using socat.
  3. Users can interact with this and find their unique flag, which they can then post onto the server by sending a simple post request to the API endpoint provided. They can view their rankings on it as well.

Built With

Prerequisites

Installation

  1. Clone the repo
    git clone https://github.com/sabyabhoi/boi-ctf
  2. Download the required GoLang libraries
    go mod tidy
  3. Populate your .env file with the following variables
      DB_USER=your_postgres_username
      DB_PASS=your_postgres_user_password
      FLAG=boiCTF{the-actual-flag}
  4. Launch the application using
      go build && ./boi-ctf
    

Usage

The server currently has two major API endpoints on port 8080:

  1. / for getting general help about the CTF, and posting your flags.
  2. /leaderboard for viewing the current rankings

The actual vulnerable program is hosted using socat on port 8081. Connect to it using netcat:

nc <IP> 8081 

License

Distributed under the MIT License. See LICENSE.txt for more information.

Contact

Sabyasachi Bhoi - sabyabhoi - sabyabhoi@gmail.com

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published