Detect Exfiltration Over Alternative Protocol in CrowdStrike LogScale
Adversaries may steal data by exfiltrating it over a different protocol than that used for command and control. Data may be sent over FTP, SMTP, DNS, SMB, HTTP/S, or any other network protocol not serving as the primary C2 channel. Adversaries often encrypt or obfuscate these alternate channels. Common tools include curl, ftp.exe, WinSCP, and built-in OS utilities. DNS tunneling (encoding data in DNS query subdomains) is a particularly stealthy variant used by malware families like FrameworkPOS. IaaS and SaaS platforms (Exchange, SharePoint, GitHub, AWS S3) can also serve as exfiltration endpoints via cloud APIs or direct downloads.
MITRE ATT&CK
- Tactic
- Exfiltration
- Canonical reference
- https://attack.mitre.org/techniques/T1048/
LogScale Detection Query
// Branch 1: Exfil tool with upload indicators
#event_simpleName=ProcessRollup2
| ImageFileName = /(?i)(ftp\.exe|curl\.exe|winscp\.exe|pscp\.exe|sftp\.exe|ncftp\.exe|wget\.exe|bitsadmin\.exe|robocopy\.exe)$/
| CommandLine = /(?i)(\s-T\s|--upload-file|\sPUT\s|\sSTOR\s|ftp:\/\/|sftp:\/\/|ftps:\/\/|\s-F\s|--form|smtp:\/\/|smtps:\/\/|--mail-from|--mail-rcpt)/
| rename(field=ComputerName, as="Hostname")
| rename(field=UserName, as="User")
| table(["@timestamp", Hostname, User, ImageFileName, CommandLine, ParentBaseFileName])
| eval DetectionBranch="ExfilToolUpload"
// Branch 2: Outbound connections on exfil ports from non-standard processes
// Run as separate saved search:
// #event_simpleName=NetworkConnectIP4
// | !(RemoteAddressIP4 = /^(10\.|172\.(1[6-9]|2[0-9]|3[01])\.|192\.168\.|127\.)/ )
// | RemotePort in [21, 22, 25, 465, 587, 989, 990, 2121, 2222]
// | !(ImageFileName = /(svchost\.exe|lsass\.exe|services\.exe|Outlook\.exe|thunderbird\.exe|filezilla\.exe)$/i)
// | groupBy([ComputerName, UserName, ImageFileName, RemoteAddressIP4, RemotePort], function=[count(as=Connections), min(@timestamp, as=FirstSeen), max(@timestamp, as=LastSeen)])
// | Connections > 5
// | eval DetectionBranch="SuspiciousOutboundPort"
// | table([FirstSeen, ComputerName, UserName, ImageFileName, RemoteAddressIP4, RemotePort, Connections, DetectionBranch])
// Branch 3: DNS tunneling via long query names
// Run as separate saved search:
// #event_simpleName=DnsRequest
// | DomainName != /(?i)(microsoft\.com|windows\.com|google\.com|amazon\.com|cloudfront\.net)$/
// | DomainName = /^.{51,}/
// | groupBy([ComputerName, UserName, ImageFileName, bucket(field=@timestamp, span=1h)], function=[count(as=DNSQueryCount), max(length(DomainName), as=MaxQueryLen), collect(DomainName, limit=20, as=Domains)])
// | DNSQueryCount > 20 OR MaxQueryLen > 100
// | eval DetectionBranch="DNSTunnelingSuspect"
// | table([@timestamp, ComputerName, UserName, ImageFileName, DNSQueryCount, MaxQueryLen, Domains, DetectionBranch]) CrowdStrike LogScale (Falcon) detection using ProcessRollup2, NetworkConnectIP4, and DnsRequest event types. Branch 1 correlates known exfil tool process executions with upload-indicating command-line arguments. Branch 2 detects outbound connections to FTP/SMTP/SSH ports from non-whitelisted processes. Branch 3 identifies DNS tunneling via long subdomain query strings or high DNS query frequency to a single domain within a one-hour window.
Data Sources
Required Tables
False Positives & Tuning
- Security operations using Falcon's own curl-based tooling for threat intelligence enrichment — exclude by filtering on aid (agent ID) for known security workstations or process parent matching Falcon sensor binaries
- Automated patching systems using bitsadmin.exe to download updates from Microsoft CDN — tune by adding a CommandLine allowlist for known Windows Update URLs and verifying RemotePort is 80/443 not the exfil port list
- DNS queries to internal split-horizon DNS resolvers using long FQDN labels for lab or research environments — add a RemoteAddressIP4 allowlist for internal DNS servers and tune MaxQueryLen threshold based on baseline DnsRequest telemetry
Other platforms for T1048
Testing Methodology
Validate this detection against 5 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.
- Test 1FTP Upload via Windows Built-in FTP Client
Expected signal: Sysmon Event ID 1: Process Create with Image=ftp.exe, CommandLine containing '-s:%TEMP%\df00tech-ftp.txt'. Sysmon Event ID 3: Network Connection attempt to 127.0.0.1:21 from ftp.exe. Sysmon Event ID 11: File create for the ftp script file in TEMP.
- Test 2curl SMTP Exfiltration Simulation
Expected signal: Sysmon Event ID 1: Process Create with Image=curl.exe, CommandLine containing '--mail-from', '--mail-rcpt', '--upload-file', 'smtp://'. Sysmon Event ID 3: Network Connection to 127.0.0.1:25 from curl.exe. The connection will fail but telemetry events fire.
- Test 3DNS Tunneling Simulation via Long Subdomain Queries
Expected signal: Sysmon Event ID 22 (DNS Query): 25 events with QueryName containing long base64-encoded subdomains (>50 characters) under df00tech-test.com. DNS queries will fail to resolve (NXDOMAIN) but the DNS telemetry events are generated by the Sysmon DNS query logging provider.
- Test 4curl Upload via HTTP PUT (Alternative Protocol Exfiltration)
Expected signal: Sysmon Event ID 1: Process Create with Image=curl.exe, CommandLine containing '-X PUT', '-T', and 'http://127.0.0.1:8888'. Sysmon Event ID 3: Network Connection to 127.0.0.1:8888. Sysmon Event ID 11: File Create for exfil_test.txt in TEMP directory.
- Test 5SCP File Exfiltration via OpenSSH (Linux/macOS)
Expected signal: Auditd EXECVE record for scp with arguments including the destination host and port. Network connection event to 198.51.100.1:22. On systems with Sysmon for Linux: Process Create event (EventCode=1) for scp binary, Network Connect (EventCode=3) for the outbound SSH connection attempt.
References (12)
- https://attack.mitre.org/techniques/T1048/
- http://researchcenter.paloaltonetworks.com/2016/10/unit42-oilrig-malware-campaign-updates-toolset-and-expands-targets/
- https://labs.sentinelone.com/20-common-tools-techniques-used-by-macos-threat-actors-malware/
- https://blog.talosintelligence.com/poetrat-update-april-2020/
- https://www.sentinelone.com/labs/frameworkpos-another-pos-threat-using-dns-for-exfiltration/
- https://www.welivesecurity.com/2021/01/26/operation-windmill-eset-research-kobalos/
- https://www.cisa.gov/news-events/cybersecurity-advisories/aa23-352a
- https://www.trendmicro.com/vinfo/us/security/news/ransomware-by-the-numbers/play-ransomware
- https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf
- https://learn.microsoft.com/en-us/defender-endpoint/advanced-hunting-devicenetworkevents-table
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1048/T1048.md
- https://github.com/SigmaHQ/sigma/tree/master/rules/windows/network_connection
Unlock Pro Content
Get the full detection package for T1048 including response playbook, investigation guide, and atomic red team tests.