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
Satoshi is a discord bot template in python using discord.py that allow you to track some live crypto prices with your own discord bot.

Satoshi ~ DiscordCryptoBot Satoshi is a simple python discord bot using discord.py that allow you to track your favorites cryptos prices with your own

Théo 2 Sep 15, 2022
It's a Discord bot to control your PC using your Discord Channel or using Reco: Discord PC Remote Controller App.

Reco PC Server Reco PC Server is a cross platform PC Controller Discord Bot which is a modified and improved version of Chimera for Reco-Discord PC Re

Arvinth Krishna 12 Aug 31, 2022
A small and fun Discord Bot that is written in Python and discord-interactions (with discord.py)

Articuno (discord-interactions) A small and fun Discord Bot that is written in Python and discord-interactions (with discord.py) Get started If you wa

Blue 8 Dec 26, 2022
Discord bot script for sending multiple media files to a discord channel according to discord limitations.

Discord Bulk Image Sending Bot Send bulk images to Discord channel. This is a bot script that will allow you to send multiple images to Discord channe

Nikola Arbov 1 Jan 13, 2022
An Open-Source Discord bot created to provide basic functionality which should be in every discord guild. We use this same bot with additional configurations for our guilds.

A Discord bot completely written to be taken from the source and built according to your own custom needs. This bot supports some core features and is

Tesseract Coding 14 Jan 11, 2022
Discord ToolBox is a discord bot developed by DJD320 created for the purpose of having some convenient tools in the form of a single bot.

Discord ToolBox Discord ToolBox is a discord bot developed by DJD320 created for the purpose of having some convenient tools in the form of a single b

null 3 Aug 7, 2021
Linky bot, A open-source discord bot that allows you to add links to ur website, youtube url, etc for the people all around discord to see!

LinkyBot Linky bot, An open-source discord bot that allows you to add links to ur website, youtube url, etc for the people all around discord to see!

AlexyDaCoder 1 Sep 20, 2022
Image-Bot-Discord - This Is a discord bot that shows the specific image you search from Google

Advanced Discord.py Image Bot CREDITS Made by RLX and Mathiscool README by Milrato Installation Guide in .env Adjust the TOKEN python main.py to start

RLX 3 Jan 16, 2022
Discord.py-Bot-Template - Discord Bot Template with Python 3.x

Discord Bot Template with Python 3.x This is a template for creating a custom Di

Keagan Landfried 3 Jul 17, 2022
Example-bot-discord - Example bot discord xD

example-python-bot-discord Clone this repository Grab a token on Discord's devel

Amitminer 1 Mar 14, 2022
YouTube-Discord-Bot - Discord Bot to Search YouTube

YouTube Bot Info YouTube Bot is a discord bot where you can search for anything

Riceblades11 10 Mar 5, 2022
SongLink Discord Bot - Discord bot to share music links easily

SongLink_Discord_Bot Discord bot to share music links easily. Take a link from y

Edgar Lefevre 4 Feb 18, 2022
Kevin L. 3 Jul 14, 2022
VoiceMaster-Discord-Bot - Fork from original Discord bot with max channel limit, staff role and more

VoiceMaster VoiceMaster is a discord bot created to change the way servers work,

null 2 Feb 28, 2022
A discord Server Bot made with Python, This bot helps people feel better by inspiring them with motivational quotes or by responding with a great message, also the users of the server can create custom messages by telling the bot with Commands.

A discord Server Bot made with Python, This bot helps people feel better by inspiring them with motivational quotes or by responding with a great message, also the users of the server can create custom messages by telling the bot with Commands.

Aran 1 Oct 13, 2021
Aqui está disponível GRATUITAMENTE, um bot de discord feito em python, saiba que, terá que criar seu bot como aplicação, e utilizar seu próprio token, e lembrando, é um bot básico, não se utiliza Cogs nem slash commands nele!

BotDiscordPython Aqui está disponível GRATUITAMENTE, um bot de discord feito em python, saiba que, terá que criar seu bot como aplicação, e utilizar s

Matheus Muguet 4 Feb 5, 2022
Diablo II Resurrected helper

Diablo II Resurrected 快捷施法辅助 功能: + 创建守护进程,注册全局热键 alt+/ 启用和关闭功能 (todo: 播放声音提示) + 按 x 强制移动 + 按 1 ~ 0 快捷施法到鼠标区域 使用 编辑配置 settings.py 技能信息做如下定义: SKILLS:

Wan 2 Nov 6, 2022
Cloudshell-sandbox-reporter - Helper modules and classes for writing to Cloudshell sandbox console

Cloudshell Sandbox Reporter This project provides utility classes for formatting

QualiLab 2 Sep 7, 2022
DeKrypt 24 Sep 21, 2022