Red Team Exfiltration and Impact
Workflow
| Step | Action |
|---|---|
| Preparation | Verify auth token, scoping, and available C2 channels within RoE. |
| Collection | Serve staged data through cloakify/pyexfil into chosen egress channel. |
| C2 | Deploy a new session under a module that matches the intended post-exploitation objective. |
| Exfil | Transmit with DGA/reverse-connection shaping disabled. |
| Impact | Run SlowLoris only on the designated staging server. |
| Cleanup | Terminate C2 sessions, archive evidence to evidence store. |
Overview
Cybersecurity playbook covering post-exploitation data exfiltration tradecraft, command-and-control (C2) infrastructure design, and safe impact validation. Follows strict data-privacy preservation, non-destructive validation, and operational security standards.
When to Use
Trigger phrases:
"red team data exfiltration"
"dns tunneling with dnscat2"
"covert channel exfiltration using cloakify or pyexfil"
"deploying c2 infrastructure with havoc or covenant"
"demonstrating denial of service impact safely"
Testing perimeter egress filtering and data loss prevention (DLP) controls via covert channels
Setting up encrypted command-and-control channels over DNS, HTTPS, or cloud proxy services
Masking sensitive staging payloads to bypass deep packet inspection (DPI)
Demonstrating the tangible business impact of a compromised asset without damaging live services
Emulating adversary techniques for post-compromise cleanup and anti-forensic verification in lab settings
When NOT to Use
- When extracting actual customer PII, financial records, or secrets without express written mandate
- When executing destructive denial of service attacks against production environments
- When deploying anti-forensics tools (
usbkill,moonwalk) on client production systems
Prerequisites
- Written authorization defining allowed exfiltration bandwidth, staging directories, and test datasets
- External VPS or cloud redirector infrastructure for receiving C2 and exfiltration callbacks
- Generated dummy/synthetic data files for DLP control testing
Covert Exfiltration Channels
DNS Tunneling (Dnscat2)
Encapsulates C2 commands and staged files inside standard recursive DNS queries:
- Bypasses traditional firewalls by querying authoritative nameservers
- Evades egress IP restrictions by routing through enterprise internal resolvers
Cloakify Suite
Transforms raw binary or text data into innocuous-looking payloads (e.g., lists of geographic locations, usernames, or text book passages) to evade regex-based network DLP inspection.
PyExfil
Multi-protocol exfiltration testing framework supporting alternative egress protocols:
- DNS / HTTP / HTTPS / ICMP echo payloads
- Cloud service drops (Slack, Twitter, Google Drive)
Command & Control Frameworks
| C2 Framework | Primary Language | Operational Profile |
|---|---|---|
| Havoc | C / Go | Modern post-exploitation C2 supporting sleep obfuscation and evasion plugins |
| Covenant | .NET | Collaborative GUI-driven C2 specializing in .NET assemblies and memory execution |
| Merlin | Go | Cross-platform lightweight agent utilizing HTTP/2 and gRPC transport layers |
| NimPlant | Nim | Minimalist implant built in Nim for low-detection footprint across Windows environments |
Safe Impact Demonstration
Controlled Service Disruption (SlowLoris)
- Demonstrates resource starvation vulnerabilities on web servers by holding connections open.
- RoE Requirement: Execute only on designated staging/canary servers with continuous monitoring and automated termination gates.
Anti-Rationalization Table
| Excuse | Flawed Rationalization | Required Discipline |
|---|---|---|
| "Exfiltrate real customer data to prove impact" | "Client wants to see actual risk." | Never touch real customer data; use synthetic canary files (e.g., generated test records) to validate DLP triggers. |
| "High-bandwidth exfiltration is faster" | "Test is limited on time." | Burst exfiltration trips simple threshold alarms; test real adversary tradecraft with low-and-slow chunked transfers. |
| "Run DoS tools to prove unavailability" | "We need to show the server will go down." | Uncontrolled DoS can cause real revenue loss; simulate disruption only on isolated lab instances with immediate rollbacks. |
Verification Checklist
- All exfiltration targets confirmed to contain synthetic/canary data only
- External C2 listeners secured with authentication and restricted access
- DNS tunneling verified against internal resolver restrictions
- Bandwidth and packet rates confirmed within authorized RoE thresholds
- Safe termination of all C2 sessions and implant processes verified
- Exfiltration logs and transfer receipts compiled for the engagement report