Glossary
Keylogger
Definition
Keylogger: Malicious software, or occasionally a physical device, that records the keys a person presses, usually to capture passwords and other secrets and send them to an attacker.
Also known askeystroke loggerkeyloggingkey logger
In short
A keylogger is malicious software, or occasionally a small physical device, that records the keys you press and passes them to an attacker. Its main target is passwords. Two-step verification limits the damage, because a typed password alone doesn't sign anyone in on another device, and authenticator codes expire within seconds.
Key takeaways
- Keyloggers capture what you type, so passwords and recovery keys typed on an infected device are exposed.
- Most arrive as malware; shared and public computers are the riskiest place to sign in.
- Two-step verification means a logged password isn't enough on its own.
- Change your password from a clean device, never from the one you suspect.
Last reviewed 3 December 2026 by Foxcolab Team
A keylogger is malicious software, or occasionally a small device plugged in between a keyboard and a computer, that records the keys you press and sends them to an attacker. NIST describes it as "a program designed to record which keys are pressed on a computer keyboard" to capture passwords or encryption keys and get around other security measures (NIST). Whatever you type on an infected device, the attacker can read.
How keyloggers work#
MITRE ATT&CK, the public catalog of attacker techniques, says "adversaries may log user keystrokes to intercept credentials as the user types them" (MITRE). Software keyloggers hook into the functions the operating system uses to handle key presses, or read raw keystrokes from the keyboard's buffer. They usually arrive the way other malware does: an attachment, a fake installer, a cracked app. MITRE also notes that attackers may clear your browser's cookies on purpose, so you have to sign in again and type your password while the logger is listening.
A worked example#
You use a hotel business center PC to check a flight and sign in to your work email at example.com. The PC has a keylogger. The next morning someone signs in with your address and password from another country. With two-step verification on, they stop at the code prompt, because the six-digit code they need is on your phone and the one you typed the day before expired long ago. NIST requires that a one-time code be accepted "only once while it is valid" (SP 800-63B-4).
Common mistakes#
- Signing in on shared computers. Hotel, library and kiosk machines are outside your control.
- Changing the password on the infected device. The keylogger records the new one too. Use a clean device.
- Typing a recovery key anywhere. Recovery keys and backup codes are as sensitive as passwords.
- Treating one clean scan as proof. A scan that finds nothing doesn't clear a device you have other reasons to doubt.
A keylogger that reports in real time can still relay a fresh code within its 30 seconds, so cleaning or replacing the device comes first.
In Foxcolab#
Foxcolab's two-step verification asks for a six-digit code from your authenticator app after your password, and the code changes every 30 seconds. A logged password alone doesn't sign anyone in from another device. If you suspect a keylogger, move to a clean device and open Your devices under Security. Sign out the other devices (Sign out all others does it in one step when several are listed), then change your password, which signs out every other session too. Your recovery key can reset your password on its own, so type it only on a device you trust.
Keep exploring
Related terms
- MalwareMalware is any software or file built to harm a device or steal its data, from viruses and trojans to ransomware and spyware. Most of it still arrives through email attachments and links.
- SpywareSpyware is software installed secretly to watch what you do on a device. Here's how it gets in, why encryption can't stop it, and what keeps it out.
- Two-factor authentication (2FA)Two-factor authentication asks for a second kind of proof after your password, so a stolen password alone can't get someone into your account.
- TOTP (time-based one-time password)TOTP is the algorithm behind authenticator-app codes. Your app and the service share a secret and each computes the same short code from it and the current time.
- PasskeyA passkey replaces a password with a key pair your device holds. The site stores only the public half, and the passkey works only on the site it was created for.
- Account takeover (ATO)Account takeover is when someone else gains control of your account and uses it as you. The routes in are reused passwords, phishing, stolen sessions and recovery.
- Password managerA password manager creates, stores and fills a unique password for every account, so you only have to remember the one that unlocks it.
- Endpoint securityEndpoint security protects the laptops, phones and desktops people use to reach data. Here's what it covers and why it matters more when data is end-to-end encrypted.

Foxcolab
Private work tools, without the ads.
Mail, files, documents, spreadsheets and meetings in one account. Files, documents and spreadsheets are end-to-end encrypted.