Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Is a Keylogger?

A keylogger is software or hardware that secretly records keystrokes to capture passwords, messages, and other sensitive input, usually as part of a wider malware infection.

Illustration for the cybersecurity term Keylogger
Home / Blog / Cybersecurity Terms / What Is a Keylogger?
17 November 2026

What Is a Keylogger?

What Is a Keylogger?

A keylogger, short for keystroke logger, is a tool that records what a user types—passwords, card numbers, emails, chat messages, search terms—and sends that record to someone else. Keyloggers can be small hardware devices or, far more commonly, software running silently on a compromised computer or phone.

MITRE ATT&CK tracks the technique as T1056.001, Input Capture: Keylogging. It is rarely the whole attack. Keystroke capture is usually one module inside a remote access trojan or information stealer, used to harvest credentials that open the door to email, VPN, and banking accounts.

How Keyloggers Capture Input

Hardware Keyloggers

A small adapter between a keyboard and a USB port, or a modified keyboard or cable, stores keystrokes in internal memory or transmits them over Wi-Fi. They need physical access, so they turn up in shared spaces: hot desks, reception PCs, hotel business centres, and kiosks. No antivirus product will detect them, because no software is involved.

Software Keyloggers

Many modern families also capture screenshots, clipboard contents, and saved browser credentials, since passwords pasted from a password manager never pass through the keyboard.

How Infections Happen

Most software keyloggers arrive through phishing emails carrying malicious attachments—fake invoices, shipping notices, or purchase orders are the classic lures. Others come bundled with cracked software, malvertising, or fake browser updates. Agent Tesla and Snake Keylogger, both sold on criminal forums as commodity malware, have been among the most frequently observed information stealers in recent years and specialise in exactly this kind of mass email campaign.

A close relative is the web skimmer. In 2018, attackers injected malicious JavaScript into British Airways’ website and app to capture payment card details as customers typed them. The ICO later fined the airline £20 million for failing to protect personal data.

Signs That a Device May Be Logging Keystrokes

Keyloggers are designed to be invisible, so obvious symptoms are uncommon. Clues worth investigating include:

An EDR platform is far better placed than a user to catch these behaviours, because it can see API hooking, suspicious child processes, and network beacons across the whole estate.

Defences That Work

  1. Phishing-resistant authentication. FIDO2 security keys and passkeys do not rely on anything the user types, so a captured password alone is not enough. See our note on multi-factor authentication.
  2. Endpoint detection and response with behavioural rules for keylogging and credential theft.
  3. Application allowlisting through tools such as Windows Defender Application Control, so unknown executables cannot run.
  4. Email security that sandboxes attachments and strips macros.
  5. Extension control in managed browsers, allowing only approved add-ons.
  6. Physical checks of shared and public-facing machines.
  7. User awareness so staff recognise the invoice-themed lures that deliver most commodity stealers.

Legitimate Use and the Law

Keystroke monitoring software is sold for parental control and employee monitoring. In the UK, installing a keylogger on someone else’s device without authorisation is an offence under the Computer Misuse Act 1990. Employers who monitor staff must also meet UK GDPR requirements, and the ICO regards keystroke logging as highly intrusive: it is very difficult to justify outside narrow, clearly documented circumstances.

Because most keyloggers arrive by email, testing how your staff respond to realistic lures through our social engineering services is a practical first step.

FAQ – Frequently Asked Questions

Can Antivirus Detect Keyloggers?

Antivirus detects most known commodity keyloggers such as Agent Tesla, especially when signatures are up to date. It is less reliable against new variants, kernel-level loggers, and malicious browser extensions, and it cannot detect hardware devices at all. Behaviour-based EDR improves the odds considerably by flagging the actions a keylogger must take, such as hooking keyboard input and sending data to remote servers.

Does a Password Manager Protect Me From Keyloggers?

Partly. Autofill means your password is never typed, so a pure keystroke logger misses it. However, many modern stealers also capture clipboard contents, take screenshots, and steal saved browser credentials and session cookies. A password manager reduces exposure but should be combined with phishing-resistant MFA, which ensures a stolen password alone does not grant access to your accounts.

What Should I Do If I Find a Keylogger?

Disconnect the device from the network but do not wipe it yet, as evidence may be needed. From a separate, clean device, change passwords for every account used on the affected machine, starting with email and administrator accounts, and revoke active sessions. Then investigate how the keylogger arrived, check other machines for the same indicators, and rebuild the affected device from a trusted image.

Are Keyloggers Illegal in the UK?

The software itself is not illegal to own, but using it on a device you do not own or are not authorised to monitor is an offence under the Computer Misuse Act 1990 and may also breach data protection law. Employers face strict UK GDPR requirements, and the ICO considers keystroke logging so intrusive that it is very hard to justify in normal workplaces.

Related Terms

You May Be Interested In These

What Is Evil-WinRM?

Cybersecurity Terms

17 November 2026

What Is Evil-WinRM?

Read More
What Is Distributed Tracing in Security?

Cybersecurity Terms

17 November 2026

What Is Distributed Tracing in Security?

Read More