The Check-in Nobody Scheduled: Finding a C2 Beacon in Proxy Logs
The challenge
A Brightwater laptop runs hidden malware. Find the laptop that calls out on a timer. Name the server the malware checks in with.
What you'll learn
- Explain what C2 beaconing is and why implants add jitter
- Spot a beacon by its interval, constant size and single source host
- Tell a beacon from legitimate periodic traffic such as a dashboard refresh
- Read web proxy fields: source, method, host, path, sizes, user agent, category
- List the response: block, isolate, and hunt for the same beacon elsewhere
Skills tested
Prerequisites
- What a web proxy is
- Reading tabular log events
How it works
Once malware is running, its operator needs a way to send it orders. Most implants do not keep a connection open: they beacon, waking up on a timer to ask the command-and-control (C2) server "anything for me?", then going back to sleep. Over HTTPS that looks like ordinary web traffic (MITRE ATT&CK T1071.001).
Every C2 framework (Cobalt Strike, Sliver, Mythic) exposes two settings: the sleep (here 60 seconds) and the jitter, a random variation so the gap is never exactly the same and a naive "every N seconds" rule misses it. Cobalt Strike's malleable profiles also dress the requests up; a public profile makes them look like downloads of jquery-3.3.1.min.js and posts results to jquery-3.3.2.min.js.
Hunters still catch it, because a beacon is too regular to be human: the gaps cluster tightly around one value, the request and reply sizes barely change until a task arrives, and only one internal host talks to that destination. Tools such as RITA score Zeek logs on exactly these signals.
Common mistakes
- Answering brightwater.dashhub.example. Filtered, its Δ column reads exactly 60 seconds every time: the most regular traffic in the log. That is the NOC wall screen (
svc-noc-wall, a service account, not anyone's laptop) refreshing Brightwater's own ops dashboard. Periodic alone is not malicious; compare the three tells. Jitter: a browser timer is exact, a C2 sleep wobbles (57 to 63 seconds here). Size: the dashboard's reply changes every time because the data does, the beacon's is always 5543 bytes until a task arrives. User agent: the kiosk really runs Chrome, while the beacon claims Chrome on a laptop whose owner browses with Edge. - Answering px.adtrk-sync.example. It is the busiest odd-looking host, but its requests come in bursts of a few seconds, right after m.duarte opens a news article: ad pixels, not a timer.
- Answering dl.pdfquick-convert.example. A newly registered domain serving an .exe deserves a look, but it is one download and then silence. Nothing from 10.40.12.31 repeats.
- Answering outlook.office.com or teams.microsoft.com. Several people use them at irregular times, as people do.
- Answering the laptop. 10.40.12.58 (s.lindahl) is the infected host to isolate; the question asks for the server it reports to.
How to defend against it
- Contain: block
jquery-cdn.exampleat the proxy and DNS, isolate 10.40.12.58, and image it before cleaning. The 31804-byte POST means a task already ran, so find out what it did. - Scope: search every host's history for the domain, its IP and the same request pattern.
- Detect: run beacon analysis (for example RITA on Zeek logs) that scores interval regularity, size regularity and connection count, and alert on destinations first seen in the company and reached by a single host.
- Harden: keep TLS inspection so paths and sizes are visible, restrict which processes may reach the internet, allowlist egress for servers, and let EDR flag unsigned processes making web requests.