Add `Win32K` input/hooking telemetry
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 30/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- go
調査の方向性
Start with how existing ETW providers are subscribed to and how the ParamDecoder parses event parameters, then check the Microsoft-Windows-Win32K provider's AuditApiCalls keyword gating. Map event IDs 1000 to 1003 to the four new event types and decode each listed parameter. Done means each event is emitted with its documented parameters, and the mapping is covered by decoding tests.
索引モデルが issue の本文から書いたものです。
説明
Motivation
Extend Fibratus's detection capabilities by collecting telemetry from the Microsoft-Windows-Win32K provider around window/input hooking and keyboard state APIs. These calls have high security value for detecting keylogging and input-surveillance techniques:
- Enumerating keyboard key state from an unusual process
- Attempts to install an application-defined hook procedure to monitor keystroke messages
- Attempts to enumerate keystroke state via the DirectInput-style polling pattern
- Attempts to register for raw keyboard input via RegisterRawInputDevices
Expectation
Fibratus gains four new event types mapped to the corresponding Win32K provider event IDs, each carrying the full set of documented parameters:
| Event ID | Fibratus event type | Source API |
|---|---|---|
| 1000 | SetWinEventHook | SetWinEventHook |
| 1001 | RegisterRawInputDevices | RegisterRawInputDevices |
| 1002 | SetWindowsHook | SetWindowsHookEx |
| 1003 | GetAsyncKeyState | GetAsyncKeyState |
Proposal
- Start the
Microsoft-Windows-Win32KETW session with theAuditApiCallskeyword to gate the emission of the four events above - Parse each event's params via the
ParamDecoder, consistent with existing event handling:SetWinEventHook(1000)- min_event (uint32): low bound of the event range being hooked
- max_event (uint32): high bound of the event range being hooked
- pid (uint32): PID the hook is restricted to (0 = all processes)
- tid (uint32): TID the hook is restricted to (0 = all threads)
- flags (uint32): hook flags (e.g. WINEVENT_OUTOFCONTEXT, WINEVENT_SKIPOWNPROCESS)
- hook_instance (pointer/uint64): handle to the installed hook
RegisterRawInputDevices(1001)- status (bool/int32): success/failure of the registration call
- usage_page (uint16): HID usage page (e.g. generic desktop controls)
- usage (uint16): HID usage ID within the page (e.g. keyboard, mouse)
- flags (uint32): registration flags (e.g. RIDEV_INPUTSINK, RIDEV_NOLEGACY)
- target_window (pointer/uint64): target window handle receiving raw input
SetWindowsHook(1002)- filter_type (uint32): hook type (e.g. WH_KEYBOARD, WH_KEYBOARD_LL, WH_MOUSE)
- module_path (string): path/name of the module containing the hook procedure
- module_handle (pointer/uint64): handle to that module
- filter_proc (pointer/uint64): address of the hook procedure
- status (bool/int32): success/failure of installing the hook
GetAsyncKeyState(1003)- pid (uint32): process calling
GetAsyncKeyState - millis_since_last_key_event (uint32/uint64): milliseconds elapsed since the last key event, useful for spotting tight polling loops typical of keyloggers
- background_callcount (uint32): count of calls made while the process was not in the foreground, a strong signal for covert key-state polling
- pid (uint32): process calling
Additional context
- GetAsyncKeyState's BackgroundCallCount/MsSinceLastKeyEvent pair is the strongest built-in signal here. Legitimate foreground apps rarely poll key state at high frequency while backgrounded, so this could support a simple threshold-based detection rule out of the box
- 主要言語
- Go
- スター
- 2.6k
- フォーク
- 222
- 平均マージ
- 16時間 23分
- マージ済み PR(30日)
- 11
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rabbitstack/fibratus のほかの issue
-
Service crashes on Windows Server 2016: "panic: sub-authority index out of range" in RidToStringオープンtype: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
rabbitstack/fibratus#761 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
CI: the test job has been red since September, and TestFsProcessor looks like a real mmap regressionオープンci
難易度 4/5 3〜5日 初心者へのやさしさ 22/100
rabbitstack/fibratus#754 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
ci rules type: enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
rabbitstack/fibratus#715 ·
メンテナーはふだん 1 日以内に返信
-
scope: hardering type: enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
rabbitstack/fibratus#713 ·
メンテナーはふだん 1 日以内に返信
-
needs: config scope: events/telemetry type: feature
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
rabbitstack/fibratus#710 ·
メンテナーはふだん 1 日以内に返信
rabbitstack/fibratus の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
unbound-force/replicator#193 ·
メンテナーはふだん 2 日以内に返信
-
A Gemini stream that fails partway completes the call with the partial text対応中かも @bnaylor が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
go-steer/core-agent#1600 ·
メンテナーはふだん 1 日以内に返信
-
bug raised-by:reviewer
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
medici-finance/assay#7655 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
Edwin-metcalf/MetCode#67 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信