Add `Win32K` input/hooking telemetry
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 30/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Ruhig
- Tech-Stack
- go
- Bereich
- operating-systems, security
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
- Vorherrschende Sprache
- Go
- Sterne
- 2.6k
- Forks
- 222
- Ø Merge
- 16 Std. 23 Min.
- Gemergte PRs (30 T.)
- 11
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus rabbitstack/fibratus
-
Service crashes on Windows Server 2016: "panic: sub-authority index out of range" in RidToStringOffentype: bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
rabbitstack/fibratus#761 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
CI: the test job has been red since September, and TestFsProcessor looks like a real mmap regressionOffenci
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 22/100
rabbitstack/fibratus#754 · 1 Kommentar · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
ci rules type: enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 15/100
rabbitstack/fibratus#715 ·
Maintainer antworten meist innerhalb von 1 Tag
-
scope: hardering type: enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 15/100
rabbitstack/fibratus#713 ·
Maintainer antworten meist innerhalb von 1 Tag
-
needs: config scope: events/telemetry type: feature
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
rabbitstack/fibratus#710 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in rabbitstack/fibratus
Ähnliche Issues
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 75/100
slavakurilyak/awesome-ai-agents#1041 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
goreleaser/nfpm#1199 ·
Maintainer antworten meist innerhalb von 1 Tag
-
edit fails on projects without a DockerfileEvtl. vergeben @weirong-ui hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
kubernetes-sigs/kubebuilder#6209 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 72/100
hiero-ledger/hiero-sdk-go#1911 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 4 Tagen