Malware & ransomware

Hardware Keylogger: What It Is, How It Works and How to Find It

A hardware keylogger needs no software and no password to steal what you type. Here is how it works, where it hides, and how to find and remove one.

Cysoro Security TeamPublished · 8 min read
KEYLOGGERHidden in the cable. Silent.MALWARE & RANSOMWAREHardwarekeyloggerEvery keystroke, copied in secret.
Quick answer

A hardware keylogger is a small physical device that sits between a keyboard and a computer, or inside the keyboard itself, and records every keystroke before it reaches the operating system. Because it works below the software level, antivirus cannot see it, so detection depends on a physical inspection of cables, ports and keyboards, followed by changing any passwords that may have been captured.

Key takeaways

  • A hardware keylogger records keystrokes below the operating system, so antivirus and scans cannot detect it.
  • It needs physical access to install, which makes locked rooms, cable checks and port control the best defenses.
  • If you find one, stop typing passwords, preserve it as evidence at work, and change passwords from a clean device.

You type your email password, your bank login, and a private message. Nothing looks wrong. Yet every keystroke has already been copied — not by malware on your computer, but by a small device hidden in the cable between your keyboard and your PC.

What is a hardware keylogger?

A hardware keylogger is a physical device that records every keystroke typed on a keyboard. It usually plugs inline between the keyboard cable and the computer, or it is built into a keyboard, a cable, or a small adapter.

Unlike a software keylogger, it needs no program on your computer, no admin rights, and no internet connection to record. It works at the hardware level, intercepting the signal as it travels from the keyboard to the computer.

MITRE ATT&CK classifies keylogging as a form of input capture under technique T1056.001. Attackers use it to steal passwords, card numbers, and private messages without triggering software defenses.

How does a hardware keylogger work?

A hardware keylogger sits in the path between the keyboard and the computer and copies the keystroke signal as it passes through. The computer still receives the keystroke normally, so typing feels exactly the same.

Most models store the captured keystrokes in internal flash memory. The attacker later returns, removes the device, and reads the log on another computer. Some wireless models send the log over Wi-Fi or Bluetooth instead, so the attacker does not need to return.

Because the device operates below the operating system, it does not appear in Task Manager, does not create a running process, and does not leave files on the disk. That is what makes it so hard to detect with software alone. Detection guides agree: hardware keyloggers skip the operating system entirely, so physical inspection is the main defense.

How a hardware keylogger intercepts typingKeyboardyou type hereKeyloggercopies everykeystrokeComputersees normal typingThe log stays in the device memory until the attacker retrieves it.
A hardware keylogger copies keystrokes in transit. Illustration by Cysoro.

What are the main types of hardware keylogger?

Hardware keyloggers come in several forms, but they all do the same job: record keystrokes without software. The form matters because it decides where you should look.

USB inline keyloggers

The most common type is a small USB adapter that plugs between a USB keyboard and the computer. It often looks like an innocent extension or adapter, and it stores keystrokes in onboard memory.

PS/2 inline keyloggers

Older PS/2 keyloggers attach inline with PS/2 keyboard cables. They still appear in legacy office and industrial environments, and they work the same way as USB models.

Keyboard-embedded keyloggers

Some keyloggers are built into a keyboard itself, or hidden inside a replacement keyboard. Swapping in a tampered keyboard is a quieter attack because there is no extra adapter to spot.

Cable, adapter, and wireless keyloggers

Other models hide inside a cable, a docking station, or a charger-style accessory. Wireless models transmit logs over Wi-Fi or Bluetooth, so the attacker may never need to touch the device again.

There are also acoustic and electromagnetic variants that try to reconstruct keystrokes from sound or signals, but those are research-grade attacks, not the small inline devices most people will ever meet.

Hardware vs software keylogger: what is the difference?

The main difference is where the recording happens. A software keylogger runs as a program on the computer; a hardware keylogger records the signal before it ever reaches the computer.

FactorHardware keyloggerSoftware keylogger
How it is installedPlugged in or built into a keyboard or cablePhishing, trojan, malicious download, or extension
Needs physical access?Yes, to install and often to retrieveNo, can be installed remotely
Antivirus can see it?Usually noOften yes, by signature or behavior
Works across operating systems?Yes, it is OS-independentNo, it targets one OS
How it is detectedPhysical inspection of cables and portsScans, process review, and startup checks
How it is removedUnplug or replace the deviceRemove the program or reinstall the OS
Typical targetShared desks, offices, public computersAny computer reached by phishing or malware

Software keyloggers are easier to deploy at scale, which is why they are more common. Hardware keyloggers are rarer, but they are harder to detect and they work even on a fully patched, well-protected computer. See the keylogger detection guide from CyberExperts for the same physical-check steps.

What can a hardware keylogger capture?

A hardware keylogger captures everything typed on the affected keyboard. That includes passwords, email addresses, card numbers, private messages, search terms, and one-time codes typed by hand.

It does not usually capture what you paste from a password manager, because nothing is typed. It also does not capture what you type on a different keyboard, such as a laptop's built-in keyboard when an external one is compromised, or an on-screen keyboard.

That distinction matters for defense. A password manager and passkeys reduce what a keylogger can steal, because there is less typing to capture. Our guide to spotting a hacked phone covers the software side of the same problem on mobile devices.

Who is most at risk from a hardware keylogger?

Anyone who uses a shared or publicly accessible computer is at higher risk. The attacker needs physical access, even if only for a few seconds, so the risk follows the location, not the person.

High-risk settings include shared office desks, hot-desking areas, reception computers, libraries, internet cafes, hotel business centers, and classrooms. A device planted on a shared machine can capture many people's passwords in a single day.

At home, the risk is lower, but it is not zero. A visitor, a contractor, a housemate, or a former partner with access to your desk could plant one. In workplaces, an insider with access to a colleague's desk is the most likely installer.

How do you detect a hardware keylogger?

Detection is a physical task. No scan will reliably find a device that runs no software, so you must look at the hardware itself.

  1. Follow the keyboard cable. Trace it from the keyboard to the computer. Look for any inline adapter, bulge, or extra box you did not put there.
  2. Check the back of the computer. Look at every USB and PS/2 port, including ports on a docking station or monitor hub.
  3. Compare the keyboard. If the keyboard is not the one you expect, or the cable looks thicker or different, treat it as suspicious.
  4. Check USB devices. On Windows, open Device Manager and look for an unfamiliar USB input device. Many keyloggers do not appear here, so a clean list does not prove you are safe.
  5. Try a different keyboard. If behavior changes with a known-good keyboard on a different computer, the original keyboard may be tampered with.
  6. Inspect regularly. In shared offices, add a quick cable check to a weekly routine, and photograph the setup so changes are easy to spot.

There are no reliable symptoms in software. Typing feels normal, the computer runs normally, and no warning appears. If you only check software, you will miss a hardware keylogger entirely.

Hardware keylogger check: four places to look1. Cableany inline adapteror bulge?2. Portsextra dongle atthe back?3. Keyboardthe one youexpect?4. Dockcheck hubs anddocking stationsIf in doubt at work, report it before unplugging it.Photograph the setup first, so you have a record of what was there.
Four places to check for a hardware keylogger. Illustration by Cysoro.

What should you do if you find a hardware keylogger?

Stop typing passwords on that keyboard immediately. Do not log in to email, banking, or work systems from that machine until you have dealt with the device and changed your passwords.

  1. At work, report it first. Tell IT or security before you unplug it. The device may be evidence, and IT needs to know who else may be affected.
  2. At home, power off the computer. Then remove the suspicious device or replace the keyboard.
  3. Do not plug the device into another computer to look at it. It may contain malware, and you could spread the problem.
  4. Change passwords from a clean device. Start with email, because email resets almost everything else, then banking and work accounts.
  5. Check for password reuse. If a stolen password was used anywhere else, change it there too. You can check whether a password appears in known breaches with the pwned password checker.
  6. Review recent activity. Check email forwarding rules, login history, and bank statements for anything unfamiliar.
Do not type a new password on the same keyboardIf the keyboard itself is tampered with, changing a password on it just hands the new one to the attacker. Use a different, trusted keyboard or device first.

How do you prevent a hardware keylogger?

Prevention is about physical access. You cannot patch a keyboard cable, so you control who can reach it and how often someone looks at it.

  • Lock the room. Keep computers with sensitive access in rooms that lock, and do not leave them unattended in public areas.
  • Use cable locks and tamper seals. A simple seal or a locked cable makes a planted device obvious and harder to install quietly.
  • Check cables on a schedule. In an office, assign someone to check shared desks weekly and after any maintenance visit.
  • Control USB ports. Where possible, block unused ports or use port locks, and do not allow unknown USB devices on sensitive machines.
  • Use a password manager and passkeys. Less typing means less for a keylogger to capture. Generate strong, unique passwords with the free password generator.
  • Prefer the built-in keyboard on a laptop. It has no exposed cable for an inline device to sit in.

For a wider baseline, our small business cybersecurity checklist covers physical security alongside updates, backups, and access control.

It depends on who installs it, why, and whether the people being recorded know about it. The law differs by country and, in the US, by state.

Some employers use monitoring tools where the law and company policy allow it, usually with notice to staff and a clear policy. Secretly recording another person without consent is illegal in many places, and using a keylogger to steal passwords is a crime.

If you are an employer considering monitoring, get legal advice first and put the policy in writing. If you find a device at work, let IT and legal handle it rather than investigating on your own.

The bottom line

A hardware keylogger is a small, silent threat: it needs no software, no password, and no warning to steal everything you type. That is also its weakness — it needs physical access, and a careful look at your cables can find it.

Follow the cable, check the ports, and use a password manager and passkeys so there is less typing to steal. If you find a device, stop typing, report it, and change your passwords from a clean device, starting with email.

Frequently asked questions

What is a hardware keylogger?

A hardware keylogger is a physical device that records keystrokes from a keyboard. It usually sits inline between the keyboard cable and the computer, or is built into a keyboard, cable or adapter, and stores what you type in its own memory.

Can antivirus detect a hardware keylogger?

Usually no. A hardware keylogger runs no software on the computer and works below the operating system, so antivirus has nothing to scan. Detection is mainly physical: inspect cables, ports and keyboards.

How do I know if I have a hardware keylogger?

Look for an unfamiliar adapter between the keyboard and the computer, a keyboard you do not recognize, or a cable that looks thicker or different from the original. Some models appear as an extra USB device, but many do not show up at all.

How do I remove a hardware keylogger?

Power off the computer, follow the keyboard cable to the port, and remove any unfamiliar inline device. At work, report it to IT first so it can be kept as evidence. Then change passwords from a clean device.

Can a hardware keylogger steal passwords?

Yes. It records everything you type, including passwords, card numbers, private messages and two-factor codes typed on the keyboard. That is why changing passwords after finding one is essential.

Do hardware keyloggers work on laptops?

They are harder to use on laptops because the built-in keyboard has no exposed cable. Attackers may use a tampered external keyboard, a malicious USB device, or a compromised docking station instead.

Are hardware keyloggers legal?

It depends on consent and purpose. Employers may use monitoring tools where the law and company policy allow it, with notice to staff. Secretly recording another person without consent is illegal in many places.

How can I prevent a hardware keylogger?

Limit physical access to computers, lock rooms and desks, use tamper-evident seals or cable locks where needed, check cables regularly, and prefer on-screen keyboards or passkeys for the most sensitive logins.

Sources

  1. Malware News — What Is a Keylogger? Definition, Types, Detection and Removal
  2. The Last Tech — Hardware Keylogger in Cybersecurity: Detection & Prevention
  3. HackingPC — Keylogger Detection and Removal Guide
  4. CyberExperts — How to Detect and Remove Keyloggers on Your PC or Phone
  5. MITRE ATT&CK — Input Capture: Keylogging
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against MITRE ATT&CK input capture guidance and 2026 keylogger detection guides from security researchers.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free