Git Product home page Git Product logo

chattheflag's Introduction

ChatTheFlag

About

This is a CTF chatserver that uses server-client RSA key-based authentication. Keypairs are generated dynamically, so there is no need to create encrypted keys for the client or server.

The idea behind this server is to centralize storage to increase collaboration. Clients can store hashes, see what challenges others are working on, add notes to specific objects, etc. I'll continue adding features, but feel free to submit a pull request if you have a cool idea.

Installation:

git clone https://github.com/jbertman/ChatTheFlag.git
pip install -r REQUIREMENTS.txt

For server:

python server.py listen_ip listen_port

For clients:

python client.py username server_ip server_port

Usage:

Clients can use the "!" symbol to run server-side commands. Run !help to see available commands:

[[email protected]]> !help
Available commands:

help:    Show this help message
add:     Add an object named [name] to the session (add [name])
list:    List all objects and their attributes
lock:    Lock object with name [name] (lock [name])
release: Release lock on object with name [name] (release [name])
note:    Add note "[note]" to object with name [name] (note [name] "[note]")
flag:    Add flag "[flag]" to object with name [name] (flag [name] "[flag]")

An example of adding challenges, locking them, and adding a flag

[[email protected]]> !add challenge_1
[[email protected]]> !lock challenge_1
challenge_1 has been acquired by jbertman.
[[email protected]]> !flag challenge_1 "{A_FLAG}"
A flag has been added to challenge_1.
[[email protected]]> !list
Object "challenge_1":
Locked: ('jbertman', True)
Notes: 
Flag: {A_FLAG}

Another user connecting and trying operations on the previously locked objects

python client.py user2 127.0.0.1 8000
Connected to chat server 127.0.0.1:8000
[[email protected]]> !add challenge_1
Object already exists. Try listing the current objects instead.
[[email protected]]> !note challenge_1 "A note!"
[[email protected]]> Cannot add note to challenge_1. This object is locked by jbertman.

TODO: Prevent duplicate users (#1), add password protection, note removal, and unlock requests

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.