External C2¶
The External C2 listener enables integration with third-party C2 frameworks (Metasploit, Sliver, custom controllers) by exposing a TCP interface that proxies C2 traffic through Stentor's relay infrastructure. This allows external tools to control Stentor beacons or relay traffic through Stentor's transport layer.
This is equivalent to Cobalt Strike's External C2 specification.
Configuration¶
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | Yes | -- | Display name |
type | string | Yes | -- | Must be "external_c2" |
relay_id | UUID | Yes | -- | Relay hosting the listener |
port | int | Yes | -- | TCP port for controller connections |
guardrails | object | No | -- | Beacon IP/hostname filtering |
Create an External C2 Listener¶
curl -s -X POST https://stentor.app/api/v1/listeners \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "External C2",
"type": "external_c2",
"port": 2222,
"relay_id": "RELAY_UUID"
}'
Protocol¶
The External C2 protocol uses 4-byte little-endian length-prefixed frames over TCP:
Handshake Flow¶
- Controller connects to the External C2 TCP port
- Optional metadata frames:
arch=x64,pipename=\\.\pipe\beacon,block=100 - Optional stager request: Controller sends
stagerframe to receive beacon shellcode - Session start: Controller sends
goframe to initiate the beacon session - Bidirectional proxy: Controller sends task frames, relay responds with pending output
Metadata Options¶
| Frame | Description |
|---|---|
arch=x86 / arch=x64 | Target architecture for stager generation |
pipename=<name> | Named pipe configuration |
block=<size> | Data block size |
stager | Request beacon shellcode bytes |
go | Start beacon session |
Use Cases¶
- Metasploit integration: Route Meterpreter sessions through Stentor infrastructure
- Custom transport development: Build custom C2 transports that plug into the Stentor relay
- Framework chaining: Use Stentor as a relay layer for other C2 frameworks
- Research: Test custom C2 protocols using Stentor's beacon infrastructure
OPSEC Considerations
- The External C2 port should only be accessible from your controller infrastructure, not from target networks
- Traffic between the controller and relay is not encrypted by default -- use SSH tunnels or VPN for controller connections
- Guardrails apply to beacons connecting through the external controller