GithubHelp home page GithubHelp logo

osteth / hbctf Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 4.0 41 KB

HackBama CTF game

License: MIT License

Python 100.00%
hacking ctf-events ctf-framework ctf-scoreboard ctf-scoreboard-server cybersecurity python

hbctf's Introduction

HBCTF

https://travis-ci.org/osteth/HBCTF.svg?branch=master

A hybrid CTF game, combining a dev-ops service hack and patch, jeopardy style flags, and an explorable battfield were players go head to head to control strategic network nodes.

http://www.hackbama.com/wp-content/uploads/2017/03/Hackbama_Logo-enc-400x400.png

Quick start

To use HBCTF as the start of a new project, do the following, preferably in a virtual environment. Clone the repo.

git clone https://github.com/osteth/HBCTF
cd HBCTF

Then install in locally editable (-e) mode and run the tests.

sudo pip install -e .[test]
py.test

Then install couchDB (Developtment and testing is done on Ubuntu 16.04) .. code-block:: console

sudo apt-get install couchDB

Finally, give the command line game control program a try.

HBCTF --help

Services API explaination

Checkin --> Token Decryption --> ScoreTokentSubmit

Checkin

Player checks into the game server and submits to the server the ip address and port their service is running on. The server responds out to the player with key and an encrypted score token that the player can decrypt and submit to receive points.

  • Player Actions
    • Checkin with IP and port they are running their service on.
    • Accept tokens and decrypts them
    • Submit decrypted tokens back to the server decrypted.
  • Server Actions
    • Recieve checkin information and store it in DB.
    • Pass out tokens every 5 minutes.
    • Recieve decrypted tokens and register scores.

ScoreTokentSubmit

Player submits the decrypted token back to the server to gain their points.

CLI Commands

Usage: HBCTF [OPTIONS] COMMAND [ARGS]...

Options:

Flag Type Description
-p, --port -v, --verbose -l, --logging --help INTEGER INTEGER INTEGER Port number to serve the API on. Sets the verbosity of outputs Sets the detail level of logs Show this message and exit.

Commands:

Command Action
dropdb initdb restart start status stop Drop the database. Initialize the database. Restart the API. Start the API. Show the status of the API. Stop the API.

Dev Roadmap

  • Services API -> unit tests -> documentation.
  • Game Control CLI -> unit tests -> documentation.
  • Expad API for jeopardy stype flags -> unit tests -> documentation.
  • Jeopardy style scoreboard -> unit tests -> recustomization pipeline-> documentation.
  • Expand API for battleground features -> unit tests -> documentation.
  • Build battleground VM's -> Network VM's -> Seutup High Value Nodes and hook them to API -> Recustomization Pipeline -> documentation.

Dev Notes:

To help prevent uncustomized forks of HBCTF from being uploaded to PyPI, I've configured the setup's upload command to dry run. Make sure to remove this configuration from setup.cfg when you customize HBCTF.

  • logging
  • isatty
  • colrama
  • progressbar (progressbar2)

hbctf's People

Contributors

osteth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hbctf's Issues

Using any commands fails

I created a virtual env:

$ virtualenv  /tmp/MyEnv
$ source /tmp/MyEnv/bin/activate
$ pip install --upgrade setuptools pip wheel

I didn't understand what this means:

Then install in locally editable (-e) mode and run the tests.

sudo pip install -e .[test]
py.test

So I ran # python3 setup.py install instead.

And when using any commands:

(MyEnv) $ HBCTF initdb                                                                                                                                                                                 [±master ✓]
Traceback (most recent call last):
  File "/usr/bin/HBCTF", line 11, in <module>
    load_entry_point('HBCTF==0.0.1.dev0', 'console_scripts', 'HBCTF')()
  File "/home/noraj/.local/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/noraj/.local/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/noraj/.local/lib/python3.6/site-packages/click/core.py", line 1063, in invoke
    Command.invoke(self, ctx)
  File "/home/noraj/.local/lib/python3.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/noraj/.local/lib/python3.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
TypeError: cli() got an unexpected keyword argument 'port'

It seems to request soem ressources out of the virtual env.

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.