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
A collection of scripts to steal BTC from Lightning Network enabled custodial services. Only for educational purpose! Share your findings only when design flaws are fixed.

Lightning Network Fee Siphoning Attack LN-fee-siphoning is a collection of scripts to subtract BTC from Lightning Network enabled custodial services b

Reckless_Satoshi 14 Oct 15, 2022
Yok bentar lagi update Premium :( DI FOLLOW YA GUYS

SIMBF + PREMIUM PRINTAH PENGINSTALAN ON TERMUX $ pkg update && upgrade $ termux-setup-storage $ pkg install python $ pkg install git $ pip install bs4

Jeeck 21 Jan 14, 2022
The first open-source PyTgCalls-based project.

SU Music Player — The first open-source PyTgCalls based Pyrogram bot to play music in voice chats Requirements FFmpeg NodeJS 15+ Python 3.7+ Deploymen

Calls Music 74 Nov 19, 2022
Tomli is a Python library for parsing TOML

Tomli A lil' TOML parser Table of Contents generated with mdformat-toc Intro Installation Usage Parse a TOML string Parse a TOML file Handle invalid T

Taneli Hukkinen 315 Jan 04, 2023
Make a command interpreter that manages AirBnb objects

AirBnB Clone Project Description This is part 1 of our AirBnb Clone project. The purpose of this project is to make a command interpreter that manages

Firdaus H. Salim 1 Nov 14, 2021
Using Streamlit to build a simple UI on top of the OpenSea API

OpenSea API Explorer Using Streamlit to build a simple UI on top of the OpenSea API. 🤝 Contributing Contributions, issues and feature requests are we

Gavin Capriola 1 Jan 04, 2022
Library to manage your own custom RPC on your desktop

Info I don't recommend novices setting this up yourself. It requires Redis, a server to host the API on, and a bit of understanding of Windows & Pytho

Isaac K 1 Apr 16, 2022
A small Python app to create Notion pages from Jira issues

Jira to Notion This little program will capture a Jira issue and create a corresponding Notion subpage. Mac users can fetch the current issue from the

Dr. Kerem Koseoglu 12 Oct 27, 2022
ELiza music is a telegram music bot project, allow you to play music on voice chat group telegram.

❤️ 𝗘𝗹𝗶𝘇𝗮 𝗠𝘂𝘀𝗶𝗰 ❤️ Unmaintained. The new repo of @MrsElizaRobot is private. (It is no longer based on this source code. The completely rewrit

Team Eliza 2 Dec 08, 2022
Tools for Twitter

Tools for Twitter Data This is a start of a collection of tools to use for collecting data via the Twitter API. If you do not have a Twitter Developer

DiscoverText 36 Oct 13, 2022
Changes the Telegram bio, profile picture, first and last name to the song that the user is currently listening to.

TGBIOFY - Telegram & Spotify integration Changes the Telegram bio, profile picture, first and last name to the song that the user is currently listeni

elpideus 26 Dec 07, 2022
ResolveURL - Fork of UrlResolver by eldorados, tknorris and jsergio123

ResolveURL Fork of UrlResolver by eldorados, tknorris and jsergio123 I am in no

gujal 60 Jan 03, 2023
A fork of discord.py for anime enjoyers

A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. Key Features Modern Pythonic API using async and await

Senpai Development 4 Nov 05, 2021
Fully undetected auto skillcheck hack for dead by daylight that works decently well

Auto-skillcheck was made by Love ❌ code ✅ ❔ ・How to use Start off by installing python ofc Open cmd in the same directory and type pip install -r requ

Rdimo 10 Aug 13, 2022
Telegram bot to check availability of vaccination slots in India.

cowincheckbot Telegram bot to check availability of vaccination slots in India. Setup Install requirements using pip3 install -r requirements.txt Crea

Muhammed Shameem 10 Jun 11, 2022
A comand-line utility for taking automated screenshots of websites

shot-scraper A comand-line utility for taking automated screenshots of websites For background on this project see shot-scraper: automated screenshots

Simon Willison 837 Jan 07, 2023
A simple and stupid Miinto API wrapper

miinto-api-wrapper Miinto API Wrapper is a simple python wrapper for Miinto API. Miinto is a fashion luxury marketplace. For more information see the

Giuseppe Checchia 3 Jan 09, 2022
Library written in Python that wraps Halo Infinite API.

haloinfinite Library written in Python that wraps Halo Infinite API. Before start It's unofficial, reverse-engineered, neither stable nor production r

Miguel Ferrer 4 Dec 28, 2022
Automatically pulls specified repository whenever a specified file is pushed. Great for working collaboratively when you need to run something locally.

autopull Simple python tool that allows you to automatically pull from a github repository whenever a file with a specified name is uploaded installat

carreb 0 Sep 27, 2022
Powerful Telegram Maintained UserBot in Telethon

Fire-X UserBot The Awaited Bot Fire-X userbot The Most Powerful Telegram Userbot. This Userbot is Safe to use in Your Telegram Account. It is not like

22 Oct 21, 2022