A keylogger is hidden software or a device that secretly records the keys you press.
This guide is for anyone who types passwords on a computer, and for people starting out in IT support. You do not need to be a target to be affected: a keylogger on a shared work computer can capture everyone who signs in there.
In short
- A keylogger copies what you type, such as passwords and card numbers, and passes it to someone else.
- Most arrive like other harmful software: through attachments, fake downloads or unpatched computers.
- Updates, security software and limited admin rights make it harder for one to get installed.
- Passkeys and phishing-resistant sign-in help most, because there is no reusable password to type and steal.
What you will learn
- Explain what a keylogger is and what it is after.
- Spot the common ways a keylogger gets onto a computer.
- Check which of your accounts still depend only on a typed password.
- Ask the right first questions if a keylogger is found at work.
- Key presses (keystrokes)
- each letter, number or key you press on a keyboard.
- Harmful software (malware)
- software made to damage a device, spy on it or steal from it.
- Sign-in without a password (passkey)
- a way to log in by unlocking your own device, with no password to type.
What is a keylogger?
Think of someone standing silently behind you, writing down every key you press. You do not see them, and they do not touch your screen. Later they read the notes and pick out your passwords.
A keylogger does the same job inside a computer. It is usually a type of malware, meaning harmful software. It records keystrokes as they are typed, so criminals can collect usernames and passwords.[1] It then sends what it collects back to the person running it.
Keyloggers can run on Windows, Mac and Linux computers.[1] Some are small plug-in devices fitted between a keyboard and a computer, but most are software.
Where the comparison stops working: you might notice a person behind you. A keylogger usually gives no sign at all, and it can keep recording for weeks.
Why does it matter?
Stolen passwords let criminals sign in as you. A security knowledge base used by defenders notes that attackers use keylogging to get new logins when other ways of stealing passwords do not work.[1]
If you use a computer at home
What could happen: a fake download installs a keylogger and your email password is stolen.
Check this: keep updates switched on and add a passkey or second check to your email.
Next: Passkeys for Beginners
If you are new to IT support
What could happen: you clean a keylogger off a laptop but forget that the passwords typed on it are already gone.
Check this: after removal, change the passwords used on that machine from a clean device.
If you run a small business
What could happen: one shared front desk computer gives a criminal every staff password typed on it.
Check this: give staff everyday accounts without admin rights, and keep shared computers up to date.
Next: Malware for Beginners
What does it look like?
A keylogger is hard to see on screen, so here is a made-up record of what one might collect. It shows why it is so useful to a criminal.
Example only. All values are made up.
[09:02] window: Webmail sign-in (1)
typed: [email protected]
typed: FAKE-Password-0000 (2)
[09:15] window: Online banking
typed: 0000 0000 0000 0000 (3)
[09:40] window: Chat
typed: see you at lunch (4)
- Many keyloggers note which window was open, so they know what each line was for.
- In a real file, this line would contain the person's actual email password.
- Card numbers and other private details can be captured the same way.
- Everyday messages are captured too, which can reveal personal details.
Why this is risky: the criminal gets your password and knows exactly which site it belongs to.
The safer way: stop the keylogger getting in, and use sign-in methods that do not rely on a typed password. With a passkey, you approve the sign-in on your own device, so there is no reusable password to steal.[4]
How does it work?
- It gets in. Common routes for malware include harmful email attachments, risky websites and badly protected remote access.[2]
- It hides. It runs quietly in the background and may start again each time the computer starts.
- It listens. It hooks into the parts of the computer that handle the keyboard and copies each key press.[1]
- It sends. It passes what it collects back to the criminal, often over the internet.
- The criminal signs in. With the stolen password, they log in as you, unless a second check or a passkey blocks them.

Keyloggers misuse normal parts of the computer, so they are hard to block once they are running.[1] That is why the main defences are keeping them out and making stolen passwords less useful.
A second check, such as a code from an app, helps, but codes typed into a fake page can be captured too. The US cyber defence agency describes passkey-style sign-in as the strongest kind of extra check.[3]
A worked example
Elif Rinaldi works on the front desk at Cedar Opticians, a fictional high street shop. Staff share one desk computer to book patients and check email.
One morning a staff email account starts sending odd messages. Elif calls Darius Achterberg, who has just started doing IT support for the shop.
Darius runs the security software's full scan, and it finds a keylogger. It probably came in with an "invoice" attachment opened last week. He thinks of the silent note-taker. Removing it stops new notes, but the old notes have already left.
So Darius unplugs the computer from the network and removes the keylogger. Then, from a different, clean computer, he helps each person who used the desk change their passwords. He starts with email and the booking system.
He checks the email account's sign-in history and sees logins from an unknown place. He signs out all sessions and turns on a second check for every account that offers it.
Last, he removes admin rights from the shared desk account and switches on automatic updates. He also suggests passkeys where the shop's services support them. Elif adds a note by the desk: "Not sure about an attachment? Ask first." A week later, the sign-in records show no new unknown logins.
Myths and mistakes
| What people think | What is true |
|---|---|
| Removing the keylogger fixes everything. | Passwords already captured are still with the criminal. Change them from a clean device. |
| A slow computer is the main warning sign. | Many keyloggers give no obvious sign. Security software and updates matter more than watching for symptoms. |
| A second check makes keyloggers harmless. | It helps a lot, but typed codes can be stolen too. Passkeys resist this better.[3] |
| Only Windows computers get keyloggers. | Keyloggers exist for Mac and Linux computers as well.[1] |
| Changing passwords on the infected computer is fine. | The keylogger may copy the new password too. Use a different, clean device. |
What can I do this week?
- Turn on automatic updates on your computer and phone.
- Check that security software is on and up to date.
- Add a passkey or a second check to your email and bank accounts.
- Use an everyday account without admin rights for normal work.
- Pause before opening any unexpected attachment, even from someone you know.
Checklist
- Updates are switched on for every device.
- Security software is running and current.
- Day-to-day accounts do not have admin rights.
- Important accounts use a passkey or a second check.
- Shared computers are kept up to date and checked often.
- Staff know to report odd attachments or account activity straight away.
- After a keylogger is found, passwords are changed from a clean device.
Common questions
How do I know if I have a keylogger?
Often you will not, because most give no clear sign. Run a full scan with up-to-date security software. Warning signs include accounts sending messages you did not write, or sign-in alerts from places you do not recognise. If in doubt, ask an IT professional.
Does a password manager stop keyloggers?
It can help, because it fills passwords in without you typing them. But some harmful software can read more than key presses, and you still type the manager's main password. Keep the device clean and protect the manager with a second check. See Password Managers for Beginners.
Can a phone have a keylogger?
Yes, it is possible, usually through a harmful app. Install apps only from the official app store, keep your phone updated and check which apps can read what is on your screen. See Spyware for Beginners.
Are keyloggers always illegal?
Not always. Some organisations use monitoring tools on their own computers, within the law and their written policies. Installing one on someone else's device without permission to steal their information is a crime in many countries.
What should I do first if a keylogger is found?
Disconnect the device from the network and stop typing passwords on it. Then, from a clean device, change your important passwords, starting with email. Sign out all sessions and turn on a passkey or second check. At work, tell IT straight away.
Where next?
Ready for the detail? Read the practitioner guide: Keyloggers Guide. It goes further into how keyloggers hook into computers, how defenders detect them and which controls reduce the risk at scale.
Also useful:
- Malware for Beginners
- Spyware for Beginners
- Passkeys for Beginners
- Malicious Attachments for Beginners
- Hacked Account Recovery for Beginners
Related NHI Mgmt Group resources: Infostealer Threat Guide · Password Managers for Beginners · CIS Control 10 Malware Defenses Guide
Key terms
- Keylogger
- Software or a device that records the keys pressed on a computer.
- Keylogging
- Capturing key presses so an attacker can recover passwords and other private details.
- Malware
- Software made to harm a device, spy on it or steal from it.
- Spyware
- Harmful software that secretly watches a device and collects data without the owner's agreement.
- Infostealer malware
- Harmful software that quietly collects passwords, browser data and other login details.
- Passkey
- A way to sign in by unlocking your own device, with no password to type.
- Phishing-resistant MFA
- Extra sign-in checks that are hard to copy, trick or replay.
Sources and further reading
- Input Capture: Keylogging (T1056.001). MITRE ATT&CK. https://attack.mitre.org/techniques/T1056/001/, accessed 28 Nov 2026.
- Mitigating malware and ransomware attacks. National Cyber Security Centre (UK). https://www.ncsc.gov.uk/guidance/mitigating-malware-and-ransomware-attacks, accessed 28 Nov 2026.
- Implementing Phishing-Resistant MFA (fact sheet). CISA, October 2022. https://www.cisa.gov/sites/default/files/publications/fact-sheet-implementing-phishing-resistant-mfa-508c.pdf, accessed 28 Nov 2026.
- Passkeys. FIDO Alliance. https://fidoalliance.org/passkeys/, accessed 28 Nov 2026.