T1056.004 · collection, credential-access · 1 actors · 0 correlated reports

Credential API Hooking

Adversaries may hook into Windows application programming interface (API) functions to collect user credentials. Malicious hooking mechanisms may capture API calls that include parameters that reveal user authentication credentials. Unlike Keylogging, this technique focuses specifically on API functions that include parameters that reveal user credentials. Hooking involves redirecting calls to these functions and can be implemented via: * **Hooks procedures**, which intercept and execute designated code in response to events such as messages, keystrokes, and mouse inputs. * **Import address table (IAT) hooking**, which use modifications to a process’s IAT, where pointers to imported API functions are stored. * **Inline hooking**, which overwrites the first bytes in an API function to redirect code flow.

Open detection, hunting, mitigation, and evidence workspace

Detection logic

Monitor for calls to the `SetWindowsHookEx` and `SetWinEventHook` functions, which install a hook procedure. Also consider analyzing hook chains (which hold pointers to hook procedures for each type of hook) using tools or by programmatically examining internal kernel structures. Rootkits detectors can also be used to monitor for various types of hooking activity. Verify integrity of live processes by comparing code in memory to that of corresponding static binaries, specifically checking for jumps and other instructions that redirect code flow. Also consider taking snapshots of newly started processes to compare the in-memory IAT to the real addresses of the referenced functions.

Observed actors

Correlated CTI and IR reports

Continue the investigation