CtrlK
BlogDocsLog inGet started
Tessl Logo

c2

Framework-agnostic C2 orchestration — listener types, implant modes, redirector architecture, malleable profiles, jitter strategy, OPSEC guidance.

63

Quality

75%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Critical

Do not install without reviewing

Fix and improve this skill with Tessl

tessl review fix ./packages/decepticon/decepticon/skills/standard/post-exploit/c2/SKILL.md
SKILL.md
Quality
Evals
Security

Command & Control (C2) Knowledge Base

C2 infrastructure enables persistent, covert communication between the operator and implants deployed on target systems. Proper C2 setup minimizes detection, ensures operational resilience through redirectors, and provides the foundation for all post-exploitation activity.

Decepticon C2 Architecture

C2 servers run as separate containers on sandbox-net, selectable via docker compose profiles. The Kali sandbox has C2 clients only — servers are never co-located with the attack box.

FrameworkContainerProfileClient in Sandbox
Sliverc2-sliverc2-sliver (default in .env)sliver-client
Havocc2-havocc2-havoc (future)havoc-client (future)

Default: COMPOSE_PROFILES=c2-sliver in .envdocker compose up -d starts Sliver. Swap: change COMPOSE_PROFILES value to use a different C2 framework. For framework-specific setup, consult the dedicated skill: c2-sliver, c2-havoc, etc.

MITRE ATT&CK Mapping

Technique IDNameC2 Relevance
T1071.001Application Layer Protocol: Web ProtocolsHTTPS-based C2 channels
T1071.004Application Layer Protocol: DNSDNS-based C2 channels
T1573.002Encrypted Channel: Asymmetric CryptographymTLS, AES-encrypted payloads
T1090.002Proxy: External ProxyRedirectors, CDN fronting
T1105Ingress Tool TransferUpload/download via implant
T1572Protocol TunnelingDNS tunneling, port forwarding

1. C2 Channel Types

ChannelPortStealthSpeedUse Case
HTTPS443High (blends with web)FastPrimary channel
DNS53Very High (rarely blocked)SlowFallback / restricted networks
mTLSCustomHigh (mutual auth)FastHigh-security sessions
WireGuard51820MediumFastTunneled access, pivoting

Multi-Channel Strategy

Primary:   HTTPS (443)  — fast, reliable, blends with web traffic
Fallback:  DNS (53)     — survives proxy/firewall restrictions
Pivot:     mTLS (8888)  — internal movement after initial foothold
Tunnel:    WireGuard    — full network tunnel through implant

2. Implant Modes

ModeUse CaseOPSECResponsiveness
BeaconLong-term persistence, low-and-slowHigh (periodic check-ins)Low (sleep + jitter delay)
SessionActive exploitation, interactive opsLow (persistent connection)Immediate
StagerInitial delivery, size-constrainedMedium (small footprint)Delayed (downloads full implant)

Jitter Recommendations

EnvironmentSleep IntervalJitter %Rationale
Initial access60-120s50-70%Avoid pattern detection
Established foothold30-60s30-50%Balance speed and stealth
Active operation window5-15s20-30%Responsiveness needed
Long-term persistence300-900s60-80%Blend with noise floor

Output Formats

FormatUse CaseDelivery Method
EXEDirect executionPhishing, file share, web exploit
Shared Library (DLL/SO)DLL sideloading, hijackingPlanted in app directory
ShellcodeCustom loaders, injectionProcess injection, custom dropper
ServiceWindows service persistencesc.exe, registry modification

3. Redirector Architecture

Target Network          Internet              Operator
┌──────────┐     ┌────────────────┐     ┌──────────────┐
│  Implant │────→│  Redirector    │────→│  Teamserver  │
│          │←────│  (NGINX/CDN)   │←────│  (C2 Server) │
│          │     │                │     │              │
└──────────┘     │  - URI filter  │     └──────────────┘
                 │  - UA filter   │
                 │  - GeoIP block │
                 │  - Decoy page  │
                 └────────────────┘

NGINX Reverse Proxy Redirector

# /etc/nginx/sites-available/c2-redirector
server {
    listen 443 ssl;
    server_name legitimate-looking-domain.com;

    ssl_certificate     /etc/letsencrypt/live/legitimate-looking-domain.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/legitimate-looking-domain.com/privkey.pem;

    # Allow only expected C2 URIs
    location /api/v2/status {
        proxy_pass https://<TEAMSERVER_IP>:443;
        proxy_ssl_verify off;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $remote_addr;
    }

    # Block all other traffic — return decoy page
    location / {
        root /var/www/html;
        index index.html;
    }
}

Redirector OPSEC

  • Use aged, categorized domains (check via Bluecoat/WebPulse before engagement)
  • Use Let's Encrypt or purchased certs (not self-signed)
  • Layer CDN (Cloudflare/CloudFront) as additional redirect
  • Deploy 2-3 redirectors for redundancy; monitor logs for IR probing

4. Malleable Profiles

Concept

Malleable profiles shape C2 traffic to mimic legitimate application traffic, evading network-based detection. Each framework has its own profile format (Sliver: HTTP C2 JSON, Havoc: YAOTL listener config, Cobalt Strike: malleable C2).

Profile Design Principles

  • Match the target environment: If target runs IIS, mimic IIS traffic patterns
  • Realistic URIs: Use paths that match expected web application routes
  • Consistent headers: Response headers must match the claimed server technology
  • Payload encoding: Use transforms (base64, prepend/append junk) to obscure payload bytes
  • Avoid defaults: Never use framework default profiles in production engagements

5. Detection Signatures

IndicatorPatternOPSEC Mitigation
Default HTTP headersFramework-specific header combosUse custom C2 profiles
Default URI patternsKnown C2 URI pathsConfigure custom URI paths
Beacon interval regularityExact N-second intervals with no varianceAlways set jitter >= 30%
DNS TXT record patternsBase64-encoded TXT responses > 255 bytesFragment data, short polling
DNS subdomain lengthUnusually long subdomain labelsReduce payload per query
mTLS certificate anomaliesSelf-signed certs, unusual CN/SANUse legitimate CA-signed certificates
JA3/JA3S fingerprintsTLS client hello unique to implantProcess injection into browser
Payload staging trafficLarge download immediately after connectUse stageless payloads
Process injection artifactsUnbacked RWX memory regionsIndirect syscalls, RW→RX

6. Decision Gate

C2 Established — Next Steps

C2 Active (implant callback confirmed)
│
├──→ Credential Access
│    - hashdump, Mimikatz, Rubeus
│    - Kerberoasting, AS-REP roasting
│    - LSASS dump, SAM extraction
│
├──→ Lateral Movement
│    - PsExec, WMI, WinRM
│    - DCOM, SMB, RDP
│    - Pass-the-Hash, Pass-the-Ticket
│
├──→ Defense Evasion (if detected)
│    - AMSI/ETW bypass
│    - New loader, re-encode payload
│    - Switch C2 channel (HTTPS→DNS)
│
└──→ Persistence (if needed)
     - Scheduled tasks, services
     - Registry run keys
     - DLL hijacking

Pre-Lateral-Movement Checklist

  • Stable C2 callback with appropriate jitter
  • Host situational awareness complete (users, AV, domain info)
  • Credentials or tokens obtained for target account
  • Pivot infrastructure configured (SOCKS/port forward)
  • Backup C2 channel available (DNS fallback)
  • OPSEC review: no alerts triggered, implant stable

7. Tools & Resources

ToolPurpose
SliverOpen-source C2 (BishopFox) — c2-sliver skill
HavocModern C2 with evasion — c2-havoc skill (future)
NGINXRedirector reverse proxy
CertbotLet's Encrypt SSL certs
socatSimple port redirection/relay
Cobalt StrikeCommercial C2 (reference only)
MythicModular C2 platform

8. Output Files

post-exploit/c2/
├── implants/                    # Generated implant binaries
│   ├── win_beacon.exe
│   ├── lin_https
│   ├── shellcode.bin
│   └── stager.bin
├── profiles/                    # Custom C2 profiles
├── certs/                       # SSL certificates
├── loot/                        # Exfiltrated files
└── c2_operations_log.md         # Timestamped operator actions
Repository
PurpleAILAB/Decepticon
Last updated
First committed

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.