C2 techniques

← maldev README · docs/index

The c2/* package tree is the implant's outbound communication layer plus the operator's listener side. Six sub-packages compose into a complete reverse-shell / staging / multi-session stack:

flowchart LR
    subgraph implant [Implant side]
        S[c2/shell<br>reverse shell]
        M[c2/meterpreter<br>MSF stager]
    end
    subgraph wire [Wire]
        T[c2/transport<br>TCP / TLS / uTLS]
        NP[c2/transport/namedpipe<br>SMB pipes]
        Cert[c2/cert<br>mTLS certs + pinning]
        T -.uses.-> Cert
    end
    subgraph operator [Operator side]
        MC[c2/multicat<br>multi-session listener]
    end
    S --> T
    S --> NP
    M --> T
    T --> MC
    NP --> MC

Packages

PackageTech pageDetectionOne-liner
c2/shellreverse-shell.mdnoisyreverse shell with PTY + auto-reconnect + AMSI/ETW evasion hooks
c2/meterpretermeterpreter.mdnoisyMSF stager (TCP / HTTP / HTTPS) with optional inject.Injector for stage delivery
c2/transporttransport.md · malleable-profiles.mdmoderatepluggable TCP / TLS / uTLS + malleable HTTP profiles
c2/transport/namedpipenamedpipe.mdquietWindows named-pipe transport (local IPC + SMB lateral)
c2/certtransport.mdquietself-signed X.509 generation + SHA-256 fingerprint pinning
c2/multicatmulticat.mdquietoperator-side multi-session listener (BANNER protocol)

Quick decision tree

You want to…Use
…land a reverse shell that survives dropsc2/shell.New + c2/transport
…blend C2 with browser TLS fingerprintsc2/transport uTLS profile (Chrome / Firefox / iOS Safari)
…pin the operator certificate against TLS-MITMc2/cert.Fingerprint + transport PinSHA256
…carry C2 over local IPC / SMB lateralc2/transport/namedpipe
…stage a Meterpreter session with inject middlewarec2/meterpreter + Config.Injector
…disguise HTTP traffic as jQuery CDN fetchesmalleable-profiles.md
…host many simultaneous reverse-shell agentsc2/multicat on the operator box

MITRE ATT&CK

T-IDNamePackagesD3FEND counter
T1071Application Layer Protocolc2/transport (HTTP/TLS), c2/transport/namedpipeD3-NTA
T1071.001Web Protocolsc2/transport (malleable), c2/meterpreter (HTTP/HTTPS)D3-NTA
T1573Encrypted Channelc2/transport (TLS)D3-NTA
T1573.002Asymmetric Cryptographyc2/cert (mTLS)D3-NTA
T1095Non-Application Layer Protocolc2/transport (raw TCP)D3-NTA
T1059Command and Scripting Interpreterc2/shellD3-PSA
T1571Non-Standard Portc2/multicatD3-NTA
T1021.002SMB/Admin Sharesc2/transport/namedpipe (cross-host)D3-NTA

See also