Command & Control
Command & Control (C2 or C&C) is the channel through which an implant receives orders and returns data to the operator. This page treats it with Red Team / Blue Team parity: how channels and C2 behavior are designed conceptually —to emulate them in an authorized exercise and to recognize them when analyzing a sample— and how they’re detected, their indicators (IOCs) extracted, and cut. C2 is MITRE ATT&CK tactic TA0011 and the point in the kill chain where the defender has the most leverage: cutting it cuts the adversary’s control.
sequenceDiagram
participant I as Implant
participant C as C2 server
loop Periodic beaconing (with jitter)
I->>C: check-in (HTTPS / DNS)
C-->>I: task (command)
I->>C: result
end
Threat model
Section titled “Threat model”The implant has to talk to the operator across egress, proxy, TLS inspection, and NDR without standing out. The adversary solves this by blending with legitimate traffic and spacing out communications; the defender catches it by what that traffic can’t fully hide: its periodicity, its destination, and its correlation with an anomalous process on the endpoint.
Red Team — C2 design (conceptual)
Section titled “Red Team — C2 design (conceptual)”Channels (how traffic blends in)
Section titled “Channels (how traffic blends in)”- HTTP/HTTPS — the most common; camouflaged among web traffic (sometimes domain fronting / CDN).
- DNS — data in queries/responses; slow but usually allowed (see DNS attacks).
- Legitimate protocols — Slack/Telegram/Discord/GitHub/cloud services as a carrier (“C2 over trusted”).
- Dead drop — fetching orders from public profiles or pastes (social media, pastebin).
- P2P — serverless botnets, more resistant to takedown.
The principle: the more the destination and shape of the traffic resemble something expected on the target network, the less it stands out.
Beaconing (the check-in pattern)
Section titled “Beaconing (the check-in pattern)”The implant polls the C2 periodically (“beacon”). Beacon design balances stealth and control:
- Interval (sleep) + random jitter to break exact periodicity.
- Small, similarly sized check-ins when there’s no pending command.
- A long interval evades better but gives the operator less interactivity.
That same regular pattern is, for the blue team, one of the most detectable behavioral signatures (see below).
Malleable profiles and mimicry
Section titled “Malleable profiles and mimicry”Modern frameworks let you model the traffic (headers, URIs, User-Agent, request shape) to imitate a real service —malleable C2 profiles— and run in memory (BOFs, in-process post-ex) to leave few disk artifacts. It’s the union of C2 and evasion (see Defense evasion).
Infrastructure resilience
Section titled “Infrastructure resilience”- Redirectors — layers (e.g. CDN/trusted categories) that hide the real server.
- DGA — the implant generates pseudo-random domains by date → hard to pre-block.
- Fast-flux — rapid rotation of IPs/domains to resist takedown.
Frameworks the red team uses (reference)
Section titled “Frameworks the red team uses (reference)”Authorized exercises use ready-made C2 frameworks: Cobalt Strike (commercial, the de facto standard), Sliver, Mythic, Havoc, Metasploit/Meterpreter. Recognizing their artifacts and default profiles is also blue-team work: their leaks and open-source maturity have spread these capabilities to attackers of every level.
Blue Team — detection
Section titled “Blue Team — detection”On the network (the strongest lever against C2):
- Beacon analysis: traffic periodicity in NDR/SIEM (RITA, Zeek, Arkime).
- Destinations to newly registered, rare, or low-reputation domains.
- DNS: long/random subdomains, anomalous TXT, high volume (tunneling/DGA).
- TLS: JA3/JA3S of known families, self-signed/anomalous certificates.
- C2 IOCs (domains/IPs) from threat intel → block at DNS/firewall/proxy.
On the endpoint:
- Unusual process with periodic outbound connections (EDR + Sysmon event 3).
- Correlation: the same process that persists (persistence) and talks to a fixed destination.
Telemetry
Section titled “Telemetry”Sysmon network connect (3), DNS query (22), process create (1); proxy/DNS/firewall logs; network capture for periodicity analysis (Zeek/RITA). The process↔network correlation in the SIEM is what turns a beacon into an actionable alert.
Extracting the C2 from a sample (analysis)
Section titled “Extracting the C2 from a sample (analysis)”- Static (see static analysis): domains/IPs/URLs in strings or in the encrypted config; after unpacking/decrypting the C2s appear (config extraction, see dynamic).
- Dynamic (see dynamic analysis): run in an isolated lab with a simulated network (INetSim/FakeNet) and capture which destinations it tries to connect to and what it sends.
- DGA: recognizing the algorithm lets you predict and block/sinkhole future domains (see Botnets).
Hardening
Section titled “Hardening”- Egress filtering: default-deny outbound + destination allowlist cuts most C2 (see Firewall and IDS evasion).
- Protective DNS and category filtering (newly registered domains, DGA, tunneling).
- NDR / beacon analysis (RITA/Zeek) + EDR correlating process↔network.
- Threat intel (C2 IOCs) at DNS/firewall/proxy/EDR; TLS inspection where viable.
- After detecting a C2, retrospective hunting: search those IOCs across historical logs fleet-wide.
CVEs and real-world cases
Section titled “CVEs and real-world cases”- C2 over legitimate services: APTs and commodity malware using Telegram/Discord/GitHub/Google Drive as a carrier (MITRE T1102 Web Service, T1071 Application Layer Protocol).
- Cobalt Strike leaks: its massive use by ransomware (Conti, LockBit) and the hunting of its default beacons (profiles, named pipes) are a detection reference.
- DGA: families like Conficker and many botnets; sinkholing DGA domains is a consolidated response technique.
- DNS tunneling (T1071.004) and domain fronting (T1090.004) as egress evasion in real campaigns.
Testing checklist
Section titled “Testing checklist”- Identify the sample’s C2 channel (HTTP/DNS/legitimate/dead drop)
- Extract the C2s (static + config / dynamic with isolated simulated network)
- Does it use DGA? → recognize the algorithm to predict domains
- Characterize the beaconing (interval, jitter, sizes)
- Capture network IOCs (domains/IPs/URLs/JA3)
- Identify the framework if applicable (artifacts/default profile)
- Blue: does beacon analysis (RITA/Zeek) and process↔network correlation catch it?
- Map to MITRE ATT&CK (TA0011 Command and Control)
- Block/sinkhole + retrospective IOC hunting