What Is a Keylogger? How It Steals Passwords and How to Remove It

A keylogger records every keystroke, including passwords, before encryption can protect them. Learn how they work, the warning signs, and removal.

By Galactic News Editorial · Published 2026-11-19T10:37:34+00:00 · Updated 2026-11-19T10:37:34+00:00

What is a keylogger and how it steals passwords

What Is a Keylogger? How It Steals Passwords and How to Remove It

A keylogger is software or hardware that records every key you press. It captures passwords, card numbers, and private messages as you type them. Most victims never notice it. This guide explains how keyloggers work, the warning signs, and how to remove one.

What Is a Keylogger?

A keylogger is a tool that logs keystrokes. Kaspersky defines it as software or hardware that intercepts and records input from the keyboard of a compromised machine. It often sits between the keyboard and the operating system. It records each keypress without the user knowing.

Keyloggers fall into two main groups. Software keyloggers are programs installed on a device. Hardware keyloggers are small devices plugged into a keyboard cable or USB port. Software versions are far more common. They usually arrive hidden inside other malware, such as a Trojan.

Not every keylogger is malicious. Employers may install monitoring software on work computers they own. Parents may use it on a family device. Law enforcement can use it under legal authority. The problem starts when it is installed secretly, without the owner's knowledge or consent. Then it is spyware, and it is malware.

How a Keylogger Steals Passwords

A keylogger defeats even a strong password. It captures the password as you type it, before any encryption protects it. The password never reaches the website in plain text, but the keylogger already has it.

Modern keyloggers do more than watch the keyboard. Many also capture screenshots, read the clipboard, and steal saved browser passwords. Some record the contents of web forms just before the browser sends them. Security researchers call these form grabbers. They can grab a login even if you paste the password instead of typing it.

The stolen data is usually sent to the attacker over the internet. Some loggers store it in a local file for later pickup. Well-known malware families include keylogging features. CISA lists Agent Tesla among top malware strains, noting it steals data from mail clients and browsers and captures screenshots and clipboard contents. FormBook, another strain CISA describes, can log keys and capture browser and email passwords.

Once an attacker has your email password, the damage spreads fast. Email resets most other accounts. That is why a keylogger infection should be treated as a full account compromise, not a minor nuisance.

Types of Keyloggers

Software keyloggers work at different levels of the system. API-based loggers hook into the operating system to read each keystroke. Kernel-level loggers run as drivers with deep system access. Kernel-level versions are harder to detect, because they operate below the level where most security software looks.

Hardware keyloggers need physical access. An attacker plugs a small adapter between the keyboard and the computer. It records keystrokes to its own memory. It is invisible to antivirus software, because no program runs on the computer at all. Shared or public computers face the highest risk from this type.

Form grabbers and clipboard stealers are a third group. They do not watch the keyboard. They read what you submit in a login form, or what you copy and paste. Paste-based password entry does not protect you from these.

TypeHow it worksHow to spot it
Software (API-level)Hooks into the operating system and records keystrokesAntivirus scan, unfamiliar processes, strange startup entries
Software (kernel-level)Runs as a driver below the operating systemOften needs a full reinstall to remove with confidence
HardwareSmall device between keyboard and computerPhysical check of cables and USB ports
Form grabberReads login forms before the browser sends themAntivirus scan; pasting passwords does not help

Warning Signs of a Keylogger

Keyloggers are built to hide, so there is rarely a clear alert. Still, several signs should raise suspicion.

None of these signs proves a keylogger is present. Each can have another cause. Together, they are a reason to investigate. A clean antivirus scan does not prove the device is clean either. New or custom-built loggers can evade detection, and no antivirus can see a hardware device.

How to Remove a Keylogger

Work through these steps in order. Do not log in to banking or email on the infected computer until it is clean.

  1. Disconnect from the internet. Unplug the network cable or turn off Wi-Fi. This stops the logger sending more data out.
  2. Check for a hardware device. Follow the keyboard cable to the computer. Look for a small adapter between the cable and the port. Check USB ports and docking stations. Unplug anything you do not recognize.
  3. Run a full antivirus scan. Open Windows Security, go to Virus and threat protection, then Scan options, then Full scan. Quarantine or remove anything it finds. On a Mac, review Activity Monitor, Login Items, and the Input Monitoring permission list.
  4. Try a second-opinion scanner. A different scanner can catch what the first missed. Malwarebytes is a widely used second-opinion tool.
  5. Uninstall programs you do not recognize. On Windows 11, open Settings, then Apps, then Installed apps. On Windows 10, it is Settings, then Apps, then Apps and features. Commercial loggers often hide from this list, so a missing entry proves nothing.
  6. Check startup entries. Open Task Manager, then Startup apps. Disable anything unfamiliar. Research the name before deleting it, so you do not remove a legitimate driver.
  7. Change your passwords from a clean device. Start with email, then banking, then everything else. Use a different device that you trust.
  8. Turn on two-factor authentication. A stolen password alone should not be enough to get in. Use an authenticator app or a security key where possible.
  9. Reinstall if you are still unsure. A kernel-level logger may survive scans. A clean reinstall of the operating system is the most reliable way to be sure.

If the computer belongs to your employer, report the problem to IT instead of handling it yourself. If the logger may have been installed by someone you know, such as a partner, the FTC calls this kind of hidden monitoring app stalkerware. In that case, get advice from a trusted support service before removing it, because the person who installed it may notice.

How to Protect Yourself From Keyloggers

Prevention beats removal. Most keyloggers arrive through phishing attachments and downloads from untrusted sites. Keep your operating system and browser updated, with automatic updates turned on. Run reputable security software and keep it updated.

Use a password manager. It fills in your passwords for you, so you type them less often. A keylogger cannot capture a password you never typed. The master password is still typed once per session, so protect it with two-factor authentication.

Use a hardware security key for your most important accounts. It generates a fresh challenge for each login. Even if a keylogger captures your password, the attacker cannot log in without the physical key.

Be careful with public and shared computers. Check the keyboard cable before typing a password. Avoid logging in to sensitive accounts on a machine you do not control. If you must, change the password later from your own device.

Download software only from official sources. Free versions of paid programs, cracked software, and email attachments from strangers are common delivery methods for keylogging malware.

Bottom Line

A keylogger records what you type and hands it to someone else. It defeats strong passwords because it captures them before encryption. The fix is a full scan, a check for hardware devices, password changes from a clean machine, and two-factor authentication everywhere it matters. If doubt remains, reinstall the operating system. Prevention is simpler: update your software, use a password manager, and turn on two-factor authentication.