MaxPatrol SIEM

Detects cyberincidents that undermine cyber resilience of a company

T1056.004: 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.

Positive Technologies products that cover the technique

MaxPatrol SIEM knowledge base

mitre_attck_cred_access: PT-CR-768: Intercept_Creds_from_MSTSC: Unloading of credentials used in mstsc.exe during an RDP connection is detected
hacking_tools: PT-CR-760: SharpRDPThief_Usage: Use of SharpRDPThief to save RDP session credentials is detected
hacking_tools: PT-CR-762: Subrule_MSTSC_SharpRDPThief_Usage: Injection of the Easyhook.dll and Easyload.dll libraries into the mstsc.exe process is detected
hacking_tools: PT-CR-763: Subrule_Thread_SharpRDPThief_Usage: Connection of the Easyhook.dll library to a malicious process and creation of threads in mstsc.exe by the process is detected

Detection

IDDS0009Data source and componentProcess: Process MetadataDescription

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.

IDDS0009Data source and componentProcess: OS API ExecutionDescription

Monitor for API 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.