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.
- Manage channels and their permissions
- Create Discord scheduled events for upocoming CTF competitions
- Track CTFs progress
- Track members' participation in challenges
- Announcements upon solving a challenge
- Flag submission from within the Discord guild
and more.
- Provides a utility to lookup system calls from a specific architecture
- Provides a utility for basic encoding schemes
- Provides a utility for classic ciphers
As you already read this bot can interact with the CTF platforms, meaning that you can:
- Submit your flags within the bot
- Observe the leaderboard
- Automatically parse challenges from the platform
- Automatically create team accounts on the platform (or use already existing ones)
- And many more
Currently, Eruditus supports these platforms:
- CTFd
- rCTF
You can check out our abstract interfaces if you wish to add support for a new platform
Here's a list of the currently supported commands:
/help (Show help about the bot usage)
/search (Search for a topic in the CTF write-ups index)
/request (Request a new feature from the developer)
/report (Send a bug report to the developer)
/intro (Show bot instructions for newcomers)
/ctf createctf (Create a new CTF)
/ctf renamectf (Rename a CTF)
/ctf archivectf (Archive a CTF's channels)
/ctf exportchat (Export CTF chat logs to a static site)
/ctf deletectf (Delete a CTF as well as its channels)
/ctf setprivacy (Toggle CTF privacy between public and private)
/ctf join (Join a specific CTF channels)
/ctf leave (Leave a CTF)
/ctf addcreds (Add credentials for the current CTF)
/ctf showcreds (Show credentials of the current CTF)
/ctf status (Show CTF(s) status)
/ctf workon (Access the private channel associated to the challenge)
/ctf unworkon (Leave the challenge channel)
/ctf solve (Mark a challenge as solved)
/ctf unsolve (Mark a challenge as not solved)
/ctf createchallenge (Create a new challenge)
/ctf renamechallenge (Rename a challenge)
/ctf deletechallenge (Delete a challenge)
/ctf pull (Pull unsolved challenges from the platform)
/ctf submit (Submit a flag to the platform)
/ctf remaining (Show remaining time for the CTF)
/ctf register (Register a team account in the platform)
/syscalls (Show information for a specific syscall)
/ctftime upcoming (Show upcoming CTF competitions)
/ctftime current (Show ongoing CTF competitions)
/ctftime top (Show leaderboard for a specific year)
/ctftime pull (Create events starting in less than a week)
/ctftime setchannel (Set the text channel where CTF reminders will be sent)
/cipher caesar (Caesar cipher)
/cipher rot13 (Rot13 cipher)
/cipher atbash (Atbash cipher)
/encoding base64 (Base64 encoding/decoding)
/encoding base32 (Base32 encoding/decoding)
/encoding binary (Binary encoding/decoding)
/encoding hex (Hex encoding/decoding)
/encoding url (URL encoding/decoding)
Before proceeding with the installation, you may want to setup a repository to host Discord chat logs for archived CTFs that you no longer want to have on your Discord guild. Follow these instructions if you wish to do so:
- Create a private GitHub repository to host your chat logs.
- Clone this project into your previously created GitHub repository.
- Modify line 37 of the Dockerfile to point to your private GitHub repository that will host the chat logs.
- Prepare an SSH key pair to access your private GitHub repository, and put the private key under .ssh/privkey.pem. As for the public key, under your repository settings in the
Deploy keys
section, click onAdd deploy key
and paste your SSH public key (make sure to tick theAllow write access
box).
The sample GitHub repository already has a workflow for publishing the website to Azure App Service, but you're free to host it somewhere else, or simply keep it in the GitHub repository. If you're willing to use Azure, make sure to add the necessary secrets and variables referenced inside the workflow.
Follow the instructions below to deploy the bot:
- Go to the Discord Developer Portal.
- Create a new application.
- Go to the Bot pane and add a bot for your application.
- Enable Server Members Intent and Message Content Intent under Privileged Gateway Intents.
- Put your configuration to the
eruditus/.env
file by using the .env.example template. - Deploy the bot using
docker-compose up -d --build
. - Go to the OAuth2 URL Generator pane, tick
bot
andapplications.commands
under the Scopes section, tickAdministrator
under the Bot Permissions section and copy the generated link. - Invite your bot to the guild using the generated link.
- Enjoy.
Please consider reading our Contribution Guidelines before making a contribution.
This work was inspired from these amazing projects:
Distributed under the MIT License. See LICENSE
for more information.