CG
SkillsHunting for Domain Fronting C2 Traffic
Start Free
Back to Skills Library
Threat Hunting🟡 Intermediate

Hunting for Domain Fronting C2 Traffic

Detect domain fronting C2 traffic by analyzing SNI vs HTTP Host header mismatches in proxy logs and TLS certificate discrepancies using pyOpenSSL for certificate inspection.

3 min read1 MITRE techniques

Prerequisites

  • Web proxy or secure web gateway logs with SNI and Host header fields
  • Python 3.8+ with pyOpenSSL and cryptography libraries
  • TLS inspection enabled on proxy for Host header visibility
  • CDN provider IP range lists (CloudFront, Azure CDN, Cloudflare)

MITRE ATT&CK Coverage

T1090.004

Hunting for Domain Fronting C2 Traffic

Overview

Domain fronting (MITRE ATT&CK T1090.004) is a technique where attackers use different domain names in the TLS SNI field and the HTTP Host header to disguise C2 traffic behind legitimate CDN-hosted domains. This skill detects domain fronting by parsing proxy/web gateway logs for SNI-Host header mismatches, analyzing TLS certificates for CDN provider identification, flagging connections where the SNI points to a high-reputation domain but the Host header targets an attacker-controlled domain, and correlating with known CDN provider IP ranges.

Prerequisites

  • Web proxy or secure web gateway logs with SNI and Host header fields
  • Python 3.8+ with pyOpenSSL and cryptography libraries
  • TLS inspection enabled on proxy for Host header visibility
  • CDN provider IP range lists (CloudFront, Azure CDN, Cloudflare)

Steps

  1. Parse proxy logs for connections with both SNI and Host header fields
  2. Compare SNI domain against HTTP Host header for mismatches
  3. Extract TLS certificate Subject and SAN fields using pyOpenSSL
  4. Identify CDN-hosted connections via certificate issuer and IP ranges
  5. Flag high-confidence domain fronting where SNI and Host differ on CDN IPs
  6. Score alerts based on domain reputation differential
  7. Generate detection report with network flow context

Expected Output

JSON report containing detected domain fronting indicators with SNI-Host pairs, certificate details, CDN provider identification, confidence scores, and MITRE ATT&CK technique mapping.

Verification Criteria

Confirm successful execution by validating:

  • [ ] All prerequisite tools and access requirements are satisfied
  • [ ] Each workflow step completed without errors
  • [ ] Output matches expected format and contains expected data
  • [ ] No security warnings or misconfigurations detected
  • [ ] Results are documented and evidence is preserved for audit

Compliance Framework Mapping

This skill supports compliance evidence collection across multiple frameworks:

  • SOC 2: CC7.2 (Anomaly Detection), CC7.3 (Incident Identification)
  • ISO 27001: A.12.4 (Logging & Monitoring), A.16.1 (Security Incident Management)
  • NIST 800-53: SI-4 (System Monitoring), IR-4 (Incident Handling), RA-5 (Vulnerability Scanning)
  • NIST CSF: DE.AE (Anomalies & Events), DE.CM (Continuous Monitoring), DE.DP (Detection Processes)

Claw GRC Tip: When this skill is executed by a registered agent, compliance evidence is automatically captured and mapped to the relevant controls in your active frameworks.

Deploying This Skill with Claw GRC

Agent Execution

Register this skill with your Claw GRC agent for automated execution:

# Install via CLI
npx claw-grc skills add hunting-for-domain-fronting-c2-traffic

# Or load dynamically via MCP
grc.load_skill("hunting-for-domain-fronting-c2-traffic")

Audit Trail Integration

When executed through Claw GRC, every step of this skill generates tamper-evident audit records:

  • SHA-256 chain hashing ensures no step can be modified after execution
  • Evidence artifacts (configs, scan results, logs) are automatically attached to relevant controls
  • Trust score impact — successful execution increases your agent's trust score

Continuous Compliance

Schedule this skill for recurring execution to maintain continuous compliance posture. Claw GRC monitors for drift and alerts when re-execution is needed.

Use with Claw GRC Agents

This skill is fully compatible with Claw GRC's autonomous agent system. Deploy it to any registered agent via MCP, and every execution will be logged in the tamper-evident audit trail.

// Load this skill in your agent
npx claw-grc skills add hunting-for-domain-fronting-c2-traffic
// Or via MCP
grc.load_skill("hunting-for-domain-fronting-c2-traffic")

Tags

domain-frontingc2-detectiontls-inspectionproxy-logspyopensslthreat-huntingnetwork-security

Related Skills

Threat Hunting

Hunting for Beaconing with Frequency Analysis

4m·intermediate
Threat Hunting

Analyzing Persistence Mechanisms in Linux

3m·intermediate
Threat Hunting

Building Threat Hunt Hypothesis Framework

3m·intermediate
Threat Hunting

Detecting Dcsync Attack in Active Directory

3m·intermediate
Threat Hunting

Detecting DLL Sideloading Attacks

3m·intermediate
Threat Hunting

Detecting Email Forwarding Rules Attack

3m·intermediate

Skill Details

Domain
Threat Hunting
Difficulty
intermediate
Read Time
3 min
Code Examples
0
MITRE IDs
1

On This Page

OverviewPrerequisitesStepsExpected OutputVerification CriteriaCompliance Framework MappingDeploying This Skill with Claw GRC

Deploy This Skill

Add this skill to your Claw GRC agent and start automating.

Get Started Free →