T1071 Splunk · SPL

Detect Application Layer Protocol in Splunk

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/

SPL Detection Query

Splunk (SPL)
spl
index=proxy OR index=firewall OR index=network sourcetype IN ("stream:tcp", "pan:traffic", "cisco:asa", "squid")
  dest_port IN (80, 443, 53, 21, 25, 110, 143, 8080, 8443, 1883, 5222)
  action=allowed
  NOT (dest_ip="10.*" OR dest_ip="172.16.*" OR dest_ip="192.168.*" OR dest_ip="127.*")
| bin _time span=5m
| stats count as ConnectionCount, dc(dest_ip) as UniqueDestIPs, dc(dest_port) as UniquePorts, values(dest_port) as Ports, earliest(_time) as FirstSeen, latest(_time) as LastSeen by src_ip, process_name
| where ConnectionCount > 10
| eval Duration=LastSeen-FirstSeen
| eval AvgInterval=if(ConnectionCount>1, Duration/(ConnectionCount-1), 0)
| where AvgInterval > 1 AND AvgInterval < 3600
| eval BeaconScore=case(
    (AvgInterval >= 55 AND AvgInterval <= 65) OR (AvgInterval >= 295 AND AvgInterval <= 305), "high",
    1=1, "medium")
| table FirstSeen, LastSeen, src_ip, process_name, ConnectionCount, UniqueDestIPs, Ports, AvgInterval, BeaconScore
| sort - ConnectionCount
medium severity medium confidence

Detects potential C2 beaconing across application layer protocols by analyzing outbound connection patterns from proxy, firewall, or network stream logs. Groups connections into 5-minute windows and calculates the average interval between connections to identify periodic callback patterns. Common C2 frameworks like Cobalt Strike, Sliver, and Mythic beacon at regular intervals over HTTP, DNS, FTP, or pub/sub protocols.

Data Sources

Network Traffic: Network Connection CreationNetwork Traffic: Network Traffic FlowProxy LogsFirewall Logs

Required Sourcetypes

stream:tcppan:trafficcisco:asasquid

False Positives & Tuning

  • Legitimate software performing periodic update checks (Windows Update, antivirus definitions, NTP)
  • Monitoring and heartbeat agents that maintain persistent connections to cloud management platforms
  • Chat and collaboration applications (Slack, Teams, Zoom) with long-lived WebSocket or polling connections
  • IoT devices communicating via MQTT to cloud brokers on regular intervals
Download portable Sigma rule (.yml)

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.

  1. 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.

  2. 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.

  3. 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.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections