Discord CTF helper bot for CyberErudites

Overview

Eruditus - CTF helper bot


Logo

Eruditus - CTF helper bot

About

Eruditus is a Discord CTF helper bot built with Python, it was initially designed to be used internally within the CyberErudites CTF team in order to make team work as efficient as possible.
The bot implements a bunch of useful features and uses Discord's Slash commands to make its usage as intuitive as possible.

Features

Core functionalities

  • Manage channels and their permissions
  • Track CTFTime events and announce them on the server
  • Track CTFs progress
  • Track members' participation in challenges
  • Announcements upon solving a challenge
  • Automatic flag submission from within the Discord guild

Miscellaneous

  • Provides a utility to lookup system calls from a specific architecture
  • Provides a utility for basic encoding schemes
  • Provides a utility for classic ciphers

Usage

/ctf createctf <ctf_name>                                       (Create a new CTF)
/ctf renamectf <ctf_name>                                       (Rename a CTF)
/ctf archivectf <mode> [<ctf_name>]                             (Archive a CTF's channels)
/ctf deletectf [<ctf_name>]                                     (Delete a CTF as well as its channels)
/ctf join <ctf_name>                                            (Join a specific CTF channels)
/ctf leave                                                      (Leave a CTF)
/ctf addcreds <username> <password> <url>                       (Add credentials for the current CTF)
/ctf showcreds                                                  (Show credentials of the current CTF)
/ctf status [<ctf_name>]                                        (Show CTF(s) status)
/ctf workon <challenge_name>                                    (Access the private channel associated to the challenge)
/ctf unworkon [<challenge_name>]                                (Leave the challenge channel)
/ctf solve [<support_member>]...                                (Mark a challenge as solved)
/ctf unsolve                                                    (Mark a challenge as not solved)
/ctf createchallenge <challenge_name> <challenge_category>      (Create a new challenge)
/ctf renamechallenge <new_name> <new_category>                  (Rename a challenge)
/ctf deletechallenge [<challenge_name>]                         (Delete a challenge)
/ctf pull [<ctfd_url>]                                          (Pull unsolved challenges from the CTFd platform)
/ctf takenote <type> <note_format>                              (Copies the last message into the notes channel)
/ctf submit <flag> [<support_member>]...                        (Submits a flag to CTFd)

/syscalls show <arch> <syscall name/syscall id>                 (Show information for a specific syscall)

/ctftime upcoming [<limit>]                                     (Show upcoming CTF competitions)
/ctftime current                                                (Show ongoing CTF competitions)
/ctftime top [<year>]                                           (Show leaderboard for a specific year)

/cipher caesar <message> [<key>]                                (Caesar cipher)
/cipher rot13 <message>                                         (Rot13 cipher)
/cipher atbash <message>                                        (Atbash cipher)

/encoding base64 <encode/decode> <data>                         (Base64 encoding/decoding)
/encoding base32 <encode/decode> <data>                         (Base32 encoding/decoding)
/encoding binary <encode/decode> <data>                         (Binary encoding/decoding)
/encoding hex <encode/decode> <data>                            (Hex encoding/decoding)
/encoding url <encode/decode> <data>                            (URL encoding/decoding)

Installation (brief explanation)

This is a self hosted bot, just set your bot token config.py file and run docker-compose up -d --build.
In order to use Slash commands, the usual bot scope in the Discord developer portal is not sufficient, you must also grant the applications.commands scope.

Contribution Guidelines

More information on how to contribute to this project will be provided soon.

Contributors

Credits

This work was inspired from these amazing projects:

License

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

Comments
  • Auto account creation

    Auto account creation

    Because most ctfs use ctfd, I believe it is conceivable to have the bot establish an account for that ctf (assuming it uses ctfd).

    This will also necessitate the addition of configuration for the email address that will be used in the registration process, as well as any other information that may be required (depends on what the registration requires). 

    bug enhancement 
    opened by ouxs-19 2
  • Add a command to set the CTF reminder channel

    Add a command to set the CTF reminder channel

    Currently the bot sends CTF reminders to the channel defined as REMINDER_CHANNEL in the configuration variables, and if the variable is not set, it looks up a channel named #general or the first world-readable channel it can write to. It would be good to have a command to set the reminder channel manually.

    enhancement 
    opened by malikDaCoda 1
  • Fix several bugs and add new features

    Fix several bugs and add new features

    Bug fixes

    • /ctf takenote wasn't taking attachments into consideration (fixed in 6bd9cba)
    • /ctf status wasn't displaying all challenges because of Discord's fields limit of 25 per embed (fixed in 6bd9cba)
    • After adding a challenge, the command issuer shouldn't be able to see its channel automatically, otherwise it will cause a lot of pain if /ctf pull is run, as a lot of challenges will be added (fixed in 6bd9cba)
    • Periodic puller wasn't working properly (fixed in 6bd9cba)
    • Truncate event information (description and prizes) which can be larger than Discord's allowed field value length of 1024 (fixed in 54a2497)
    • /ctftime upcoming can be used in DM now (fixed in 23d9b01)

    Optimization

    • Session cookies are now cached (fixed in 70ccbbc)

    Features

    • Add /ctf scoreboard command to display the scoreboard at any time, in addition to posting the scoreboard periodically in its dedicated channel (introduced in 79f276c)
    • Add /request and /report commands to send a feature request or a bug report to the developer (introduced in 22f4755)
    • Post solves summary after archiving the CTF (introduced in 718c3a3)

    Enhancements

    • Add ability to feed a numerical ID into /ctf workon instead of going through the pain of typing a long challenge name (introduced in 7decf6e)
    • Format scoreboard to easily spot our team position (introduced in 5e22987)
    opened by hfz1337 0
  • Feature: Manage multiple guilds simultaneously

    Feature: Manage multiple guilds simultaneously

    1. Added the possibility to manage multiple guilds simultaneously, every guild has its own separate database.
    2. Updated installation instructions in README.md, there are 2 methods now, either by inviting the bot or self hosting it.
    3. Added a new slash command /config which enables setting per guild configuration variables easily.
    opened by hfz1337 0
  • Things that need to be done

    Things that need to be done

    • [x] Add docstrings according to the docstring convention in PEP 257
    • [x] Add CONTRIBUTING.md
    • [x] Revisit README.md (I've written it in hurry)
    • [x] Integrate Github workflows to check pull requests mergeability (check that they conform to our coding style)
    • [ ] Add a new cog for generating reverse shell payloads, shellcodes, gopher payloads, etc
    enhancement 
    opened by hfz1337 0
  • Migrated to the brand new Slash commands

    Migrated to the brand new Slash commands

    Major changes

    • Switched to Slash commands that Discord introduced in late 2020
    • Structured the project files

    Minor changes

    • Setup proper logging of errors
    • Moved the configuration from docker-compose.yml to config.py

    New features

    • Retrieve challenges from the CTFd platform periodically by invoking the ctf pull command, create the challenge and send a pinned message in its channel containing the challenge information (name, description, points, etc).
    • Announce an upcoming event when it approaches and enable voting using reactions.
    • If the announced event gets a certain amount of positive votes, the CTF is automatically created and members are given instructions on how to join.
    • When the CTF starts, a reminder will be sent in its general channel by mentioning the CTF role, also, the clock emoji in the category name will change to a red dot.
    • Announce added challenges in the CTF's announcements channel and a lot more features.
    opened by hfz1337 0
  • Add `/ctf intro` to act as a tutorial for new members

    Add `/ctf intro` to act as a tutorial for new members

    The bot lacks a key command, namely /ctf intro. This will be simple; once executed, the bot replies with a series of messages and images describing its usage (from joining a CTF, pulling challenges, solving challenges, etc). It will be useful for members who never used the bot before.

    enhancement good first issue 
    opened by hfz1337 0
Releases(v1.2)
  • v1.2(Jun 6, 2021)

    Bug fixes

    • /ctf takenote wasn't taking attachments into consideration (fixed in 6bd9cba)
    • /ctf status wasn't displaying all challenges because of Discord's fields limit of 25 per embed (fixed in 6bd9cba)
    • After adding a challenge, the command issuer shouldn't be able to see its channel automatically, otherwise it will cause a lot of pain if /ctf pull is run, as a lot of challenges will be added (fixed in 6bd9cba)
    • Periodic puller wasn't working properly (fixed in 6bd9cba)
    • Truncate event information (description and prizes) which can be larger than Discord's allowed field value length of 1024 (fixed in 54a2497)
    • /ctftime upcoming can be used in DM now (fixed in 23d9b01)

    Optimization

    • Session cookies are now cached (fixed in 70ccbbc)

    Features

    • Add /ctf scoreboard command to display the scoreboard at any time, in addition to posting the scoreboard periodically in its dedicated channel (introduced in 79f276c)
    • Add /request and /report commands to send a feature request or a bug report to the developer (introduced in 22f4755)
    • Post solves summary after archiving the CTF (introduced in 718c3a3)

    Enhancements

    • Add ability to feed a numerical ID into /ctf workon instead of going through the pain of typing a long challenge name (introduced in 7decf6e)
    • Format scoreboard to easily spot our team position (introduced in 5e22987)

    CI/CD

    • Add pre-commit hook and github workflow to check for code style using black and flake8
    Source code(tar.gz)
    Source code(zip)
  • v1.1(May 31, 2021)

Owner
Hafidh
Computer Science student at ESI | Cyber Security enthusiast | CTF player at Sudo_root
Hafidh
allow windows programs to call dssp/mkdssp command from wsl; rework biopython on windows (PDB -> dssp -> fasta)

dssp-wsl Converting PDB (Protein Data Bank) file format to DSSP file format is required for generating datasets of peptides and their secondary struct

Taine Zhao 1 Feb 23, 2022
Um bot para contar quantas vezes o meu amigo troca de pfp/nick/tag essas coisas ae pq aquele mlk n para quieto

EkiBot Um bot que tem apenas as suas funções de audit log com as PFP's (avatares) dos usuários Pode ser usado para um usuário em específico, ou até me

Samuel 3 Aug 11, 2021
A Simple Telegram Inline Torrent Search Bot by @AbirHasan2005

A Simple Telegram Inline Torrent Search Bot by @AbirHasan2005

Abir Hasan 61 Oct 28, 2022
Get random jokes bapack2 from jokes-bapack2-api

Random Jokes Bapack2 Get random jokes bapack2 from jokes-bapack2-api Requirements Python Requests HTTP library How to Run py random-jokes-bapack2.py T

Miftah Afina 1 Nov 18, 2021
Public release of Telepathy, an OSINT toolkit for investigating Telegram groups. Enhanced features and improvements will be added over time.

Telepathy Welcome to Telepathy, an OSINT toolkit for scraping Telegram data to help investigate shady goings on. Currently, the tool is limited to scr

Jordan Wildon 484 Jan 01, 2023
Save data from Instagram takeout to a SQLite database

instagram-to-sqlite Save data from a Instagram takeout to a SQLite database. Mise En Place git clone https://github.com/gavindsouza/instagram-to-sqlit

gavin 8 Dec 13, 2022
Python Library for Secp256k1 Bitcoin curve to do fast ECC calculation

secp256k1 Python Library for Secp256k1 Bitcoin curve to do fast ECC calculation Example Usage import secp256k1 as ice print('[C]',privatekey_to_addres

iceland 49 Jan 01, 2023
See trending stock tickers on Reddit and check Stock perfomance

See trending stock tickers on Reddit and check Stock perfomance

Abbas 1.5k Jan 06, 2023
THERE IS AN IMPOSTER AMONG US. VOTE HIM OUT BEFORE HE [ R E D A C T E D ].

🛡️ Guardian There is an impostor among us. Can you help us find out who it is? ⚙️ Installation and Usage Make sure to install Tesseract-OCR before ru

Catus Magnus 1 Jan 06, 2022
AWS Quick Start Team

EKS CDK Quick Start (in Python) DEVELOPER PREVIEW NOTE: Thise project is currently available as a preview and should not be considered for production

AWS Quick Start 83 Sep 18, 2022
twtxt is a decentralised, minimalist microblogging service for hackers.

twtxt twtxt is a decentralised, minimalist microblogging service for hackers. So you want to get some thoughts out on the internet in a convenient and

buckket 1.8k Jan 09, 2023
The aim is to contain multiple models for materials discovery under a common interface

Aviary The aviary contains: - roost, - wren, cgcnn. The aim is to contain multiple models for materials discovery under a common interface Environment

Rhys Goodall 20 Jan 06, 2023
Simplebot-tg - Telegram/DeltaChat Bridge with python

simplebot_tg Telegram/DeltaChat Bridge, is a plugin for https://github.com/simpl

Arián Díaz Cruz 1 Dec 30, 2021
Telegram bot using python

Telegram bot using python

Masha Kubyshina 1 Oct 11, 2021
A wrapper for aqquiring Choice Coin directly through a Python Terminal. Leverages the TinyMan Python-SDK.

CHOICE_TinyMan_Wrapper A wrapper that allows users to acquire Choice Coin directly through their Terminal using ALGO and various Algorand Standard Ass

Choice Coin 16 Sep 24, 2022
A telegram bot that sends a meme a day, from reddit's top meme of the day

MemeBot A telegram bot that sends a meme a day, from reddit's top meme of the day You can use the bot either with an external scheduler (ex: pythonany

Michele Vitulli 1 Dec 13, 2021
Sie_banxico - A python class for the Economic Information System (SIE) API of Banco de México

sie_banxico A python class for the Economic Information System (SIE) API of Banco de México. Args: token (str): A query token from Banco de México id_

Dillan 2 Apr 07, 2022
Telegram Remote Administration Tool

Telegram Remote Administration Tool DISCLAIMER | Telegram Remote Administration Tool can only be used at your PC. Do not be evil! Читайте на Русском |

13 Nov 12, 2022
tgEasy's Official Assistant Bot and Example Bot

tgEasy Assistant The assistant bot that helps people with tgEasy directly on Telegram. This repository contains the source code of @tgEasyRobot and th

Divide Projects™ 4 Dec 26, 2022