Keyloggers and Spyware: What They Are and How to Find and Remove Them

By J. Mesa

Spyware is software that secretly collects information about what you do on a device. A keylogger, one type of spyware, records every key you press, including passwords and card numbers. Both run quietly, so you may not notice until money disappears or an account gets taken over.

What they do

  • Keyloggers capture keystrokes and send them to an attacker.
  • Screen capture tools record screenshots or video of your activity.
  • Infostealers pull saved passwords, cookies, and session tokens from your browser, which lets attackers log in without your password.
  • Stalkerware tracks a person’s location, messages, and calls on a phone, usually installed by someone who has had physical access.
  • Adware and trackers collect browsing data for advertising and sometimes load malicious content.

How they get onto devices

  • A phishing email with a malicious attachment or link
  • A fake software download or a pirated program
  • An infected USB drive
  • A malicious browser extension or app
  • A weak password on a remote access tool
  • Physical access, such as a hardware keylogger plugged between a keyboard and a computer

Signs to watch for

  • The device runs slower than usual, or the battery drains quickly.
  • Unfamiliar programs, extensions, or startup items appear.
  • The webcam light turns on, or the microphone activates unexpectedly.
  • Your browser’s home page or search engine changes.
  • Accounts show logins from unusual locations.
  • Security software turns off or reports a threat that returns.
  • On a phone, you see unexpected data use, apps with broad permissions, or settings you did not change.

Skilled spyware can hide, so absence of signs does not prove safety.

What to do if you suspect it

  • Use a different, clean device to change passwords for important accounts, starting with email and banking. Sign out of all sessions.
  • Run a full scan with up-to-date security software. Tools that detect behavior, as explained in our antivirus versus EDR post, catch more.
  • Review installed programs and extensions, and remove what you do not recognize.
  • Check startup items and scheduled tasks.
  • Look at admin and remote access settings for unknown accounts or tools.
  • Back up your files, scan the backup, and consider wiping and reinstalling the system if the problem persists. Reinstalling is the surest way to remove deep infections.
  • Inspect for hardware devices attached to keyboard cables on desktop machines.
  • Watch your accounts and your credit. Consider a credit freeze if personal details were exposed.
  • Treat it as an incident. See incident versus breach.

For phones, review app permissions, remove unfamiliar apps and device administrator rights, update the operating system, and reset the phone if needed. If you fear a person installed stalkerware, use a safe device to seek help and consider contacting a local support organization before you remove it, since removal may alert the other person.

Prevention

  • Keep systems and apps updated. See patch management.
  • Use standard accounts instead of admin accounts for everyday work.
  • Install software only from trusted sources.
  • Use multi-factor authentication, so a stolen password is not enough. A hardware key or authenticator resists many attacks.
  • Use a password manager, which avoids typing passwords and can reduce keylogger exposure.
  • Lock your screen and secure your devices physically.
  • Train staff to spot suspicious messages and downloads.

For businesses

A keylogger on one accountant’s computer can expose bank credentials for the whole company. Limit who can access payment systems, require company-managed devices for financial work, and monitor sign-ins for unusual activity. These habits belong in the plan from our cybersecurity guide.

Hardware keyloggers and physical tampering

Not all keyloggers are software. A hardware keylogger is a small device placed between a keyboard and a computer, or hidden inside a keyboard. It records keystrokes without leaving a trace on the operating system, so antivirus tools cannot see it. These devices appear in shared offices, internet cafes, hotel business centers, and any place where an outsider can get alone with a computer for a minute.

You can reduce the risk with simple practices.

  • Look at the back of desktop computers occasionally for unfamiliar adapters.
  • Lock offices and server rooms, and challenge unfamiliar visitors politely.
  • Use a laptop’s built-in keyboard in public places.
  • Avoid typing sensitive passwords on shared computers.
  • Use a password manager to fill credentials, which removes the keystrokes.

Phones and stalkerware

Stalkerware apps are designed to hide on a phone and report location, messages, and calls. They are most often installed by someone the victim knows. Signs include a battery that drains faster than usual, unexplained data use, and apps with strange names that request broad permissions. Updating the phone’s operating system, reviewing permissions, and checking for administrator apps can reveal suspicious software.

If you believe someone you know installed monitoring software, think about safety before you act. Removing it may alert the person. Consider contacting a local support organization or a trusted friend, and use a different device to research your options. Resetting the phone to factory settings removes most threats, but you should back up only your own files first and avoid restoring a full backup that may include the spyware.

What infostealers target in a business

Modern infostealers focus on a small set of valuables.

  • Saved passwords and autofill data in browsers
  • Session cookies that grant access to cloud accounts
  • Cryptocurrency wallets and payment details
  • Files with useful names, such as passwords, tax, and payroll
  • Remote access tool configurations

Because they steal sessions as well as passwords, they can bypass some forms of multi-factor authentication. After a suspected infection, sign out of all sessions and change passwords from a clean device, as we recommend in our post on what happens to stolen data.

A response routine for the office

  • Report the odd behavior to your IT contact immediately.
  • Isolate the computer from the network.
  • Preserve details: when the problem started, what the user last did, and any messages that appeared.
  • Clean or rebuild the machine under professional guidance.
  • Reset accounts and revoke sessions.
  • Review for any further spread, and consider whether the event is an incident or a breach, using the approach in our guide to incidents versus breaches.

The rebuild step matters. A system that has run spyware cannot be fully trusted until it is wiped and reinstalled from a clean source.

The bottom line

Spyware depends on you installing it or leaving a door open. Update your devices, avoid risky downloads, use strong second factors, and act quickly when behavior seems odd.

Related reading: Browser Extension Security: Which Add-Ons Are Safe to Install? and Safe and Risky Email Attachments: Which File Types to Trust, How to Spot a Phishing Email: 9 Warning Signs, Antivirus vs. EDR: What Is the Difference, and Which Does Your Business Need?, How to Freeze Your Credit: A Step-by-Step Guide.