T1041 CrowdStrike LogScale · LogScale

Detect Exfiltration Over C2 Channel in CrowdStrike LogScale

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/

LogScale Detection Query

CrowdStrike LogScale (LogScale)
cql
#event_simpleName = NetworkConnectIP4
| !cidr(RemoteIP, subnet="10.0.0.0/8")
| !cidr(RemoteIP, subnet="172.16.0.0/12")
| !cidr(RemoteIP, subnet="192.168.0.0/16")
| !cidr(RemoteIP, subnet="127.0.0.0/8")
| !cidr(RemoteIP, subnet="169.254.0.0/16")
| regex("(?i)(powershell\.exe|pwsh\.exe|cmd\.exe|wscript\.exe|cscript\.exe|mshta\.exe|rundll32\.exe|regsvr32\.exe|certutil\.exe|python[23]?\.exe|ruby\.exe|perl\.exe|curl\.exe|wget\.exe|bitsadmin\.exe|ncat?\.exe)", field=ImageFileName)
| groupBy(
    [ComputerName, UserName, ImageFileName, CommandLine],
    function=[
      count(as=ConnectionCount),
      countDistinct(RemoteIP, as=UniqueRemoteIPs),
      collect(RemoteIP, limit=10, as=RemoteIPList),
      collect(RemotePort, limit=10, as=RemotePorts),
      sum(BytesSent, as=TotalBytesSent),
      sum(BytesReceived, as=TotalBytesReceived),
      min(@timestamp, as=FirstSeen),
      max(@timestamp, as=LastSeen)
    ]
  )
| IsHighVolume := if(TotalBytesSent > 1048576, 1, 0)
| IsHighFrequency := if(ConnectionCount > 20, 1, 0)
| IsSingleDestination := if(UniqueRemoteIPs == 1, 1, 0)
| SafeBytesReceived := if(TotalBytesReceived > 0, TotalBytesReceived, 1)
| ExfilRatio := TotalBytesSent / SafeBytesReceived
| HighExfilRatio := if(ExfilRatio > 5.0, 1, 0)
| ExfilScore := IsHighVolume + IsHighFrequency + IsSingleDestination + HighExfilRatio
| ExfilScore >= 2
| SessionDurationSec := (LastSeen - FirstSeen) / 1000
| AvgBeaconIntervalSec := if(ConnectionCount > 1 AND SessionDurationSec > 0,
    round(SessionDurationSec / (ConnectionCount - 1)), null())
| sort(ExfilScore, order=desc)
| select([ComputerName, UserName, ImageFileName, CommandLine, ConnectionCount,
    UniqueRemoteIPs, RemoteIPList, RemotePorts, TotalBytesSent, TotalBytesReceived,
    ExfilRatio, AvgBeaconIntervalSec, IsHighVolume, IsHighFrequency,
    IsSingleDestination, HighExfilRatio, ExfilScore, FirstSeen, LastSeen])
high severity high confidence

CrowdStrike LogScale query using native Falcon NetworkConnectIP4 telemetry to detect C2-channel exfiltration. Groups outbound connections from high-risk processes to public IPs and scores each group on four axes: byte volume (>1 MB), connection frequency (>20), single-destination clustering, and sent/received byte ratio (>5:1 indicates asymmetric upload consistent with exfil). Triggers at a composite score of 2+, matching the KQL detection sensitivity. Pair with a DnsRequest-based hunting query to catch DNS-over-HTTPS exfiltration from the same process tree.

Data Sources

CrowdStrike Falcon Endpoint Detection (EDR) — NetworkConnectIP4 eventsCrowdStrike Falcon Data Replicator (FDR) streaming to LogScaleLogScale with Falcon SIEM Connector

Required Tables

NetworkConnectIP4ProcessRollup2

False Positives & Tuning

  • CrowdStrike Falcon sensor itself (CSFalconService) communicating with Falcon cloud infrastructure — exclude by adding ImageFileName matches for the Falcon sensor binary or CrowdStrike's published cloud IP ranges to the CIDR exclusion filters
  • PowerShell DSC (Desired State Configuration) or Invoke-WebRequest in large-scale configuration management deployments making frequent calls to a single management endpoint — whitelist known management server IPs or SCCM/Ansible controller source IPs
  • Python-based ML or data science workloads downloading training datasets or pushing model artifacts to cloud object storage with high byte-volume ratios — filter by data science workstation hostname patterns or known cloud provider IP CIDR blocks (AWS S3, GCS, Azure Blob)
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