MITRE ATT&CK / Techniques / T1056.004

Input Capture: Credential API Hooking

ID
T1056.004
Tactics
TA0006 Credential Access, TA0009 Collection
Sub-technique of
T1056 Input Capture
Platforms
Windows, Linux, macOS
Data sources
Process Access, Module Load, Process Modification, Process Creation, File Access
Source
attack.mitre.org
MITRE last modified
25 Oct 2025

Adversaries may hook into Windows application programming interface (API) functions and Linux system functions to collect user credentials. Malicious hooking mechanisms may capture API or function calls that include parameters that reveal user authentication credentials.[1] Unlike Keylogging, this technique focuses specifically on API functions that include parameters that reveal user credentials.

In Windows, 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.[2][3]
  • **Import address table (IAT) hooking**, which use modifications to a process’s IAT, where pointers to imported API functions are stored.[3][4][5]
  • **Inline hooking**, which overwrites the first bytes in an API function to redirect code flow.[3][6][5]

In Linux and macOS, adversaries may hook into system functions via the LD_PRELOAD (Linux) or DYLD_INSERT_LIBRARIES (macOS) environment variables, which enables loading shared libraries into a program’s address space. For example, an adversary may capture credentials by hooking into the libc read function leveraged by SSH or SCP.[7]

Detection

Groups (1)

Software (11)

References

  1. Microsoft TrojanSpy:Win32/Ursnif.gen!I Sept 2017
  2. Microsoft Hook Overview
  3. Elastic Process Injection July 2017
  4. Adlice Software IAT Hooks Oct 2014
  5. MWRInfoSecurity Dynamic Hooking 2015
  6. HighTech Bridge Inline Hooking Sept 2011
  7. Intezer Symbiote 2022