Spyware is software secretly installed on a device to gather information about a person or organization without their knowledge, as NIST defines it. It can log keystrokes, steal saved passwords, read messages, track location and turn on a camera or microphone, then send what it collects to someone else. Remove it with a full antivirus scan, and change passwords from a clean device.
Key takeaways
- Spyware is defined by secrecy: it is installed without consent and collects data without the owner's knowledge.
- Infostealers, keyloggers, stalkerware and mercenary spyware such as Pegasus are the main types today.
- Slow performance, pop-ups, a changed homepage and battery drain are warning signs, but good spyware shows no signs at all.
Spyware does not announce itself. It sits quietly on a phone or computer, watches what you do, and sends what it learns to someone else. The longer it runs unnoticed, the more it collects.
What is spyware?
Spyware is software secretly installed on a device to gather information about a person or organization without their knowledge, as NIST defines it in its security glossary. It is a type of malicious code, and its defining trait is secrecy.
CISA describes it more plainly: spyware is software that, when installed on your computer, may send you pop-up ads, redirect your browser, or monitor the websites you visit, and extreme versions may track exactly what keys you type. The data it collects can include passwords, messages, browsing history, location, photos and even live audio or video.
Spyware is one branch of the wider malware family. Ransomware wants to be seen, because the ransom note is the business model. Spyware wants the opposite: the longer it runs unnoticed, the more it collects.
How does spyware work?
Spyware works in three stages: it gets onto a device, hides itself, and quietly collects data and sends it to a server controlled by its operator. Most of the technical effort goes into the second stage, because spyware that gets noticed gets removed.
To hide, spyware disguises itself as a system process or a harmless utility, removes its own icon, and encrypts its traffic. It persists by registering to launch at startup, abusing administrator rights to resist uninstallation, or reinstalling itself through a hidden companion component. On a phone, it often asks for accessibility or device-administrator permissions, because those unlock most of its access in one step.
What are the main types of spyware?
The main types of spyware are infostealers, keyloggers, adware and tracking software, browser hijackers, mobile spyware and stalkerware, and commercial mercenary spyware. They differ in who they target and what they collect.
| Type | What it collects | Who it targets | How it gets in |
|---|---|---|---|
| Infostealer | Saved passwords, cookies, wallets | Anyone | Cracked software, fake updates |
| Keylogger | Every keystroke, screenshots | Anyone | Trojan, malicious attachment |
| Adware / trackers | Browsing habits | Anyone | Bundled free software |
| Browser hijacker | Searches, redirects | Anyone | Free downloads, extensions |
| Stalkerware | Messages, location, calls | Partner or family member | Physical access to phone |
| Mercenary spyware | Everything on the phone | Journalists, activists, officials | Zero-click exploit |
Infostealers
Infostealers are the most damaging kind for businesses today. They run once or briefly, copy saved browser passwords, session cookies and crypto wallets in seconds, and upload the lot. Stolen logs are then sold in bulk, and the session cookies let an attacker log in as you without needing your password.
Keyloggers
Keyloggers record every keystroke, sometimes with screenshots. They are older than infostealers and still common inside larger malware kits, often as one module of a remote access Trojan.
Stalkerware
Stalkerware is commercial monitoring software installed on a partner's or relative's phone to track messages, location, photos and calls, running hidden in the background. It usually arrives through a few minutes of physical access to an unlocked phone. In 2021 the FTC banned SpyFone and its CEO from the surveillance business, the first FTC case to win such a ban.
Mercenary spyware
Mercenary spyware is built by commercial vendors and sold to governments. The best-known example is NSO Group's Pegasus, which reached iPhones through a zero-click exploit in iMessage, as shown by Citizen Lab in September 2021 and patched in iOS 14.8. It is rare, targeted and expensive, and it needs no click at all.
How do you know if you have spyware?
CISA lists symptoms that may indicate spyware on a computer: endless pop-up windows, redirects to websites other than the one you typed, new toolbars, new icons in the task tray, a changed homepage or search engine, keys that fail to work in the browser, random error messages, and a computer that suddenly seems very slow.
On a phone, watch for unexplained battery drain, high data usage, a hot phone when idle, unfamiliar apps or permissions, and a camera or microphone indicator that turns on by itself. But be honest with yourself: well-built spyware shows no signs at all. If you suspect it, do not rely on symptoms alone; scan the device and check for unknown apps and permissions.
What are real examples of spyware?
Two cases show the range of spyware, from a consumer product banned by the FTC to a government-grade tool found on journalists' phones.
SpyFone: stalkerware banned by the FTC
SpyFone sold monitoring software that let a buyer secretly watch another person's phone, including searches, location, texts, photos and calls. In 2021 the FTC banned SpyFone and its CEO from the surveillance business, the first time the FTC had won such a ban against a stalkerware maker. The case showed that selling secret surveillance is not just a privacy problem; it is an unfair business practice.
Pegasus: zero-click spyware on iPhones
In 2021, an investigation coordinated by Forbidden Stories with support from Amnesty International found NSO Group's Pegasus spyware on the devices of journalists, lawyers and human rights defenders in multiple countries. Victims did not click on anything: their devices were compromised through an iMessage flaw, patched in iOS 14.8.
Most people will never face Pegasus, but the lesson applies to everyone: keep your operating system updated, because updates patch the vulnerabilities that zero-click exploits rely on. For the phishing side of how spyware arrives, see our guide to spear phishing.
CISA lists the warning signs of spyware, from endless pop-ups to a changed homepage, in its spyware guidance.
Spyware vs adware vs virus: what is the difference?
These terms overlap, and the same program can be more than one of them. The difference is mainly about intent and behavior, not about the code itself.
Adware monitors browsing and serves targeted ads, and it is often bundled with free software. Some adware is merely annoying; some crosses into spyware by collecting far more than it discloses. A virus spreads from file to file and damages or disrupts, while spyware hides and collects. A Trojan is a delivery method: a program that looks harmless but carries spyware, a keylogger or a remote access tool inside it.
How do you remove spyware?
Remove spyware in this order: scan, clean, update, then change passwords from a clean device. Changing passwords before the spyware is gone just hands the new passwords to the attacker.
- Disconnect the device from the network so nothing more is sent out, and do not use it for banking or email until it is clean.
- Run a full scan with reputable antivirus software. CISA advises setting antivirus to prompt you to run a full scan periodically, because real-time protection may not catch spyware that is already running.
- Remove unknown apps, extensions and profiles, especially on a phone. Check accessibility and device-admin permissions, which spyware often abuses.
- Update the operating system and all apps, to patch the vulnerability the spyware used to get in.
- Change passwords from a clean device, starting with email and banking, and sign out of all sessions. Check whether a password already appears in known breaches with our pwned password checker.
If the scan finds nothing but you still suspect spyware, or if you suspect mercenary spyware, preserve the phone and seek professional mobile forensics rather than wiping it yourself. Amnesty International's Mobile Verification Toolkit can check devices for traces of compromise with the owner's consent.
How do you prevent spyware?
Prevention is mostly about what you do not install and what you do not click. CISA's advice is simple: do not click links inside pop-up windows, be wary of free downloadable software, do not follow email links claiming to offer anti-spyware software, and adjust browser settings to limit pop-ups and cookies.
- Download only from official stores and the vendor's own site. Avoid cracked software, which is a leading infostealer route.
- Keep your operating system and apps updated, with automatic updates on where possible.
- Use reputable antivirus and keep it updated, and run full scans regularly.
- Lock your phone with a strong passcode and keep it with you; stalkerware needs physical access.
- Review app permissions regularly, especially accessibility, device admin, camera and microphone access.
- Use a password manager and unique passwords, so one stolen password does not open every account. Our guide to how to know if your phone is hacked covers the phone signs in more detail.
Is spyware illegal?
Installing spyware on someone else's device without their consent is illegal in most jurisdictions. In the United States, covert spyware can violate the Computer Fraud and Abuse Act, wiretapping laws and the Stored Communications Act, and the FTC treats deceptive spyware as an unfair or deceptive practice.
Some monitoring is lawful when it is disclosed and has a legitimate purpose, such as an employer monitoring a company-owned device under a clear policy, or a parent monitoring a young child's device. Laws vary by country and state, and this section is general information, not legal advice.
NIST defines spyware as software secretly installed to gather information without the owner's knowledge, in its spyware glossary entry.
The bottom line
Spyware is defined by secrecy: software installed without your knowledge to gather information about you. Infostealers and keyloggers are the everyday threat; stalkerware is a safety issue, not just a malware issue; and mercenary spyware is rare but real.
Keep your devices updated, download only from trusted sources, run full antivirus scans, and change passwords from a clean device if you suspect an infection. You can check whether your passwords have appeared in known breaches with our free pwned password checker.
Frequently asked questions
What is spyware in simple terms?
Spyware is a hidden program that watches what you do on a device and sends the details to someone else without your consent. It can steal passwords, read messages, track your location and record what you type.
What does spyware do?
Spyware collects data and sends it to a server controlled by its operator. Depending on the type, it can log keystrokes, steal saved passwords and cookies, capture screenshots, read texts and emails, track GPS location and turn on a microphone or camera.
How do I know if I have spyware?
Warning signs include endless pop-ups, a changed browser homepage or search engine, new toolbars, a very slow computer, fast battery drain and high data use on a phone. But well-built spyware shows no signs, so do not rely on symptoms alone.
How does spyware get on my phone or computer?
The most common routes are bundled free software, malicious links or attachments in email and text messages, fake updates, cracked software and, for stalkerware, a few minutes of physical access to an unlocked phone.
Can spyware be removed?
Yes, in most cases. Run a full scan with reputable antivirus, remove unknown apps and extensions, update your operating system, and change passwords from a clean device. Mercenary spyware such as Pegasus usually needs professional mobile forensics.
Is spyware illegal?
Installing spyware on someone else's device without consent is illegal in most jurisdictions, including under US federal wiretapping and computer fraud laws. The FTC has banned spyware makers such as SpyFone from the surveillance business.
What is the difference between spyware and a virus?
A virus spreads and damages files, while spyware hides and collects information. Both are malware, and one infection can include both: a Trojan often carries a keylogger or screen-capture module.
Can antivirus detect spyware?
Good antivirus detects most common spyware, especially infostealers and keyloggers, but it may miss targeted mercenary spyware. Keep your antivirus and operating system updated, and run full scans regularly.
Sources
- CISA — Recognizing and Avoiding Spyware
- NIST CSRC — Spyware glossary
- Proton — What is spyware, and how do you protect yourself?
- FTC — Support King, LLC (SpyFone.com), In the Matter of
- Amnesty International — Spain: Pegasus spyware targeted Catalans
- Amnesty Security Lab — Pegasus in the Parliament: the EU must act now
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.
Checked against CISA's spyware guidance, NIST's spyware glossary definition, the FTC's SpyFone case and Amnesty International's Pegasus reporting.
How we write and fact-check →