# What is a keylogger?

> Software or hardware that records every keystroke, capturing passwords as they are typed.

Last reviewed: 2026-09-01

## Keylogger

Category: Attacks

Canonical page: https://moolkey.com/glossary/keylogger

A keylogger records keystrokes and captures passwords at the moment you type them. A 32-character random password is captured as easily as a weak one. This is why keeping the device clean matters alongside choosing a strong password.

### Why strength is irrelevant here

A keylogger does not guess. It reads. This is the same reason phishing beats strong passwords: both attacks capture the secret rather than compute it. The relevant defences are keeping the device clean, using autofill instead of typing, and adding a second factor so a captured password is not sufficient.

### What limits the damage

Two-factor authentication limits some of the damage because a recorded password alone may not complete a login. Autofill reduces exposure because the password is never typed. If you suspect a device is compromised, change passwords from a different device. Otherwise the keylogger may capture the replacements too.

### Sources

- [CISA: Secure Our World](https://www.cisa.gov/secure-our-world): Public guidance for recognizing phishing and protecting high-value accounts.
- [OWASP: Multifactor Authentication Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Multifactor_Authentication_Cheat_Sheet.html): A comparison of authentication factors, recovery paths, and common attack routes.
- [NIST: Computer Security Resource Center glossary](https://csrc.nist.gov/glossary): Canonical terminology used across US computer security guidance.
