T1041 Sumo Logic CSE · Sumo

Detect Exfiltration Over C2 Channel in Sumo Logic CSE

Adversaries may steal data by exfiltrating it over an existing command and control channel. Stolen data is encoded into the normal communications channel using the same protocol as command and control communications. This technique is particularly challenging to detect because exfiltration traffic is indistinguishable from regular C2 beaconing — adversaries embed collected data inside HTTP POST bodies, DNS query labels, custom binary protocol frames, or other C2 protocol fields. Detection requires correlating large outbound data volumes, repeated connection patterns, and sensitive file access rather than inspecting payload content. Real-world actors observed using this technique include Scattered Spider (VMware vCenter via Teleport), OilRig/APT34 (OneDrive-based C2), and malware families PoetRAT, Machete, Shark, StrelaStealer, BeaverTail, SLOTHFULMEDIA, Sagerunex, and Bandook. The technique spans Windows, Linux, macOS, and ESXi platforms and commonly exploits encrypted C2 channels (HTTPS, DNS-over-HTTPS) to blend with legitimate traffic.

MITRE ATT&CK

Tactic
Exfiltration
Technique
T1041 Exfiltration Over C2 Channel
Canonical reference
https://attack.mitre.org/techniques/T1041/

Sumo Detection Query

Sumo Logic CSE (Sumo)
sql
(_sourceCategory=*sysmon* OR _sourceCategory=*windows* OR _sourceCategory=*endpoint*) EventCode=3 Initiated=true
| where !(DestinationIp matches "10.*"
    OR DestinationIp matches "172.16.*" OR DestinationIp matches "172.17.*"
    OR DestinationIp matches "172.18.*" OR DestinationIp matches "172.19.*"
    OR DestinationIp matches "172.20.*" OR DestinationIp matches "172.21.*"
    OR DestinationIp matches "172.22.*" OR DestinationIp matches "172.23.*"
    OR DestinationIp matches "172.24.*" OR DestinationIp matches "172.25.*"
    OR DestinationIp matches "172.26.*" OR DestinationIp matches "172.27.*"
    OR DestinationIp matches "172.28.*" OR DestinationIp matches "172.29.*"
    OR DestinationIp matches "172.30.*" OR DestinationIp matches "172.31.*"
    OR DestinationIp matches "192.168.*" OR DestinationIp matches "127.*")
| where Image matches "*\\powershell.exe" OR Image matches "*\\pwsh.exe"
    OR Image matches "*\\cmd.exe" OR Image matches "*\\wscript.exe"
    OR Image matches "*\\cscript.exe" OR Image matches "*\\mshta.exe"
    OR Image matches "*\\rundll32.exe" OR Image matches "*\\regsvr32.exe"
    OR Image matches "*\\certutil.exe" OR Image matches "*\\python.exe"
    OR Image matches "*\\python3.exe" OR Image matches "*\\curl.exe"
    OR Image matches "*\\wget.exe" OR Image matches "*\\bitsadmin.exe"
    OR Image matches "*\\nc.exe" OR Image matches "*\\ncat.exe"
| count as ConnectionCount, dcount(DestinationIp) as UniqueRemoteIPs,
    values(DestinationIp) as RemoteIPList,
    values(DestinationPort) as RemotePorts,
    min(_messageTime) as FirstSeenMs,
    max(_messageTime) as LastSeenMs
    by Computer, User, Image, CommandLine
| where ConnectionCount > 10
| eval SessionDurationSec = (LastSeenMs - FirstSeenMs) / 1000
| eval AvgBeaconIntervalSec = if(ConnectionCount > 1 AND SessionDurationSec > 0,
    round(SessionDurationSec / (ConnectionCount - 1), 0), null)
| eval IsRegularBeacon = if(AvgBeaconIntervalSec > 0 AND AvgBeaconIntervalSec < 300, 1, 0)
| eval IsHighFrequency = if(ConnectionCount > 50, 1, 0)
| eval IsSingleDestination = if(UniqueRemoteIPs == 1, 1, 0)
| eval ExfilScore = IsRegularBeacon + IsHighFrequency + IsSingleDestination
| where ExfilScore >= 2
| formatDate(fromMillis(FirstSeenMs), "yyyy-MM-dd HH:mm:ss") as FirstSeen
| formatDate(fromMillis(LastSeenMs), "yyyy-MM-dd HH:mm:ss") as LastSeen
| fields Computer, User, Image, CommandLine, ConnectionCount, UniqueRemoteIPs,
    RemoteIPList, RemotePorts, AvgBeaconIntervalSec, IsRegularBeacon,
    IsHighFrequency, IsSingleDestination, ExfilScore, FirstSeen, LastSeen
| sort by ExfilScore desc, ConnectionCount desc
high severity medium confidence

Replicates the SPL beacon-scoring logic in Sumo Logic against Sysmon EventCode 3 records. Computes average inter-connection interval to detect regular C2 beaconing, flags high-frequency connection bursts, and scores single-destination patterns — all three are hallmarks of implants embedding exfiltrated data inside outbound C2 protocol frames. Combine with a Sumo Logic Cloud SIEM (CSE) correlation rule on file-read signals for full collect-then-exfil coverage.

Data Sources

Sumo Logic Windows Collector (Sysmon Operational, EventCode 3)Sumo Logic Cloud SIEM Enterprise (CSE) normalized network schemaSumo Logic Installed Collector with Windows Event Log source

Required Tables

Sysmon Operational Event Log (EventCode 3 — Network Connection)

False Positives & Tuning

  • Windows Update and antivirus signature update services polling a single CDN endpoint at a fixed schedule will achieve high IsRegularBeacon and IsSingleDestination scores — exclude known update agent process names and Microsoft/vendor IP ranges from the destination filter
  • Automated test frameworks using curl or Python scripts that hammer a single staging server endpoint during CI pipeline runs — filter by known CI runner hostnames or service account names in the User field
  • IT monitoring agents such as Zabbix, PRTG, or Nagios NRPE that beacon to a single management server at sub-5-minute intervals — add monitoring agent process names to a suppression list or exclude their management server IPs
Download portable Sigma rule (.yml)

Other platforms for T1041


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1PowerShell HTTP POST Exfiltration Over Simulated C2 Channel

    Expected signal: Sysmon Event ID 1: Process Create — powershell.exe with CommandLine containing Invoke-WebRequest, -Method POST, and http://127.0.0.1:8080/beacon. Sysmon Event ID 3: Network Connection — powershell.exe connecting to 127.0.0.1:8080. PowerShell ScriptBlock Log Event ID 4104 capturing the full script including the base64-encoded data construction. DeviceNetworkEvents in MDE: ConnectionSuccess or ConnectionFailed (depending on listener) with InitiatingProcessFileName=powershell.exe, RemoteIP=127.0.0.1, RemotePort=8080.

  2. Test 2curl Multi-Connection Data Exfiltration Beaconing Pattern

    Expected signal: 25x Sysmon Event ID 3: Network Connection events with Image=curl.exe (or full path), DestinationIp=127.0.0.1, DestinationPort=8080, Initiated=true. DeviceNetworkEvents: 25 ConnectionSuccess/ConnectionFailed records for curl.exe to 127.0.0.1:8080. The aggregate ConnectionCount of 25 crosses the MinConnectionCount=20 threshold in the KQL detection query. SPL ExfilScore increases as IsHighFrequency becomes 1 once count exceeds 20.

  3. Test 3DNS Data Exfiltration via Encoded Subdomain Labels

    Expected signal: Sysmon Event ID 22 (DNS Query): 10 DNS query events with QueryName containing 40-55 character first labels encoding the Base64 data, initiated by nslookup.exe. The DNS hunting query triggers on LongestLabel > 40 and QueryCount > 5 from the same process. Windows DNS Client Event Log may also record the queries. The queries will fail to resolve (no listener on 127.0.0.1:53) but the Sysmon Event ID 22 fires on the query attempt regardless.

  4. Test 4Linux curl Data Exfiltration via HTTP POST

    Expected signal: auditd: SYSCALL records for execve (curl), connect() calls to 127.0.0.1:8080, and read() on /etc/hostname and /proc. Sysmon for Linux Event ID 3: Network Connection events for curl process. Linux audit log (if auditd configured with network rules): socket()/connect() syscalls from curl with destination 127.0.0.1:8080. CommonSecurityLog or Syslog in Sentinel if auditd logs are forwarded: 15 connection records with consistent user-agent string indicating automated beaconing. The deceptive Windows user-agent string on a Linux process is itself anomalous.

Unlock Pro Content

Get the full detection package for T1041 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections