← All Threat Hunting ReportsThreat Hunting Exercise

Threat Hunting Exercise: Analyzing Firewall Outbound C2 Beaconing over Non-Standard Ports Dataset

This hunt pivots to perimeter firewall telemetry: a simulated next-gen firewall dataset (fw_outbound_beacon_2022-04-02T000000.json) capturing T1071.001: Application Layer Protocol - Web Protocols and T1571: Non-Standard Port, where an implant on an internal workstation beacons out to an external IP on an uncommon TCP port at a fixed interval, blending in with normal outbound traffic volume but not with normal outbound traffic pattern.

Step 1: Hypothesis Formation

Hypothesis: A compromised host establishes recurring outbound connections to a single external IP on a non-standard port (e.g., TCP/8443, TCP/4444, TCP/50050) at a highly regular interval (jitter under 5%), with a small, consistent payload size per session - consistent with C2 check-in beaconing rather than human-driven browsing or a known application. Indicators:

Null Hypothesis: The traffic is a legitimate monitoring/heartbeat agent (e.g., RMM tool, backup agent, license-check service) that happens to use a non-standard port. Invalidate via asset inventory cross-check - confirm no approved software on the host is documented to use that destination/port pair, and confirm absence of a matching DNS lookup for a known vendor domain.

Rationale: Firewall logs are often the last line of visibility when an attacker uses raw sockets or a custom C2 protocol to evade proxy-based and DNS-based detections; this hunt validates whether flow-level regularity analysis on firewall data alone can surface beaconing without host or DNS telemetry.

Step 2: Data Sources and Scope

Step 3: Key Findings

Parsed events (9 shown) confirm 347 outbound sessions from WKS-FIN-0231 to a single external IP over the 6-hour window, at a near-perfect 60-second interval.

Timestamp (UTC)Src IPDest IP:PortBytes Out/InIOC/Why Suspicious?
2022-04-02 00:00:1210.20.14.87185.220.101.47:8443412 / 128Baseline beacon: small, consistent payload - check-in size, not content transfer.
2022-04-02 00:01:1110.20.14.87185.220.101.47:8443409 / 13159-second gap from prior - within 2% jitter of a fixed 60s interval.
2022-04-02 00:02:1310.20.14.87185.220.101.47:8443415 / 126Third consecutive near-identical session - pattern strengthens.
2022-04-02 00:05:0910.20.14.87185.220.101.47:84433,884 / 512Anomalous spike: one session ~9x larger than baseline - likely tasking/command retrieval, not a routine check-in.
2022-04-02 00:06:1210.20.14.87185.220.101.47:8443411 / 129Reverts to baseline size immediately after the spike - consistent with C2 receiving a command then resuming idle beaconing.
-10.20.14.87(proxy log)N/AProxy correlation IOC: zero matching entries in proxy logs for this destination - traffic bypassed the enforced web proxy, contrary to network egress policy.
-10.20.14.87(DNS log)N/ADNS correlation IOC: no DNS query for 185.220.101.47's PTR or any domain resolving to it - direct-to-IP connection, atypical for legitimate SaaS/RMM traffic.
2022-04-02 05:58:4710.20.14.87185.220.101.47:8443410 / 127Beaconing continues unbroken for the full 6-hour window - 347 total sessions, average interval 60.1s, stdev 1.8s.
2022-04-02 05:59:0010.20.14.87(WHOIS/ASN)N/ADestination IP resolves to a bulletproof-hosting ASN with no legitimate business services advertised - corroborates malicious infrastructure.

Validation:

Step 4: Recommendations & Next Steps

Hypothesis confirmed - regular-interval, proxy-bypassing beaconing to a single external IP on a non-standard port, consistent with active C2 check-in traffic!