Techniques › T1056 › T1056.004
T1056.004 Credential API Hooking
collection · credential access — Windows, Linux, macOS · attack.mitre.org · JSON
1
MITRE detection strategy
3
analytics
0
Sigma rules tagged attack.t1056.004
0
KEV CVEs mapped here
<p>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. Unlike Keylogging, this technique focuses specifically on API functions that include parameters that reveal user credentials.</p><p>In Windows, hooking involves redirecting calls to these functions and can be implemented via:</p>
- <li>Hooks procedures, which intercept and execute designated code in response to events such as messages, keystrokes, and mouse inputs.</li><li>Import address table (IAT) hooking, which use modifications to a process’s IAT, where pointers to imported API functions are stored.</li><li>Inline hooking, which overwrites the first bytes in an API function to redirect code flow.</li>
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.</p>KEV CVEs mapped to this technique · CTID Mappings Explorer
None. No KEV entry in the public mapping names this technique. Given that 74.7% of KEV has no mapping at all, this says more about the mapping than about the technique.
Detection strategy · ATT&CK Enterprise v19.2
- DET0139 Detection of Credential Harvesting via API Hooking v1.0
AN0389 WindowsDetects credential harvesting via userland API hooking (e.g., SetWindowsHookEx, IAT, or inline patching) by correlating memory modifications with hook installation functions and suspicious module loads in credential-sensitive processes like lsass.exe, explorer.exe, or winlogon.exe.Tunable:
TargetProcessAccessMaskTimeWindowAN0390 LinuxDetects credential interception via malicious LD_PRELOAD-based shared libraries loaded into ssh, sudo, or scp processes. Correlates environment variable injection, unexpected library loads, and memory patching behavior.Tunable:InjectedLibraryNameTargetProcessNameAN0391 macOSDetects DYLD_INSERT_LIBRARIES abuse to hook credential-sensitive applications by correlating process spawns with unauthorized library injection and monitoring changes to the __TEXT segment (code) of credential handling binaries.Tunable:DYLDInjectedPathParentProcessName
Sigma rules · SigmaHQ da9bb07d64, tag attack.t1056.004
No Sigma rule carries this tag. MITRE publishes a detection strategy above, so the behaviour is specified; what is missing is public detection content.
Rules tagged at the parent level (attack.t1056) 2
These target the parent technique, not this sub-technique specifically. Listed for completeness, not counted as coverage.
Author: Josh Nickels
· 2024-02-26 · logsource: product=windows category=dns_query · df68f791-ad95-447f-a271-640a0dab9cf8
Detects DNS query requests to "update.onelaunch.com". This domain is associated with the OneLaunch adware application.
When the OneLaunch application is installed it will attempt to get updates from this domain.
Author: Gavin Knapp
· 2023-03-16 · logsource: category=proxy · eb6c2004-1cef-427f-8885-9042974e5eb6
Detects connections to interplanetary file system (IPFS) containing a user's email address which mirrors behaviours observed in recent phishing campaigns leveraging IPFS to host credential harvesting webpages.