Back to Intelligence

CikaBika Bot: Rust RAT Abusing Discord for C2 — Detection and Response Guide for Windows Defenders

SA
Security Arsenal Team
October 19, 2026
11 min read

Darktrace researchers have documented an active campaign distributing CikaBika Bot, a remote access trojan written in Rust that runs its entire command-and-control operation over Discord, supplemented by Ngrok tunnels for remote access. The infection chain begins with a malicious disk image file delivering fake documents that lure Windows users into executing the payload. Once installed, CikaBika Bot can execute arbitrary commands, spy on victims, and exfiltrate files — all while hiding its traffic inside legitimate-looking connections to Discord's infrastructure.

This matters to defenders for a simple reason: C2 over trusted SaaS platforms defeats reputation-based network filtering. Most egress allowlists and TLS inspection policies treat discord.com and *.ngrok.io as benign business or consumer traffic. A RAT that lives inside those channels will sail past controls that would catch a dedicated C2 domain instantly. If your environment does not need Discord, this campaign is a textbook argument for blocking it outright — and if your environment does need it, you need behavioral detection, not destination-based filtering.

Technical Analysis

Affected Platforms

  • Operating system: Microsoft Windows (end-user workstations are the observed target)
  • Initial access vector: Malicious disk image files (e.g., .iso / .img style containers) carrying fake document lures — a technique that historically bypasses Mark-of-the-Web propagation because files extracted from mounted images may not inherit MOTW depending on the extraction path and OS build
  • Implant language: Rust — notable because Rust binaries have poor signature coverage in many AV engines, resist static analysis compared to C/C++ equivalents, and produce large binaries that can be padded to evade sandbox file-size limits

Attack Chain

  1. Delivery: Victim receives a disk image (ISO/IMG) containing what appears to be a legitimate document. Disk images are favored because many email gateways and web proxies inspect them poorly, and Windows mounts them natively with a double-click.
  2. Execution: The lure inside the image — typically a file masquerading as a document (double-extension tricks, fake icons, or LNK files) — launches the Rust-based implant.
  3. C2 establishment: The implant authenticates to the Discord API using a hardcoded bot token and joins an attacker-controlled guild/channel. All tasking and output flows through Discord messages and attachments.
  4. Remote access augmentation: The implant invokes or bundles Ngrok to stand up tunnels (TCP/RDP/VNC-style forwarding), giving the operator direct interactive access to the victim host through *.ngrok.io or *.ngrok-free.app endpoints.
  5. Actions on objectives: Command execution, surveillance (screenshots, keylogging-style collection), and file theft — with exfiltration likely riding Discord attachments or the Ngrok tunnel.

Why Rust + Discord Is a Meaningful Combination

  • Rust implants typically have low static detection rates; YARA and AV signatures lag behind, and string extraction is noisier.
  • Discord as C2 means TLS-encrypted traffic to a top-100 global domain. Domain reputation, DNS filtering, and IP blocklists are largely useless. Detection must pivot to process behavior: which binary is talking to Discord, and should it be?
  • Ngrok on an endpoint is almost never legitimate outside of developer workstations. Its presence on a finance, HR, or executive machine is a high-fidelity signal on its own.

Exploitation Status

This is a confirmed active in-the-wild campaign documented by Darktrace researchers. No CVE is associated with this threat — it relies on social engineering and living-off-trusted-platforms techniques rather than a software vulnerability. There is no CISA KEV entry; mitigation is entirely behavioral and policy-driven.

Detection & Response

The detection strategy for CikaBika Bot rests on three high-signal behaviors:

  1. Non-browser, non-Discord-client processes making network connections to Discord API/CDN infrastructure — a Rust implant has no legitimate reason to talk to discord.com/api or cdn.discordapp.com.
  2. Ngrok execution outside developer contexts — process creation and tunnel establishment.
  3. Disk-image-mount followed by child process execution — the ISO/IMG lure pattern.

Sigma Rules

YAML
---
title: Suspicious Non-Discord Process Connecting to Discord Infrastructure
id: 3f8a1b24-6c7d-4e91-a2b3-cikabika0001
status: experimental
description: Detects processes other than the legitimate Discord client or browsers establishing network connections to Discord domains, consistent with malware abusing Discord for C2 (e.g., CikaBika Bot).
references:
  - https://securityaffairs.com/201210/security/rust-based-cikabika-bot-turns-discord-into-a-command-center.html
  - https://attack.mitre.org/techniques/T1102/
author: Security Arsenal
date: 2026/01/15
tags:
  - attack.command_and_control
  - attack.t1102.002
logsource:
  category: network_connection
  product: windows
detection:
  selection_domains:
    DestinationHostname|contains:
      - 'discord.com'
      - 'discordapp.com'
      - 'discord.gg'
      - 'discord.media'
  filter_legit:
    Image|endswith:
      - '\Discord\app-1.0.\Update.exe'
      - '\Discord.exe'
      - '\chrome.exe'
      - '\msedge.exe'
      - '\firefox.exe'
      - '\brave.exe'
      - '\opera.exe'
  filter_discord_client_path:
    Image|contains: '\AppData\Local\Discord\'
  condition: selection_domains and not 1 of filter_*
falsepositives:
  - Legitimate third-party Discord integrations or developer tooling (rare on standard user endpoints)
  - Embedded web views in applications
level: high
---
title: Ngrok Tunnel Execution on Endpoint
id: 7c2d9e41-5a6b-48f3-b1c4-cikabika0002
status: experimental
description: Detects execution of the Ngrok tunneling binary or Ngrok-style command-line arguments, which CikaBika Bot uses to enable remote interactive access to compromised hosts.
references:
  - https://securityaffairs.com/201210/security/rust-based-cikabika-bot-turns-discord-into-a-command-center.html
  - https://attack.mitre.org/techniques/T1572/
author: Security Arsenal
date: 2026/01/15
tags:
  - attack.command_and_control
  - attack.t1572
  - attack.t1102
logsource:
  category: process_creation
  product: windows
detection:
  selection_img:
    - Image|endswith: '\ngrok.exe'
    - OriginalFileName: 'ngrok.exe'
  selection_cli:
    CommandLine|contains:
      - 'ngrok tcp'
      - 'ngrok http'
      - 'ngrok start'
      - '.ngrok.io'
      - '.ngrok-free.app'
      - 'ngrok-agent'
  condition: 1 of selection_*
falsepositives:
  - Developer workstations legitimately using Ngrok for tunneling — scope exclusions by developer OU/hostname rather than globally
level: high
---
title: Execution From Mounted Disk Image (ISO/IMG Lure)
id: 9e4f6b83-2d1c-47a5-93e8-cikabika0003
status: experimental
description: Detects process execution from a mounted disk image volume, consistent with ISO/IMG lure chains observed delivering CikaBika Bot via fake documents.
references:
  - https://securityaffairs.com/201210/security/rust-based-cikabika-bot-turns-discord-into-a-command-center.html
  - https://attack.mitre.org/techniques/T1204/
author: Security Arsenal
date: 2026/01/15
tags:
  - attack.execution
  - attack.t1204.002
  - attack.initial_access
logsource:
  category: process_creation
  product: windows
detection:
  selection:
    Image|startswith:
      - 'D:\\'
      - 'E:\\'
      - 'F:\\'
      - 'G:\\'
      - '\\Device\\CdRom'
  filter_parent_explorer_not:
    ParentImage|endswith: '\explorer.exe'
  condition: selection and not filter_parent_explorer_not
falsepositives:
  - Legitimate software installation from mounted ISOs in IT/admin contexts — tune drive letters to your environment and alert only on non-admin users if needed
level: medium

Analyst note on Rule 3: drive-letter-based detection is inherently environment-dependent. If your fleet has USB CD-ROMs or IT staff routinely mount ISOs, restrict the rule to non-privileged users or pair it with Rule 1/Rule 2 as a correlation trigger rather than a standalone alert.

KQL Hunt — Microsoft Sentinel / Defender

KQL — Microsoft Sentinel / Defender
// Hunt 1: Non-browser processes connecting to Discord infrastructure (C2 over SaaS)
let DiscordDomains = dynamic(["discord.com", "discordapp.com", "cdn.discordapp.com", "discord.gg", "discord.media"]);
let LegitDiscordProcs = dynamic(["Discord.exe", "Update.exe", "chrome.exe", "msedge.exe", "firefox.exe", "brave.exe", "opera.exe"]);
DeviceNetworkEvents
| where TimeGenerated > ago(7d)
| where RemoteUrl has_any (DiscordDomains)
| where not(InitiatingProcessFileName in~ (LegitDiscordProcs))
| where not(InitiatingProcessFolderPath has @"AppData\Local\Discord")
| summarize Connections=count(), FirstSeen=min(TimeGenerated), LastSeen=max(TimeGenerated),
    RemoteIPs=make_set(RemoteIP), RemoteUrls=make_set(RemoteUrl)
    by DeviceName, InitiatingProcessFileName, InitiatingProcessFolderPath, InitiatingProcessSHA256, InitiatingProcessCommandLine
| order by FirstSeen asc;

// Hunt 2: Ngrok execution or tunnel endpoints across the fleet
DeviceProcessEvents
| where TimeGenerated > ago(7d)
| where FileName =~ "ngrok.exe"
   or ProcessCommandLine has_any ("ngrok tcp", "ngrok http", "ngrok start", "ngrok-free.app", ".ngrok.io", "ngrok-agent")
| project TimeGenerated, DeviceName, FileName, FolderPath, ProcessCommandLine,
    InitiatingProcessAccountName, SHA256, InitiatingProcessCommandLine
| order by TimeGenerated desc;

// Hunt 3: Correlate — hosts showing BOTH Discord C2-like traffic AND Ngrok activity (high confidence)
let DiscordHosts =
    DeviceNetworkEvents
    | where TimeGenerated > ago(7d)
    | where RemoteUrl has_any ("discord.com", "discordapp.com")
    | where not(InitiatingProcessFolderPath has @"AppData\Local\Discord")
    | where not(InitiatingProcessFileName in~ ("chrome.exe", "msedge.exe", "firefox.exe"))
    | summarize by DeviceName;
DeviceNetworkEvents
| where TimeGenerated > ago(7d)
| where RemoteUrl has_any ("ngrok.io", "ngrok-free.app") or InitiatingProcessFileName =~ "ngrok.exe"
| where DeviceName in (DiscordHosts)
| project TimeGenerated, DeviceName, InitiatingProcessFileName, InitiatingProcessCommandLine, RemoteUrl, RemoteIP
| order by TimeGenerated desc;

Hunt 3 is your high-confidence composite: a host exhibiting both behaviors within the same window is almost certainly compromised and should be escalated to IR immediately, not triaged as a routine alert.

Velociraptor VQL Hunt

VQL — Velociraptor
-- Hunt for CikaBika Bot indicators: Ngrok execution, Discord API connections
-- from non-Discord processes, and recently mounted ISO artifacts

-- Part 1: Processes with ngrok or discord-related command lines
SELECT Pid, Name, CommandLine, Exe, Username, CreateTime
FROM pslist()
WHERE CommandLine =~ '(?i)ngrok|discord(app)?\.(com|gg)|discord\.com/api'
  AND Exe !~ '(?i)AppData\\Local\\Discord'

-- Part 2: Live network connections to Discord/Ngrok infrastructure
SELECT Pid, Name, Path, Status, RemoteAddr, RemotePort
FROM netstat()
WHERE RemoteAddr =~ 'discord|ngrok'
  AND Path !~ '(?i)AppData\\Local\\Discord|chrome|msedge|firefox'

-- Part 3: Recently downloaded/mounted disk images in user directories
SELECT FullPath, Size, Mtime, Ctime
FROM glob(globs='C:\\Users\\*\\Downloads\\*.iso')
WHERE Mtime > now() - 604800

For VQL Part 2, note that netstat() remote address matching depends on reverse DNS resolution in your deployment; if unavailable, resolve Discord's published IP ranges and match on those, or pair this with the pslist() output keyed on Pid.

Response & Hardening Script (PowerShell)

The following script is for verified-compromised or at-risk endpoints. It does three things: enumerates suspect processes and connections, kills/quarantines Ngrok and unknown Discord-connected processes, and applies a firewall-level block on Ngrok endpoints. Review before running — it takes destructive action on matching processes.

PowerShell
# CikaBika Bot response and hardening script - run elevated, review before execution
# Step 1: Inventory - find non-Discord processes with Discord/Ngrok connections
Write-Host "=== Inventory: suspicious processes talking to Discord/Ngrok ===" -ForegroundColor Cyan
$suspectConns = Get-NetTCPConnection -State Established -ErrorAction SilentlyContinue |
    Where-Object { $_.RemotePort -in 443, 80 } |
    ForEach-Object {
        $proc = Get-Process -Id $_.OwningProcess -ErrorAction SilentlyContinue
        if ($proc -and $proc.Name -notin @('Discord','chrome','msedge','firefox','brave','opera','svchost','teams','slack')) {
            try {
                $rdns = ([System.Net.Dns]::GetHostEntry($_.RemoteAddress)).HostName
            } catch { $rdns = 'unresolved' }
            if ($rdns -match 'discord|ngrok') {
                [PSCustomObject]@{
                    PID = $_.OwningProcess
                    Process = $proc.Name
                    Path = $proc.Path
                    RemoteIP = $_.RemoteAddress
                    RemoteHost = $rdns
                }
            }
        }
    }
$suspectConns | Format-Table -AutoSize

# Step 2: Kill ngrok processes and quarantine the binary
Write-Host "=== Terminating ngrok processes ===" -ForegroundColor Yellow
Get-Process -Name 'ngrok' -ErrorAction SilentlyContinue | ForEach-Object {
    Write-Host "Killing ngrok PID $($_.Id) at $($_.Path)"
    $_.Path | Out-File -Append "$env:TEMP\cikabika_quarantine_paths.txt"
    Stop-Process -Id $_.Id -Force
}

# Step 3: Block Ngrok domains at Windows Firewall (defense-in-depth; DNS filter preferred)
Write-Host "=== Adding firewall blocks for ngrok endpoints ===" -ForegroundColor Yellow
New-NetFirewallRule -DisplayName 'Block Ngrok Outbound (CikaBika IR)' -Direction Outbound `
    -Action Block -RemoteAddress (Resolve-DnsName 'ngrok.io' -Type A -ErrorAction SilentlyContinue | ForEach-Object IPAddress) `
    -ErrorAction SilentlyContinue | Out-Null

# Step 4: Check for persistence - Run keys and scheduled tasks referencing suspect paths
Write-Host "=== Persistence audit ===" -ForegroundColor Cyan
Get-ItemProperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Run',
    'HKLM:\Software\Microsoft\Windows\CurrentVersion\Run' -ErrorAction SilentlyContinue |
    Out-File "$env:TEMP\cikabika_runkeys.txt"
Get-ScheduledTask | Where-Object {
    $_.Actions.Execute -match 'ngrok|Temp\\|AppData\\Local\\Temp'
} | Format-Table TaskName, TaskPath, @{N='Action';E={$_.Actions.Execute}} -AutoSize

# Step 5: Collect mounted ISO evidence (do not dismount before imaging if IR is ongoing)
Write-Host "=== Mounted disk images ===" -ForegroundColor Cyan
Get-DiskImage -ErrorAction SilentlyContinue | Where-Object Attached |
    Select-Object ImagePath, DevicePath | Format-Table -AutoSize

Write-Host "DONE. Evidence logged to $env:TEMP\cikabika_*.txt - preserve before remediation." -ForegroundColor Green

Remediation

There is no patch for CikaBika Bot — remediation is eradication plus control hardening.

Eradicate (confirmed-compromised hosts):

  1. Isolate the endpoint from the network immediately (EDR network isolation or physical disconnect). Discord C2 means the operator is likely receiving real-time telemetry; every minute of delay is more exfiltrated data.
  2. Preserve evidence before cleanup — capture memory if feasible; the Rust implant's hardcoded Discord bot token and guild ID are recoverable from memory/strings and are valuable for scoping what data was exposed and for reporting the bot to Discord Trust & Safety for takedown.
  3. Identify the full implant footprint: original disk image file, extracted lure, dropped payload path, persistence mechanism (Run key, scheduled task), and any Ngrok binary/config (ngrok.yml typically in user profile or beside the binary).
  4. Rebuild rather than clean for any host with confirmed interactive operator access via Ngrok tunnel. An operator with hands-on-keyboard time can install persistence you will not find.
  5. Reset credentials for any user of the compromised host, prioritizing tokens reachable from the endpoint (browser-stored creds, session cookies, SSH keys, cloud CLI tokens).

Harden (fleet-wide):

  1. Block Discord at the egress layer if the business does not require it. This is the single highest-leverage control against this entire malware family. If Discord is required, alert on non-Discord-client processes connecting to its API domains.
  2. Block or alert on Ngrok fleet-wide, with carve-outs only for named developer machines. Add *.ngrok.io, *.ngrok-free.app, and *.ngrok.app to DNS filtering blocklists; detect the binary via AppLocker/WDAC hash or publisher rules.
  3. Disable auto-mount for ISO/IMG/VHD files via Group Policy or Explorer association changes, or at minimum ensure attachments of these types are stripped or detonated at the email gateway. Microsoft's 2022 change blocking MOTW-flagged macros does not cover all extraction paths from mounted images — do not rely on it.
  4. Enforce Attack Surface Reduction rules, particularly "Block executable files from running unless they meet a prevalence, age, or trusted list criterion," which is effective against freshly compiled Rust droppers.
  5. Restrict PowerShell and script execution via constrained language mode/AppLocker for standard users, and deploy the Sigma/KQL detections above into your SIEM with Hunt 3 (Discord + Ngrok correlation) as a high-severity analytic.
  6. User awareness: brief staff on the fake-document-in-disk-image lure specifically — it is distinct enough from generic phishing advice to warrant its own one-slide example.

Related Resources

Security Arsenal Incident Response Services AlertMonitor Platform Book a SOC Assessment incident-response Intel Hub

Is your security operations ready?

Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.