Remote BOF Runner は、Crystal Palace 製の PIC ローダーを使用して Beacon Object Files (BOFs) をリモート実行するための Havoc 拡張フレームワークです。
Crystal Palace製のPICローダーを使用してBeacon Object Files(BOF)をリモート実行するためのHavoc拡張フレームワーク。
Remote BOF Runnerは、Crystal Palace PICローダーを活用して、任意のプロセスでのBOFの安全な実行を可能にします。このフレームワークは、名前付きパイプを介した高度なプロセス間通信(IPC)メカニズムを実装し、インジェクションされたプロセスからのビーコン出力をコマンド&コントロール(C2)サーバーへ透過的に転送します。
Havocの拡張機能ディレクトリに拡張機能がインストールされていることを確認してください:
YOUR_HAVOC_FOLDER + /data/extensions/
PICローダーをコンパイルするには、次のツールとライブラリがシステムにインストールされている必要があります:
詳細なセットアップ手順については、WSLセットアップガイドを参照してください。
sudo apt-get update
sudo apt-get install mingw-w64
sudo apt-get install make
sudo apt-get install openjdk-11-jdk
sudo apt-get install zip
BOFコンポーネントは以下を担当します:
PICローダーは以下で構成されます:
┌───────────────────────────────────────────────────────────────────┐
│ 1. Beacon Process (Havoc) │
│ ├─ Execute BOF Injector │
│ ├─ Create dummy process (suspended) │
│ ├─ Inject PIC Loader + Remote BOF │
│ └─ Create IPC named pipe │
└────────────┬──────────────────────────────────────────────────────┘
│
▼
┌───────────────────────────────────────────────────────────────────┐
│ 2. PIC Loader Execution │
│ ├─ Crystal Palace loader │
│ ├─ Performs BSS section allocation │
│ ├─ Initializes UI context (for .NET compatibility) │
│ └─ Hooks beacon functions (BeaconPrintf, BeaconOutput, etc.) │
└────────────┬──────────────────────────────────────────────────────┘
│
▼
┌───────────────────────────────────────────────────────────────────┐
│ 3. Remote BOF Execution │
│ ├─ Execute target BOF (whoami, ipconfig, etc.) │
│ ├─ BOF calls hooked beacon functions │
│ ├─ Hooked functions redirect output to IPC pipe │
│ └─ Output accumulates in beacon process via pipe │
└────────────┬──────────────────────────────────────────────────────┘
│
▼
┌───────────────────────────────────────────────────────────────────┐
│ 4. Output Collection & Transmission │
│ ├─ Beacon waits for remote process termination │
│ ├─ Accumulates all output from IPC pipe │
│ ├─ Aggregates fragmented messages (8KB buffer) │
│ ├─ Filters protocol delimiters (@START@, @END@) │
│ └─ Transmits consolidated output to Team Server │
└───────────────────────────────────────────────────────────────────┘
主なユースケースは、ネイティブ.NETプロセスでのBOF実行です:
ビーコンへの直接CLRロードがリスクな理由: ビーコンプロセスに.NETアセンブリを直接ロードすることは、本質的に安全ではなく、検出可能です:
可能な解決策: ネイティブ.NETプロセスへのインジェクション: ビーコンにCLRをロードする代わりに、すでに.NETネイティブであるプロセスにinline-execute-assembly BOFをインジェクションして実行します:
// ❌ DETECTABLE: Direct execution in beacon
beacon.exe (native) → load ClrCreateInstance → load .NET assembly → EDR ALERT
// ✅ STEALTHY: Execution in native .NET process
dotnet.exe (native .NET) → inject BOF → inline-execute-assembly →
execute .NET assembly in already-CLR context → normal behavior
このアプローチは、.NETプロセス内で.NETを実行することが通常のアプリケーション動作と区別できないという事実を利用します。
remote-bof-runner whoami
remote-bof-runner ipconfig
remote-bof-runner cacls C:\Windows\System32
remote-bof-runner reg-query DC01 HKLM SYSTEM\CurrentControlSet
remote-bof-runner reg-query HKLM SYSTEM\CurrentControlSet\Control\Lsa
remote-bof-runner reg-query HKLM SYSTEM\CurrentControlSet\Control\Lsa RunAsPPL
remote-bof-runner execute-assembly --dotnetassembly "/Payloads/Rubeus.exe" --assemblyargs "triage"
出力例:

⚠️ 重要: このプロジェクトはProof-of-Concept(概念実証)であり、デフォルトではOPSECを優先しません。
BOFインジェクタとPICローダーの両方に、敵対的シミュレーションのための大幅なハードニングが必要です:
このツールは、教育および許可されたセキュリティテストの目的でのみ提供されます。コンピュータシステムへの不正アクセスは違法です。ユーザーは、適用されるすべての法律および規制の遵守を確保する責任があります。