T1071 Elastic Security · Elastic

Detect Application Layer Protocol in Elastic Security

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/

Elastic Detection Query

Elastic Security (Elastic)
eql
sequence by process.entity_id with maxspan=24h
  [network where event.type in ("connection", "start") and
   network.direction == "egress" and
   destination.port in (80, 443, 53, 21, 25, 110, 143, 8080, 8443, 1883, 5222) and
   not cidrmatch(destination.ip, "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "127.0.0.0/8", "169.254.0.0/16") and
   process.name != null
  ] with runs=10
high severity medium confidence

Detects processes establishing 10 or more repeated outbound connections to public IPs on application layer protocol ports within a 24-hour window. The EQL sequence with runs=10 flags processes exhibiting repeated connection behaviour consistent with C2 beaconing over T1071 protocols. For full interval-based beacon scoring, supplement with an ES|QL aggregation query against the same index pattern.

Data Sources

Elastic Endpoint Security agentPacketbeat network captureNDR ingested via Elastic Agent

Required Tables

logs-endpoint.events.network-*logs-network_traffic.*packetbeat-*

False Positives & Tuning

  • Monitoring agents with fixed heartbeat intervals (Datadog, New Relic, Dynatrace) legitimately connect to cloud endpoints at 60s or 300s intervals, producing high beacon scores against exactly those thresholds
  • Browser processes (chrome.exe, firefox.exe, msedge.exe) performing background sync, telemetry reporting, or extension update checks to vendor cloud infrastructure at regular intervals
  • Enterprise software update clients and antivirus daemons polling update servers on fixed schedules across ports 80, 443, or 8080 from every managed endpoint simultaneously
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