eSentire’s TRU discovered a novel Rust-based backdoor named ChaosBot that uses Discord for command-and-control, leverages compromised VPN and over-privileged Active Directory credentials, and can side-load via msedge_elf.dll. Observed capabilities include remote command execution via PowerShell, file transfer, screenshots, FRP-based reverse proxying, VM/ETW evasion, and attempted VS Code Tunnel deployment. #ChaosBot #frp
Keypoints
- eSentire TRU identified a Rust-based backdoor dubbed ChaosBot that uses Discord API (bot token, guild/channel) for C2 and operator interaction.
- Initial access vectors included compromised CiscoVPN credentials and an over-privileged AD account (“serviceaccount”), plus phishing with malicious .lnk shortcuts masquerading as State Bank of Vietnam PDFs.
- ChaosBot is side-loaded via msedge_elf.dll using Microsoft Edge’s identity_helper.exe from C:UsersPublicLibraries and performs reconnaissance, command execution, file upload/download, and screenshots.
- Operators downloaded and ran fast reverse proxy (frp) as node.exe with node.ini configured to an AWS IP (18.162.110[.]113) to create persistent reverse access and SOCKS5 proxying.
- Evasion techniques include patching ntdll!EtwEventWrite to disable ETW telemetry and MAC-address checks to detect and exit on Virtual Machines (VMWare/VirtualBox prefixes).
- Operators attempted to install a Visual Studio Code Tunnel as an additional backdoor but the install failed due to interactive authentication choices; they also experimented with multiple variants and libraries (reqwest, serenity).
- TRU linked two Discord user accounts (chaos_00019, lovebb0024) to ChaosBot C2 and provided YARA rules for detecting ChaosBot and its shortcut dropper.
MITRE Techniques
- [T1078] Valid Accounts – Threat actors used compromised CiscoVPN credentials and an over-privileged Active Directory account named “serviceaccount” to gain and move within the environment. Quote: ‘leveraged compromised credentials that mapped to both CiscoVPN and an over-privileged Active Directory account named, “serviceaccount”.’
- [T1047] Windows Management Instrumentation – Actors leveraged WMI to execute remote commands across systems to deploy ChaosBot. Quote: ‘they leveraged WMI to execute remote commands across systems in the network, facilitating the deployment and execution of ChaosBot.’
- [T1036.005] Masquerading: Match Legitimate Name or Location – ChaosBot payload (msedge_elf.dll) was side loaded via Microsoft Edge component identity_helper.exe from Public user profile. Quote: ‘The ChaosBot payload (msedge_elf.dll) was side loaded via the legitimate Microsoft Edge component identity_helper.exe from the Public user profile directory: C:UsersPublicLibraries.’
- [T1204.002] User Execution: Malicious File – Phishing using malicious Windows Shortcut files that run a PowerShell command to download/execute ChaosBot while opening an innocuous PDF lure. Quote: ‘The shortcut file runs a PowerShell command that downloads and executes ChaosBot while simultaneously downloading/opening an innocuous PDF to mislead the victim.’
- [T1573.001] Encrypted Channel: Symmetric Cryptography or Application Layer Protocol – ChaosBot used Discord API (bot token, guild/channel) for C2 communications, creating channels and sending/receiving messages and attachments. Quote: ‘includes a discord bot token, guild (server) ID, and a channel ID that the malware uses to send messages to the threat actor(s) Discord when it successfully infects a new device.’
- [T1059.001] Command and Scripting Interpreter: PowerShell – ChaosBot executes shell commands via a new PowerShell process prefixed to set UTF8 output encoding for command execution. Quote: ‘it executes them via a new PowerShell process with a consistent command line: each command is prefixed to set the output encoding to UTF8.’
- [T1041] Exfiltration Over C2 Channel – Results of executed commands, screenshots, and files are uploaded to Discord channels as file attachments (multipart/form-data). Quote: ‘after executing the command via PowerShell, the malware sends back results… as file attachments in multipart/form-data format via POST request to the Messages resource.’
- [T1098] Account Manipulation / T1136] Create Account Patterns (contextual) – ChaosBot creates new Discord channels named after victim hostnames to receive commands and report infections. Quote: ‘ChaosBot then creates a new channel named after the victim’s computer name.’
- [T1497.001] Virtualization/Sandbox Evasion: Time/Environment Checks – Malware checks MAC addresses against known VM MAC prefixes and exits if matched. Quote: ‘The second technique checks the Mac addresses of the system against known Virtual Machine MAC address prefixes for VMWare and VirtualBox.’
- [T1562.001] Impair Defenses: Disable or Modify Tools – ChaosBot patches ntdll!EtwEventWrite (xor eax, eax -> ret) to prevent ETW consumers (EDR/AV/sandboxes) from seeing telemetry. Quote: ‘patching the first few instructions of ntdll!EtwEventWrite (xor eax, eax -> ret)… prevents ETW consumers… from seeing telemetry.’
- [T1573.002] Application Layer Protocol: Web Protocols (HTTP/HTTPS) – Use of Discord REST API endpoints (GET/POST to discord.com/api/v10) for C2 traffic. Quote: ‘GET https://discord.com/api/v10/users/@me’ and ‘POST https://discord.com/api/v10/channels//messages’.
- [T1105] Ingress Tool Transfer – Threat actors downloaded FRP (node.exe/node.ini) and Visual Studio Code (code.exe) to victim systems using ChaosBot’s download command. Quote: ‘download hxxps://…/node.exe … c:userspublicmusicnode.exe’ and ‘download hxxps://…/code.exe c:userspublicmusiccode.exe’.
Indicators of Compromise
- [File Hash ] ChaosBot sample – SHA256: 90f16e9dd3d919a4e6173219a1561ab04607a490567da736fa2ab0180d6fffbb
- [File Hash ] Visual Studio Code executable used by actors – SHA256: f764ff0750aab9f2fc4cd9ec90c58f1fc85ac74330fc623104d42dfaaf825103
- [Domains/URLs ] Malware/download hosting – cdn.discordapp[.]com/attachments/…/node.exe, transferai-all.s3.dualstack.ap-southeast-1.amazonaws[.]com/app/index/code.exe
- [IP Address ] FRP server – 18.162.110[.]113 (AWS Asia Pacific – Hong Kong) used in node.ini configuration
- [File/Paths ] Side-loaded component and download locations – msedge_elf.dll side-loaded via identity_helper.exe; download location examples: c:userspublicmusicnode.exe, c:userspublicmusicnode.ini, c:userspublicmusiccode.exe
- [User Accounts ] Discord operator accounts – chaos_00019 (ID: 1248523483600785431), lovebb0024 (ID: 1238009809895428159)
Read more: https://www.esentire.com/blog/new-rust-malware-chaosbot-uses-discord-for-command-and-control