☼
⌃
☰

Beaconing

Table of Contents

Periodic outbound communication from a compromised host to a Command and Control server. The implant checks in at regular intervals to receive commands and exfiltrate data. The regularity of this traffic — the beacon interval — is the primary detection signal.

Related: Command and Control Server Command and Control Detection Network Traffic Analysis Zeek RITA Botnet Malware Analysis

Characteristics

Interval and jitter

A pure fixed-interval beacon (every 60 seconds exactly) is trivially detectable. Sophisticated implants add jitter — random variation around the base interval — to appear more like organic traffic.

TEXT
Fixed interval:  C2 every 60s exactly → high beacon score in RITA
Jittered:        C2 every 45–75s (±25%) → harder to detect
Sleep callback:  beacon only when idle, user not present

Protocol abuse

Beacons hide in permitted protocols to blend with legitimate traffic:

Protocol Technique Why it works
HTTP/S Requests to C2 domain over port 80/443 Allowed outbound by most firewalls
DNS Encode data in query subdomains DNS is rarely inspected or blocked
HTTPS with domain fronting Use CDN hostname to hide true C2 CDN domains are allowlisted
ICMP Data in echo request/reply payload Often uninspected
SMB Named pipes over lateral movement path Internal only

Detection

Statistical beaconing detection — RITA

RITA (Real Intelligence Threat Analytics) analyses Zeek connection logs and scores traffic by beaconing regularity. A high beacon score = connection to the same external IP at suspiciously consistent intervals.

TEXT
RITA indicators:
— High beacon score (0.9+ is very suspicious)
— Same source/destination IP pair, same port
— Consistent connection duration
— Low variance in bytes transferred per session

See RITA and Command and Control Detection for workflow.

Manual detection in Zeek/Brim

TEXT
# In conn.log — look for repeated connections to same destination
_path == "conn" | count() by id.orig_h, id.resp_h, id.resp_p | sort -r count

# Long-duration connections (persistent implant keeping session open)
_path == "conn" | duration > 1h | sort -r duration

# Consistent small packet sizes (command polling)
_path == "conn" | where orig_bytes < 500 | count() by id.resp_h | sort -r count

DNS beaconing indicators

TEXT
# High-entropy subdomain queries (DGA or DNS tunnelling)
_path == "dns" | len(query) > 50

# Unusually high DNS query rate to same domain
_path == "dns" | count() by query | sort -r count

# NXDOMAIN flood (DGA domain generation)
_path == "dns" | rcode_name == "NXDOMAIN" | count() by id.orig_h

Splunk detection

SPLUNK
# Find hosts with consistent outbound connection intervals
index=network sourcetype=zeek:conn
| bin _time span=1m
| stats count by _time, id_orig_h, id_resp_h
| eventstats stdev(count) as stddev by id_orig_h, id_resp_h
| where stddev < 2
| table id_orig_h, id_resp_h, stddev

Evasion Techniques

Attackers use these to avoid detection — understanding them helps tune detection:

TEXT
— Jitter: randomise the interval (±20–50%)
— Sleep: beacon only during business hours to blend with user traffic
— Domain fronting: route through legitimate CDN (Cloudflare, AWS)
— Malleable C2 profiles (Cobalt Strike): customise HTTP headers,
  URI patterns, and user-agents to mimic legitimate traffic
— Fast-flux DNS: rotate C2 IP rapidly to evade IP blocklists
— Protocol mimicry: make beacon traffic look like known-good app

Tips

  • Beaconing is best detected statistically — RITA and similar tools are far more effective than signature-based approaches because jitter defeats exact-interval matching
  • DNS beaconing is particularly dangerous because DNS traffic is rarely logged in detail at the host level — ensure DNS queries are captured in network logs (Zeek) not just at the endpoint
  • A host that beacons during off-hours when no user is logged in is a higher-confidence finding than one beaconing during business hours
  • Baseline normal traffic first — some legitimate software (update checkers, telemetry, monitoring agents) also beacons at regular intervals; suppress known-good patterns before hunting