Use this when keystrokes may be captured.
Keylogger
A keylogger records keystrokes, and often screenshots or clipboard data, to steal passwords and messages. It can be software or a hardware device on the keyboard cable.
1. Keyloggers capture keystrokes (software or hardware).
2. Detect via EDR (keyboard hooks).
3. Physical inspection for hardware devices.
4. Phishing-resistant MFA reduces password value.
5. Reset credentials after infection.
keystrokes → captured → exfiltrated
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Detection Verify boundary
- EDR detections for keyboard hooks (
SetWindowsHookExwith WH_KEYBOARD_LL). - Unknown browser extensions with broad permissions.
- Physical inspection of keyboard cables and USB ports on shared or public PCs.
- Accessibility service permissions on Android granted to unknown apps.
Step 2 Common mistakes Narrow the fault
- No MFA, so captured passwords are enough.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Keyloggers can be software or hardware on the keyboard cable.
- They capture passwords and messages.
- MFA limits the value of stolen passwords.
- EDR keylogger behaviour detections — hooks
- Hardware keylogger checks (physical) — devices
- MFA (phishing-resistant) — reduces impact
ReferenceWhy it matters1 section · depth on demand
Defences
- EDR and anti-malware for software keyloggers.
- Physical checks for USB or inline hardware devices on shared and public computers.
- MFA and passkeys so a captured password alone is not enough.
ReferenceImportant terms & boundaries2 sections · depth on demand
Types
In depth
A keylogger records keystrokes — and often clipboard contents and screenshots — to capture passwords, messages and other typed data. Software keyloggers run as malware on the system; hardware keyloggers are small devices placed between keyboard and computer.
Defences:
- EDR to detect keyboard hooking and suspicious input-capture behaviour.
- Phishing-resistant MFA (FIDO2/passkeys), so captured passwords alone are not enough.
- Password managers with autofill, reducing typing of secrets.
- Physical inspection and controls for shared and public workstations.
- Application control to prevent unknown executables.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Malware → Keylogger. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://attack.mitre.org/techniques/enterprise/ · confidence 94%