Keylogging is the capture of keystrokes so an attacker can recover passwords and other sensitive input. It can be performed with malicious software or hardware and turns ordinary typing into a data leakage event. Strong credentials still matter, but reducing endpoint compromise is equally important.
Expanded Definition
Keylogging is the recording of keyboard input so that typed data can be reconstructed later. In security terms, the key distinction is not just collection, but stealth: the logging mechanism is meant to sit between the user and the text they enter, then export that content without normal visibility. It can be software-based, such as malware that hooks input APIs, or hardware-based, such as a malicious device inserted into the path between keyboard and computer.
Keylogging is often discussed alongside credential theft, but that is only one use. It can also expose chat messages, recovery codes, administrative commands, and form data before encryption or browser protections help. That is why the boundary matters: encryption at rest does not protect keystrokes in transit from keyboard to application, and a trusted endpoint can still become a capture point if the input path is compromised.
There is broad consensus on the core idea, although implementation details vary by platform and attack surface. A practical misunderstanding is to treat it as purely a password problem; in reality, any high-value text entry can become sensitive when the endpoint or attached peripherals are untrusted.
Examples and Use Cases
- Malware records login attempts on a workstation and sends the captured text to an external command channel for later reuse.
- A malicious browser extension or injected process captures typed data before it reaches a web application.
- A hardware implant is attached inline with a keyboard cable or built into a peripheral to copy input invisibly.
- Attackers monitor an administrator console to recover commands, tokens, or one-time secrets entered during privileged work.
- Users entering recovery phrases, API keys, or support identifiers can expose more than passwords if the device is already compromised.
The tradeoff is straightforward: stronger authentication helps, but it does not eliminate exposure if the input device, endpoint, or session layer is already under attacker control. That is why secure workflows often combine credential hardening with device trust and session monitoring.
Security Implications
Keylogging converts a trusted act, typing, into a disclosure event. The immediate consequence is credential capture, but the broader impact is the theft of whatever sensitive content is entered on that device, including administrative commands, secrets, and recovery material. Once captured, those values can be reused quickly, often before the victim notices anything abnormal.
The failure mechanism is usually simple: an attacker gains code execution on the endpoint, an input injection point, or physical access to the keyboard path, then records keystrokes outside the user’s view. Because the logging can occur before application controls or browser protections see the input, it bypasses many downstream safeguards. Observable symptoms may be weak or absent, especially when the capture is performed by well-hidden malware or a small peripheral device.
For defenders, the practitioner reality is that endpoint compromise and credential exposure tend to reinforce each other. A single infected workstation can undermine otherwise strong authentication if the attacker can see everything the user types.
Domain and Governance Relevance
In the broader cybersecurity domain, keylogging matters because it sits at the intersection of endpoint integrity, credential protection, and user trust. It is not just a malware issue; it is also a control failure where the organisation assumes that typed input remains private until it reaches the intended application. Once that assumption is false, every authentication flow, admin action, and sensitive data entry process on the endpoint becomes more fragile.
In identity-heavy environments, the issue becomes more consequential because many valuable actions happen through interactive login and approval flows. If a privileged operator or support user enters secrets on a compromised device, the resulting exposure can extend into account takeover, session hijack, and administrative abuse. For NHI-adjacent workflows, the same logic applies when operators handle tokens, API keys, certificates, or automation credentials through manual entry. The security problem is still keylogging first, but the governance impact is wider because machine-access material can be exposed through human typing.
That is why strong endpoint controls, device hygiene, and careful handling of secrets remain central to the domain. Keylogging is a reminder that authentication strength and endpoint trust must be managed together.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
MITRE ATT&CK address the attack and risk surface, while CIS Controls v8 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| CIS Controls v8 | 8 — Audit Log Management | Keylogging often escapes notice without endpoint logging and review. |
| 6 — Access Control Management | Captured keystrokes commonly enable unauthorized access and privilege abuse. | |
| 4 — Secure Configuration of Enterprise Assets and Software | Hardened endpoints reduce the chance that malware can install key capture hooks. | |
| Recommendation — Centralise and review endpoint logs to detect suspicious capture behavior early. Remove unnecessary privilege to limit the value of stolen input. Harden endpoints to block unauthorized input-capture software and drivers. | ||
| MITRE ATT&CK | T1056.001 — Keylogging | This term is the attack technique itself and maps directly to ATT&CK. |
| Recommendation — Map detections and hunts to T1056.001 to find key capture activity. | ||
| NIST CSF 2.0 | PR.AC-1 — Identity and Credential Access Management | Keystroke capture often targets credentials and other authenticators. |
| Recommendation — Treat typed secrets as exposed when endpoint trust is uncertain. | ||
Deepen Your Knowledge
Reviewed and updated by the NHIMG editorial team on September 9, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org