Detect Application Layer Protocol in Sumo Logic CSE
Adversaries may communicate using OSI application layer protocols to avoid detection/network filtering by blending in with existing traffic. Commands to the remote system, and often the results of those commands, will be embedded within the protocol traffic between the client and server. Adversaries may utilize many different protocols, including those used for web browsing, transferring files, electronic mail, DNS, or publishing/subscribing. For connections that occur internally within an enclave (such as those between a proxy or pivot node and other nodes), commonly used protocols are SMB, SSH, or RDP.
MITRE ATT&CK
- Tactic
- Command and Control
- Technique
- T1071 Application Layer Protocol
- Canonical reference
- https://attack.mitre.org/techniques/T1071/
Sumo Detection Query
(_sourceCategory=network* OR _sourceCategory=firewall* OR _sourceCategory=proxy*)
| where !(isNull(dst_port))
| where dst_port in ("80","443","53","21","25","110","143","8080","8443","1883","5222")
| where !(dst_ip matches "10.*" or dst_ip matches "172.16.*" or dst_ip matches "172.17.*" or dst_ip matches "172.18.*" or dst_ip matches "172.19.*" or dst_ip matches "172.2*" or dst_ip matches "172.30.*" or dst_ip matches "172.31.*" or dst_ip matches "192.168.*" or dst_ip matches "127.*")
| where isNull(action) or action in ("allowed","accept","permit","Allow")
| timeslice 24h
| count as ConnectionCount, count_distinct(dst_ip) as UniqueDestIPs, first(_messageTime) as FirstSeenMs, last(_messageTime) as LastSeenMs by src_ip, process_name, _timeslice
| where ConnectionCount > 10
| fields - _timeslice
| eval Duration = LastSeenMs - FirstSeenMs
| eval AvgIntervalMs = if(ConnectionCount > 1, Duration / (ConnectionCount - 1), 0)
| where AvgIntervalMs > 1000 and AvgIntervalMs < 3600000
| eval BeaconScore = if((AvgIntervalMs >= 55000 and AvgIntervalMs <= 65000) or (AvgIntervalMs >= 295000 and AvgIntervalMs <= 305000) or (AvgIntervalMs >= 895000 and AvgIntervalMs <= 905000), "high", "medium")
| sort by ConnectionCount Identifies source IPs and processes making repeated outbound connections to external destinations on known application layer protocol ports. Groups network/firewall log data by source IP and process name over a 24-hour timeslice, computing average inter-connection interval in milliseconds. Beacon score is elevated for intervals clustering around 60s, 300s, or 900s — common C2 sleep timers. _messageTime is used for interval calculation as it is Sumo Logic's millisecond-precision ingest timestamp.
Data Sources
Required Tables
False Positives & Tuning
- Automated backup agents (Veeam, Acronis, Carbonite) making periodic outbound connections to cloud storage endpoints over port 443 at fixed backup window intervals will match connection count thresholds
- Corporate endpoint management agents (SCCM, Tanium, Qualys Cloud Agent) regularly checking in to management infrastructure produce repetitive outbound connections with predictable intervals
- SaaS desktop clients with background auto-sync (Dropbox, Box, OneDrive) polling for delta changes at sub-minute intervals accumulate connection counts well above the threshold of 10 per 24 hours
Other platforms for T1071
Testing Methodology
Validate this detection against 3 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 1Multi-Protocol Beaconing Simulation
Expected signal: Sysmon for Linux Event ID 3 (Network Connection) showing curl processes connecting to 127.0.0.1 on ports 80, 443, 53. Firewall logs showing outbound connection attempts.
- Test 2IRC C2 Channel Simulation
Expected signal: Sysmon Event ID 3: Network Connection to port 6667 (IRC). Process creation event for nc/netcat with IRC protocol commands in arguments.
- Test 3HTTP Beaconing with Cobalt Strike User-Agent
Expected signal: Sysmon Event ID 3: Network Connection from powershell.exe to 127.0.0.1:80. Proxy logs showing repeated requests to /pixel.gif with suspicious User-Agent. Sysmon Event ID 1: PowerShell process creation for each iteration.
References (6)
- https://attack.mitre.org/techniques/T1071/
- https://arxiv.org/ftp/arxiv/papers/1408/1408.1136.pdf
- https://www.mandiant.com/resources/blog/unc3524-eye-spy-email
- https://learn.microsoft.com/en-us/defender-endpoint/advanced-hunting-devicenetworkevents-table
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1071/T1071.md
- https://github.com/SigmaHQ/sigma/tree/master/rules/network
Unlock Pro Content
Get the full detection package for T1071 including response playbook, investigation guide, and atomic red team tests.