A keystroke logger is malware that records user input, often to steal credentials, secrets, or sensitive commands. In software delivery environments, it can capture developer logins, tokens, and operational commands without obvious disruption. Its impact is amplified when it runs inside build or test workflows that handle privileged access.
Expanded Definition
A keystroke logger is a form of malware or surveillance tooling that captures user input as it is typed, then stores or exfiltrates that data for later misuse. In security operations, the term usually refers to malicious software, but usage in the industry is still evolving because some monitoring tools can perform similar capture functions for legitimate forensic or accessibility purposes. The distinction depends on intent, authorization, and scope.
For NHI and software delivery environments, keystroke logging is especially dangerous because it can reveal usernames, passwords, API keys, session tokens, one-time codes, and privileged commands. It becomes more severe when installed on developer endpoints, jump hosts, CI/CD runners, or admin workstations where a single compromise can expose many downstream systems. The NIST Cybersecurity Framework 2.0 is useful here because it frames asset protection, detection, and response as continuous governance concerns rather than one-time hardening tasks.
The most common misapplication is treating a keystroke logger as only a credential-stealing threat, which occurs when teams overlook command capture, prompt interception, and the exposure of NHI secrets in administrative workflows.
Examples and Use Cases
Implementing detection and prevention rigorously often introduces endpoint hardening and monitoring overhead, requiring organisations to weigh workflow convenience against the cost of lost visibility and rapid response.
- A phishing email installs a logger on a developer laptop, capturing cloud console passwords and paste-in API keys before the attacker moves into source control and deployment systems.
- A compromised remote access tool on an admin workstation records privileged shell commands, exposing secrets entered during incident response or maintenance windows.
- A fake software update drops a logger into a build environment, where it records service account credentials used to sign releases and access artifact repositories.
- A criminal operator targets a browser session and records MFA backup codes or session tokens, then reuses them to bypass normal authentication controls.
- A security team deploys EDR and application controls to detect suspicious input capture behavior, then correlates alerts with unusual authentication events and secret access patterns.
Because the threat often hides inside ordinary interaction flows, authoritative guidance from MITRE ATT&CK helps teams map keylogging-style collection activity to real attacker behavior and detection logic.
Why It Matters for Security Teams
Keystroke loggers matter because they turn trusted user activity into a surveillance channel for attackers. Once installed, they can defeat strong passwords, bypass “secure” password managers through clipboard or command capture, and harvest secrets that were never meant to be stored. For identity teams, the danger is not limited to human accounts. A logger on a developer or automation workstation can expose NHI credentials, CI/CD tokens, signing keys, and cloud administrator commands that later enable privilege escalation or supply chain compromise.
Security teams need to treat keylogging as a detection, containment, and credential hygiene problem at the same time. That means monitoring for suspicious input hooks, limiting local admin rights, rotating exposed secrets quickly, and reducing the value of any single workstation session. In regulated environments, the issue also intersects with access governance and incident response expectations described in CISA guidance and, where applicable, privacy obligations tied to captured personal data.
Organisations typically encounter the full impact only after credentials are reused or privileged commands are replayed, at which point keystroke logging becomes operationally unavoidable to investigate and contain.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10 and OWASP Agentic AI Top 10 address the attack and risk surface, while NIST CSF 2.0, NIST SP 800-63 and NIST AI RMF set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST CSF 2.0 | DE.CM-01 | Continuous monitoring helps detect malicious input-capture behavior and related compromise. |
| OWASP Non-Human Identity Top 10 | Keylogging exposes NHI secrets and tokens used by automation and service identities. | |
| NIST SP 800-63 | IAL/AAL | Captured passwords and authenticators undermine identity assurance and authentication strength. |
| NIST AI RMF | AI RMF governance applies when logged credentials expose AI tools, agents, or model operations. | |
| OWASP Agentic AI Top 10 | Agentic systems can leak tool tokens and prompts if a keystroke logger captures operator input. |
Assume typed credentials may be exposed and strengthen authentication with phishing-resistant methods.
Related resources from NHI Mgmt Group
Deepen Your Knowledge
Reviewed and updated by the NHIMG editorial team on August 24, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org