<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->
<!-- NERF is a trademark of defconxt. -->
---
name: performing-c2-evasion-techniques
description: >-
  Perform C2 communication evasion using traffic shaping, protocol mimicry, encryption layering, and timing manipulation to bypass security controls.
domain: cybersecurity
subdomain: c2-frameworks
tags:
  - evasion
  - traffic-shaping
  - protocol-mimicry
  - encryption
  - timing
version: "1.0"
author: defconxt
license: AGPL-3.0
metadata:
  mitre-attack: ["T1071", "T1001", "T1573"]
  cwe: ["CWE-300"]
  tools: ["Malleable C2", "domain-fronting", "JA3", "traffic-shaper"]
---

# Performing C2 Evasion Techniques

## Overview

Perform C2 communication evasion using traffic shaping, protocol mimicry, encryption layering, and timing manipulation to bypass security controls.

## Prerequisites

| Tool / Requirement | Details |
|---|---|
| `Malleable C2` | Security tooling |
| `domain-fronting` | Security tooling |
| `JA3` | Security tooling |
| `traffic-shaper` | Security tooling |
| Isolated lab environment for testing | Environment requirement |
| Authorization and signed Rules of Engagement (RoE) | Environment requirement |
| Relevant target samples or systems acquired through authorized channels | Environment requirement |

## Quick Reference

```bash
# Randomize JA3 fingerprint
# Use custom TLS client with varied cipher suites

# Traffic shaping with sleep jitter
# Malleable C2 profile
set sleeptime "60000";
set jitter    "37";
set data_jitter "50";

# Protocol mimicry — disguise as legitimate API
http-get {
    set uri "/api/v2/users/profile";
    client {
        header "Accept" "application/json";
        header "Authorization" "Bearer eyJ0eXAiOi...";
        metadata { base64url; header "Cookie"; }
    }
}

# Validate against Sigma rules
sigma convert -t splunk -p splunk_cim c2_detection.yml
```

## Workflow

### Step 1: Preparation and Reconnaissance

```bash
# Identify target and gather initial intelligence
file ./target_sample
malleable-c2 --version 2>/dev/null || echo "Install Malleable C2"

# Set up working directory
mkdir -p /tmp/performing-c2-evasion-techniques/{output,logs,artifacts}
```

### Step 2: Primary Analysis

```bash
# Execute primary analysis with Malleable C2
# Refer to Quick Reference above for detailed commands
echo "[*] Running Performing C2 Evasion Techniques with Malleable C2..."

# Log all operations
script -q /tmp/performing-c2-evasion-techniques/logs/session.log
```

### Step 3: Deep Investigation

```bash
# Apply domain-fronting for secondary analysis
echo "[*] Deep investigation with domain-fronting..."

# Cross-reference findings
diff /tmp/performing-c2-evasion-techniques/output/primary.json /tmp/performing-c2-evasion-techniques/output/secondary.json
```

### Step 4: Documentation and Reporting

```bash
# Generate structured findings report
cat <<'EOF' > /tmp/performing-c2-evasion-techniques/output/report.json
{
  "technique": "performing-c2-evasion-techniques",
  "domain": "c2-frameworks",
  "tools_used": ["Malleable C2", "domain-fronting"],
  "findings": [],
  "recommendations": []
}
EOF
```

## Detection

```yaml
title: C2 Evasion Techniques Detection
id: 7be9aa93-2d01-4ef3-a019-d792ee8d1dda
status: experimental
description: Detects suspicious activity related to performing c2 evasion techniques techniques in c2 frameworks context
logsource:
  category: network_connection
  product: windows
detection:
  selection:
    DestinationPort: 443
    Initiated: "true"
  condition: selection
level: high
tags:
  - attack.t1071
  - attack.t1001
  - attack.t1573
  - attack.command_and_control
falsepositives:
  - Authorized penetration testing tools during scheduled assessments
```


**Detection Opportunities**

| Indicator | Source | Detection Logic |
|---|---|---|
| C2 Evasion Techniques Detection | windows/network_connection | Sigma rule (high) |
| ATT&CK Coverage | MITRE ATT&CK | T1071, T1001, T1573 |

## Verification

- [ ] Environment and tools verified and operational
- [ ] Target samples acquired through authorized channels
- [ ] Primary analysis completed with findings documented
- [ ] Secondary validation performed with independent tooling
- [ ] All artifacts preserved in structured output directory
- [ ] Detection opportunities documented for blue team

## References

- [MITRE ATT&CK T1071](https://attack.mitre.org/techniques/T1071) — Related technique
- [Malleable C2 Documentation](https://malleablec2.org/) — Primary tooling
- [domain-fronting Reference](https://domain-fronting.org/) — Secondary tooling
