1---2name: hunting-for-command-and-control-beaconing3description: Detect C2 beaconing patterns in network traffic using frequency analysis, jitter detection, and domain reputation to identify compromised endpoints communicating with adversary infrastructure.4license: Apache-2.05---6
7# Hunting for Command and Control Beaconing
8
9## When to Use
10
11- When proactively hunting for compromised systems in the network
12- After threat intel indicates C2 frameworks targeting your industry
13- When investigating periodic outbound connections to suspicious domains
14- During incident response to identify active C2 channels
15- When DNS query logs show unusual patterns to specific domains
16
17## Prerequisites
18
19- Network proxy/firewall logs with full URL and timing data
20- DNS query logs (passive DNS, DNS server logs, or Sysmon Event ID 22)
21- Zeek/Bro network connection logs or NetFlow data
22- SIEM with statistical analysis capabilities (Splunk, Elastic)
23- Threat intelligence feeds for domain/IP reputation
24
25## Workflow
26
271. **Identify Beaconing Characteristics**: Define what constitutes beaconing (regular intervals, small payload sizes, consistent destinations, jitter patterns).
282. **Collect Network Telemetry**: Aggregate proxy logs, DNS queries, and connection metadata for analysis.
293. **Apply Frequency Analysis**: Identify connections with regular intervals using statistical methods (standard deviation, coefficient of variation).
304. **Filter Known-Good Traffic**: Exclude legitimate periodic traffic (Windows Update, AV updates, heartbeat services, NTP).
315. **Analyze Domain/IP Reputation**: Check identified beaconing destinations against threat intel, WHOIS data, and certificate transparency logs.
326. **Investigate Endpoint Context**: Correlate beaconing activity with process creation, user context, and file system changes on source endpoints.
337. **Confirm and Respond**: Validate C2 activity, block communication, and initiate incident response.
34
35## Key Concepts
36
37| Concept | Description |
38|---------|-------------|
39| T1071 | Application Layer Protocol (HTTP/HTTPS/DNS C2) |
40| T1071.001 | Web Protocols (HTTP/S beaconing) |
41| T1071.004 | DNS (DNS tunneling C2) |
42| T1573 | Encrypted Channel |
43| T1572 | Protocol Tunneling |
44| T1568 | Dynamic Resolution (DGA, fast-flux) |
45| T1132 | Data Encoding in C2 |
46| T1095 | Non-Application Layer Protocol |
47| Beacon Interval | Time between C2 check-ins |
48| Jitter | Random variation in beacon interval |
49| DGA | Domain Generation Algorithm |
50| Fast-Flux | Rapidly changing DNS resolution |
51
52## Tools & Systems
53
54| Tool | Purpose |
55|------|---------|
56| RITA (Real Intelligence Threat Analytics) | Automated beacon detection in Zeek logs |
57| Splunk | Statistical beacon analysis with SPL |
58| Elastic Security | ML-based anomaly detection for beaconing |
59| Zeek/Bro | Network connection metadata collection |
60| Suricata | Network IDS with JA3/JA4 fingerprinting |
61| VirusTotal | Domain and IP reputation checking |
62| PassiveDNS | Historical DNS resolution data |
63| Flare | C2 profile detection |
64
65## Common Scenarios
66
671. **Cobalt Strike Beacon**: HTTP/HTTPS beaconing with configurable sleep time and jitter to malleable C2 profiles.
682. **DNS Tunneling C2**: Data exfiltration and command receipt via encoded DNS TXT/CNAME queries to attacker-controlled domains.
693. **Sliver C2 over HTTPS**: Modern C2 framework using HTTPS with configurable beacon intervals and domain fronting.
704. **DGA-based C2**: Malware generating random domains daily, with adversary registering upcoming domains for C2.
715. **Legitimate Service Abuse**: C2 over legitimate cloud services (Azure, AWS, Slack, Discord, Telegram).
72
73## Output Format
74
75```
76Hunt ID: TH-C2-[DATE]-[SEQ]
77Source IP: [Internal IP]
78Source Host: [Hostname]
79Destination: [Domain/IP]
80Protocol: [HTTP/HTTPS/DNS/Custom]
81Beacon Interval: [Average seconds]
82Jitter: [Percentage]
83Connection Count: [Total connections]
84Data Volume: [Bytes sent/received]
85First Seen: [Timestamp]
86Last Seen: [Timestamp]
87Domain Age: [Days]
88TI Match: [Yes/No - source]
89Risk Level: [Critical/High/Medium/Low]
90```