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 pypi package that helps in generating discord bots.

A pypi package that helps in generating discord bots.

KlevrHQ 3 Nov 17, 2021
Telegram bot for stream music or video on telegram

Anonymous VC Bot + Stream Bot Telegram bot for stream music or video on telegram, powered by PyTgCalls and Pyrogram Features Playlist features Multi L

Anonymous Boy 111 Oct 04, 2022
SpautiNoFay - A simple and beautiful music player created with Python

SpautiNoFay A simple and beautiful music player created with Python Why SpautiNo

8 Jan 19, 2022
UniHub API is my solution to bringing students and their universities closer

🎓 UniHub API UniHub API is my solution to bringing students and their universities closer... By joining UniHub, students will be able to join their r

Abdelbaki Boukerche 5 Nov 21, 2021
Allows you to easily share bookmarks from Raindrop.io in Telegram chats.

Allows you to easily share bookmarks from Raindrop.io in Telegram chats. As well as save links/photos/longreads from Telegram right into Raindrop.io. Join us, we have a nice 'reader mode' :)

Oleh 36 Dec 19, 2022
Python client library for Google Maps API Web Services

Python Client for Google Maps Services Description Use Python? Want to geocode something? Looking for directions? Maybe matrices of directions? This l

Google Maps 3.8k Jan 01, 2023
Web3 Pancakeswap Sniper & honeypot detector Take Profit/StopLose bot written in python3, For ANDROID WIN MAC & LINUX

🏆 Pancakeswap BSC Sniper Bot web3 with honeypot detector (ANDROID WINDOWS MAC LINUX) 🥇 ⭐️ ⭐️ ⭐️ First SNIPER BOT for ANDROID & WINDOWS with honeypot

HYDRA 2 Dec 24, 2021
Template to create a telegram bot in python

Template for Telegram Bot Template to create a telegram bot in python. How to Run First add src to PYTHONPATH: export PYTHONPATH=${PWD} Then run: pyt

Ali Hejazizo 12 Dec 24, 2022
A modular Telegram Python bot running on python3 with a sqlalchemy, redis, telethon.

GilbertAnimeBot A modular Telegram Python bot running on python3 with a sqlalchemy, redis, telethon. How to setup/deploy. Read these notes carefully b

Kishore 1 Jan 23, 2022
A pyrogram simple bot for Educational purpose.

A pyrogram simple bot for Educational purpose. To Learn More check at @PyrogramBot or on Documentation Mandatory variables API_ID - Get It From my.tel

SpamShield 10 Dec 06, 2022
Install and manage Proton-GE and Luxtorpeda for Steam and Wine-GE for Lutris with this graphical user interface. Based on AUNaseef's ProtonUp, made with Python 3 and Qt 6.

ProtonUp-Qt Qt-based graphical user interface to install and manage Proton-GE installations for Steam and Wine-GE installations for Lutris. Based on A

638 Jan 02, 2023
Automatically updates the twitter banner with the images of 5 latest followers, using tweepy python

Auto twitter banner Automatically updates the twitter banner every few seconds with follower profile pics on it Here's how it looks! Installation git

Dhravya Shah 7 Jul 04, 2022
Simple Telegram Bot To Get Feedback from users & Some Other Features

FeedbackBot Simple Telegram Bot To Get Feedback from users & Some Other Features. Features Get Feedback from users Reply to user's feedback Customisab

Arun 18 Dec 29, 2022
Prisma Cloud utility scripts, and a Python SDK for Prisma Cloud APIs.

pcs-toolbox Prisma Cloud utility scripts, and a Python SDK for Prisma Cloud APIs. Table of Contents Support Setup Configuration Script Usage CSPM Scri

Palo Alto Networks 34 Dec 15, 2022
A python script to acquire multiple aws ec2 instances in a forensically sound-ish way

acquire_ec2.py The script acquire_ec2.py is used to automatically acquire AWS EC2 instances. The script needs to be run on an EC2 instance in the same

Deutsche Telekom Security GmbH 31 Sep 10, 2022
Sakamata-alpha-pycord - Sakamata bot alpha with pycord

sakamatabot このリポジトリは? ホロライブ所属VTuber沙花叉クロヱさんの非公式ファンDiscordサーバー「クロヱ水族館」の運営/管理補助を行う

sushichaaaan 1 May 04, 2022
Kali Kush - Account Nuker Tool

Kali Kush - Account Nuker Tool This is a discord tool made by me, and SSL :) antho#1731 How to use? pip3 install -r requirements.txt -py kalikush.py -

ryan 3 Dec 21, 2021
This is a simple grabber written in Python which helps you to grab products from Willhaben.at

Willhaben Grabber This is a simple grabber written in Python which helps you to grab products from Willhaben.at General info The tool generates a sear

Ramo 0 Feb 16, 2022
Spacecrypto-bombcrypto-bot - SpaceCrypto And Bombcrypto Bot - MultiScreen

SpaceCrypto And Bombcrypto Bot - MultiScreen This is a open source project inspi

Paulo Bramante 5 Nov 03, 2022
"Nesse projeto criei uma automação para abrir as tarefas no Jira em massa pegando de uma determinada fila do Zendesk."

automacao-Zendesk "Nesse projeto criei uma automação para abrir as tarefas no Jira em massa pegando de uma determinada fila do Zendesk." en-us "In thi

tokoyamy 1 Dec 20, 2021