Security & Privacy

Keylogger

Also known as: keystroke logger, keylogging, keystroke logging

A keylogger is software or hardware that secretly records keystrokes typed on a computer or phone, capturing passwords, messages, credit card numbers, and anything else.

Software keyloggers usually arrive as malware, while hardware keyloggers are small devices plugged between a keyboard and a computer. While keyloggers are a classic spying tool, multi-factor authentication and password managers that autofill credentials limit the damage they can do.

Keylogger, explained at three levels

At home

A keylogger is like someone hiding behind you with a notepad, writing down every key you press. It can be a hidden program, usually arriving with malware, that sees keystrokes before they reach your apps, or a tiny device plugged in between keyboard and computer. Either way, the log ends up with a criminal, who reads your passwords, messages, and card numbers from it.

At work

A keylogger is software or a small hardware device that secretly records every keystroke on a computer. On a work machine, that captures logins to banking, payroll, and confidential systems, plus anything typed in emails or documents, and passes it to an attacker. Businesses limit the damage with endpoint protection that spots keylogging behaviour and MFA, so a captured password alone can't open an account.

Real-world examples

At home

Aisha logged into her email at a hotel business centre. Days later her account was hacked. The hotel later found a hardware keylogger attached to that computer's keyboard.

At work

Marcus manages IT at a Montreal accounting firm. EDR flagged keylogging behaviour from a fake PDF reader a staff member installed, and he removed it and reset the person's passwords.

How it compares

featureSoftware keyloggerHardware keylogger
FormHidden programSmall physical device
How it gets thereMalware downloadSomeone plugs it in
DetectionSecurity softwarePhysical inspection
Remote access to logsUsuallySometimes, if wireless

Software keyloggers sneak in online. Hardware ones need physical access.

For analysts

I'd make MFA mandatory for critical systems so a captured password isn't enough. And I'd remind staff never to log into work accounts on public computers.

History & origin

One of the earliest known keyloggers was a Soviet bug planted in IBM Selectric typewriters at the US embassy in Moscow, discovered in 1984 in an investigation known as Project Gunman; it had captured typed text for years. Software keyloggers spread with personal computers and became common in banking trojans in the 2000s. Some keyloggers were sold as parental or employee monitoring tools, blurring lines with stalkerware. Hardware keyloggers have been found in libraries and offices, sometimes used to steal logins from shared computers. Today, keylogging is one feature among many in infostealer and remote access malware. In my view, the Selectric bug is a great reminder that spying on keyboards is far older than the internet.