From Recon to Remediation: The DFIR Series — Part 6: Command and Control

Welcome back to our DFIR series. After gaining a foothold during the Installation phase, attackers shift gears to maintain communication with the compromised system. This is the Command and Control (C2) phase—a critical turning point where adversaries assume control and begin orchestrating the attack remotely.

🌐 What is Command and Control?

In this phase, the attacker establishes a covert channel to issue commands, exfiltrate data, and expand their control. These communications are designed to bypass detection and blend in with legitimate traffic.

Common C2 techniques include:

  • HTTP/S-based callbacks to attacker infrastructure
  • DNS tunneling or beaconing
  • Use of third-party cloud services like Dropbox or Slack
  • Custom or encrypted TCP/UDP protocols

Adversaries often leverage sophisticated C2 frameworks like Cobalt Strike and Sliver:

  • Cobalt Strike: A red teaming platform that has been widely adopted by threat actors. It supports customizable beacons, evasion, and Mimikatz integration. Pirated versions are commonly used in APT and ransomware campaigns for post-exploitation control.
  • Sliver: An open-source alternative to Cobalt Strike. It allows for dynamic payload generation, multi-user collaboration, and encrypted channels. It’s gaining popularity among both offensive teams and malicious actors due to its flexibility and community support.

📚 MITRE ATT&CK Techniques for Command and Control

  • T1071: Application Layer Protocol
  • T1095: Non-Application Layer Protocol
  • T1001: Data Obfuscation
  • T1105: Ingress Tool Transfer
  • T1090: Proxy
  • T1568.002: Domain Fronting
  • T1573: Encrypted Channel

📊 Detection & DFIR Considerations

Identifying C2 traffic can be difficult due to encryption, domain fronting, and abuse of legitimate cloud services. Analysts should watch for:

  • Regular beaconing intervals (e.g., DNS or HTTP callbacks every 5 seconds)
  • Outbound connections to low-frequency, new, or suspicious IP addresses
  • Domains with short TTLs or rapid IP rotation
  • JA3 TLS fingerprint mismatches indicating custom or malicious clients

🔎 How to Identify Rare and Malicious IP Addresses

Suspicious IPs often fly under the radar. Here’s how defenders can find and investigate them:

  • Passive DNS & NetFlow: Tools like Zeek, Arkime (Moloch), or ElastiFlow can show which endpoints contact uncommon IPs/domains.
  • Threat Intel Enrichment: Query IPs with AbuseIPDB, GreyNoise, VirusTotal, and AlienVault OTX to see if they’ve been flagged as malicious.
  • Frequency Analysis: Use SIEM or Elastic to flag IPs contacted by a single host, or only once over a long period — this behavior is often associated with C2.
  • Geolocation & ASN Checks: IPs associated with obscure regions, VPN hosts, or bulletproof providers should be investigated.
  • Blocklist Integration: Integrate real-time feeds (e.g., Proofpoint ET, Spamhaus DROP, Abuse.ch) into firewalls and SIEMs to detect/block high-risk addresses.
  • Tools: Use IPVoid, Censys, or Shodan to inspect open ports and banner data for context about unknown IPs.

🧰 Tools for Incident Response After C2 Discovery

Once a potential C2 is detected, these tools help investigate scope, behavior, and system impact:

  • Wireshark: Inspect packet captures (PCAPs) to dissect DNS tunneling, malformed TLS, or encrypted payloads.
  • Zeek: Logs protocol metadata like DNS queries, HTTP headers, SSL/TLS handshakes, and connections for timeline analysis.
  • Suricata: Acts as an IDS/IPS with signature-based detection of C2 patterns. Combine with ET Pro or community rules for known beaconing traffic.
  • Velociraptor: Ideal for endpoint sweeping — check for persistence, process ancestry, registry manipulation, and memory artifacts related to C2 implants.
  • Sysmon + Sigma: Monitor for process injection, script execution, and abnormal network activity via Windows Event Logs.
  • Elastic Stack / Splunk: Correlate NetFlow, endpoint logs, and threat intelligence for deep search and dashboarding.
  • Volatility / Rekall: Conduct memory forensics to locate injected DLLs, implants, or sockets used by malware.
  • YARA Rules: Scan memory, files, or processes for signatures tied to known implants (e.g., Cobalt Strike beacon shellcode).

🎯 Threat Hunting and Logging Tips

  • Review JA3 fingerprint anomalies using Zeek or Suricata
  • Search for rare external IPs not seen in baseline logs
  • Hunt for scheduled tasks or startup entries pointing to encoded PowerShell or binary stagers
  • Use “first seen” vs “last seen” metrics to highlight new connections and one-time callbacks

🛡️ Preventative Measures

  • Restrict outbound traffic to only required destinations
  • Apply strict DNS policies and use internal resolvers to control resolution
  • Block access to dynamic DNS and newly registered domains
  • Leverage threat intel feeds to preemptively deny known C2 IPs/domains

🚧 Mitigating Fast Flux Networks

Fast Flux techniques make takedowns difficult by using rapid DNS rotation. Here’s how to defend against them:

  • Zeek DNS Logs: Track and graph domain-to-IP changes. Domains with 20+ IPs in a short window are highly suspicious.
  • Flux Scoring Tools: Tools like FastFluxMonitor or custom Elastic rules can assign risk scores based on TTL, spread, and resolution count.
  • DNS Sinkholes: Redirect queries for suspect domains to controlled environments to study behavior or prevent callback.
  • Firewall Threat Feeds: Use Suricata or Palo Alto to ingest IOC lists targeting bulletproof infrastructure.
  • GreyNoise / Shodan Correlation: Look up IPs that appear behind fast flux domains to see if they behave like infected nodes or spam proxies.
  • Passive DNS Services: Use tools like RiskIQ, Farsight DNSDB, or Umbrella Investigate to observe how frequently domains rotate or are linked to malicious campaigns.

🔚 Conclusion

The Command and Control phase represents the adversary’s live access to your network. It’s a high-risk point where fast detection and decisive response are critical. Armed with the right tools, visibility, and threat intelligence, defenders can shut down C2 operations before attackers can complete their objectives.

Next in our DFIR series: Actions on Objectives — the final stage where attackers act on their mission goals, whether that’s data theft, disruption, or destruction.


Reminder: This series is a practical but simplified overview of the Cyber Kill Chain and how DFIR responds at each phase. Real-world attacks may differ in complexity and sequence. The intent here is to build foundational skills that apply across environments.

Leave a comment