MITRE ATT&CK · T1056.001

Keylogging

MITRE · cited in 6 of our lessons

Explanation

What attackers do. Attackers record keystrokes to capture passwords and other sensitive input as users type them. Keyloggers can be part of malware, browser extensions or hardware devices. This serves Collection and Credential Access.

How to defend. Use endpoint protection that detects keylogging behaviour, manage browser extensions, and use phishing-resistant MFA so captured passwords alone do not grant access. Control physical access to keyboards and USB ports in sensitive areas.

Signs to look for. Look for processes setting keyboard hooks or polling key states, unusual log files growing in temp folders, unknown USB devices and data being sent out regularly from infected hosts. A common gap is that keylogging uses legitimate operating system features, so detection depends on behaviour analysis.

The official text
Adversaries may log user keystrokes to intercept credentials as the user types them. Keylogging is likely to be used to acquire credentials for new access opportunities when OS Credential Dumping efforts are not effective, and may require an adversary to intercept keystrokes on a system for a substantial period of time before credentials can be successfully captured. In order to increase the likelihood of capturing credentials quickly, an adversary may also perform actions such as clearing browser cookies to force users to reauthenticate to systems. Keylogging is the most prevalent type of input capture, with many different ways of intercepting keystrokes. Some methods include: * Hooking API callbacks used for processing keystrokes. Unlike Credential API Hooking, this focuses solely on API functions intended for processing keystroke data. * Reading raw keystroke data from the hardware buffer. * Windows Registry modifications. * Custom drivers. * Modify System Image may provide adversaries with hooks into the operating system of network devices to read raw keystrokes for login sessions.

© The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation (MITRE ATT&CK®).

Lessons that cite it

Real incidents where this item mattered.