Overview Types Techniques Notable Families Demo Detection Prevention Incident Response Legal Resources

Spyware & Digital Surveillance Guide

What is Spyware?

Spyware is a category of malicious software designed to secretly monitor, collect, and transmit information about a user's activities without their knowledge or consent. It operates covertly in the background, often with no visible indicators, capturing sensitive data including keystrokes, login credentials, browsing habits, personal communications, files, photos, and real-time audio/video. Spyware is one of the most invasive forms of malware and a leading cause of identity theft and corporate espionage.

Global Impact: Spyware infections affect over 200 million devices annually, with commercial spyware apps generating over $100 million in revenue while compromising user privacy. According to cybersecurity reports, spyware is found on approximately 1 in every 50 consumer devices, with significantly higher rates in certain regions and on mobile platforms.

Spyware can capture and exfiltrate:

Spyware CategoryPrimary TargetsCommon Distribution Consumer SpywareIndividual users, personal devicesTrojanized apps, fake downloads, email attachments Commercial Spyware (Stalkerware)Individuals (domestic surveillance)Direct installation by someone with physical access Government-Grade SpywareJournalists, activists, executivesZero-click exploits, zero-day vulnerabilities Corporate SpywareEmployee monitoring (authorized vs unauthorized)Installed by employer (legitimate or shadow IT)

Types of Spyware

Keyloggers (Keystroke Loggers)

Record every keystroke made on an infected device, capturing passwords, messages, credit card numbers, and sensitive data in real-time. Can be hardware-based (keyboard devices) or software-based (kernel-level or user-mode). Most common spyware type.

Most Prevalent Type ~35% of infections

Screen Capturers & Recorders

Take periodic screenshots (every 5-60 seconds) or record screen activity to visually capture user actions, displayed information, and ongoing conversations. Some record only active windows; others capture full desktop.

Information Stealers (Infostealers)

Target specific data like saved passwords from browsers (Chrome, Firefox, Edge), browser cookies (session hijacking), cryptocurrency wallets, document files (PDF, DOCX, XLSX), and system information.

Browser Trackers & Web Beacons

Monitor browsing history, search queries, online activities, and form submissions to build detailed user profiles. Often bundled with adware. Less harmful but still privacy-invasive.

Audio & Video Recorders

Activate device microphones and cameras to record conversations, ambient audio, and video feeds. Can operate even when device appears off (if hardware supports). Advanced versions use compression to upload recordings slowly.

Mobile Spyware (Stalkerware)

Specifically targets smartphones and tablets to access SMS messages, call logs, GPS location, app data (WhatsApp, Instagram, Snapchat), photos, and social media. Often marketed as "parental control" or "employee monitoring" but widely abused for domestic surveillance.

Clipboard Hijackers

Monitor clipboard content for cryptocurrency addresses (replace with attacker's address), passwords, API keys, and other copied sensitive text. Used in cryptocurrency theft (clipper malware).

Cookie Stealers & Session Hijackers

Extract browser cookies to impersonate victims on websites and services, bypassing password authentication for logged-in sessions (session hijacking). Targets social media, email, banking, and corporate platforms.

Spyware Techniques & Capabilities

Modern spyware employs sophisticated methods to avoid detection, maintain persistence, and exfiltrate data:

  • Stealth Installation & Delivery: Bundled with legitimate software (software bundling, PUP/PUA), disguised as critical system updates or security patches, delivered via drive-by downloads (exploit kits), phishing email attachments (Office macros, PDF exploits), SMS phishing (smishing), or physical access (someone installing directly on target device).
  • Persistence Mechanisms (Surviving Reboots): Installs in Windows Registry run keys (HKLM\Software\Microsoft\Windows\CurrentVersion\Run, HKCU\Run), startup folders (%AppData%\Microsoft\Windows\Start Menu\Programs\Startup), scheduled tasks (schtasks), Windows services (sc create), WMI event subscriptions, or bootkit/rootkit for deep persistence.
  • Process Injection & Masquerading: Injects malicious code into legitimate system processes (svchost.exe, explorer.exe, lsass.exe) using techniques like process hollowing, DLL injection, or reflective DLL loading. Masquerades as legitimate files using system-sounding names (svch0st.exe, winupdate.exe).
  • Rootkit Integration (Kernel-Level): Uses rootkits (user-mode or kernel-mode) to hide files, processes, registry keys, network connections, and services from security software and system utilities. Kernel rootkits are extremely difficult to detect.
  • Data Exfiltration & C2 Communication: Encrypts stolen data (AES, XOR, custom ciphers) and transmits to command-and-control (C2) servers over encrypted channels (HTTPS, DNS tunneling, custom protocols). Uses domain generation algorithms (DGA) or fast-flux networks to evade domain blacklisting.
  • Self-Update & Anti-Detection Mechanisms: Automatically updates to evade signature-based detection, adds new features, changes binary hashes, disables security software, and detects virtual machines/sandboxes (environment-aware).
  • Anti-Forensics & Anti-VM: Detects debuggers, sandboxes, and virtual machines (VMware, VirtualBox, Cuckoo), sleeps or terminates execution if running in analysis environment, deletes logs and artifacts after execution.
// Common spyware persistence locations # Windows Registry Run Keys (runs on user login) HKLM\Software\Microsoft\Windows\CurrentVersion\Run HKCU\Software\Microsoft\Windows\CurrentVersion\Run HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Run # Startup Folders %AppData%\Microsoft\Windows\Start Menu\Programs\Startup %ProgramData%\Microsoft\Windows\Start Menu\Programs\Startup # Scheduled Tasks (run on schedule or system startup) schtasks /create /tn "WindowsUpdate" /tr "C:\malware.exe" /sc daily /ru SYSTEM # Windows Service (runs at boot, SYSTEM privileges) sc create "SysHelper" binPath= "C:\malware.exe" start= auto obj= LocalSystem # WMI Event Subscription (advanced persistence) wmic /namespace:\\root\subscription PATH __EventFilter CREATE Name="Filter", Query="SELECT * FROM __InstanceModificationEvent WITHIN 60" # Linux cron jobs (persistence) echo "*/5 * * * * /home/user/.hidden/malware" >> /etc/crontab # macOS Launch Agents (persistence) /Library/LaunchAgents/com.apple.updater.plist ~/Library/LaunchAgents/com.apple.updater.plist

Notable Spyware Families & Surveillance Tools

Understanding these threats helps security professionals and defenders recognize and defend against spyware:

Pegasus (NSO Group)

Advanced mobile spyware used by governments worldwide. Can compromise iOS and Android devices without user interaction (zero-click exploits). Capabilities include full device access, encrypted communication capture, camera/mic activation, location tracking, and message exfiltration. Uses zero-day exploits.

FinSpy (FinFisher)

Commercial surveillance framework sold to governments. Features include keylogging, file access, Skype recording, remote webcam activation, microphone capture, Skype/WhatsApp/Telegram interception, and stealth deployment.

FlexiSPY

Commercial spyware marketed for "parental monitoring" (stalkerware). Extensive capabilities including call recording, ambient listening (remote microphone), social media interception (Facebook, WhatsApp, Line, Viber), GPS tracking, and keylogging. Visible on device if user knows where to look.

mSpy / uMobix / EyeZy

Popular mobile monitoring apps claiming to be for parental control but widely used for unauthorized surveillance. Require physical access to target device for installation. Features: SMS/MMS logging, call logs, GPS location, social media monitoring, keylogging, screen recording.

DarkComet RAT

Remote Administration Tool (RAT) frequently used as spyware. Features include keylogging, screen capture, webcam access, file theft, password recovery, and remote shell. Discontinued but still in active use.

Agent Tesla

Commercial keylogger and information stealer widely sold on dark web forums. Targets: saved passwords (browsers, email clients, FTP), clipboard data, system information, and screen captures. Evades detection through encryption and custom packers.

Hoverwatch

Mobile spyware tracking calls, messages, GPS location, and social media activity across Android, Windows, and macOS. Invisible mode hides app icon. Disguises as system service.

Spyera

Cross-platform surveillance tool with remote microphone activation (ambient recording), call recording, live camera access, environment recording, and file extraction. Claims 100+ monitoring features.

Predator (Cytrox)

Government-grade mobile spyware similar to Pegasus. Uses zero-click exploits to infect devices without user interaction. Targets journalists, activists, and political opponents.

Keylogger Demonstration

This demonstration simulates how keyloggers capture keystrokes in real-time. Type in the field below to see how every character can be silently recorded:

Your typing will appear here to demonstrate keylogging in real-time

This is a simulated demonstration for educational awareness. Real keyloggers operate completely silently in the background, have no visible output, and transmit captured keystrokes (including passwords, credit card numbers, and private messages) to remote attackers over the internet. They can also capture typed text even in password fields (masked input).

Detecting Spyware Infections

  • Unexplained Performance Issues: Slow system performance (boot times, application launches), high CPU/GPU usage when idle, excessive network activity (upload bandwidth spikes) without user action, rapid battery drain on mobile devices.
  • Hardware Indicator Anomalies: Webcam LED active when camera not in use, microphone activity lights showing usage, unexpected camera or mic access prompts from unknown applications. On mobile: unexplained battery overheating, increased data usage.
  • Network & Traffic Anomalies: Unexpected outbound connections to suspicious IP addresses (check with netstat -ano), data usage spikes during idle periods, persistent background data transfers, connections to known malicious domains (check security feeds).
  • File System & Registry Changes: Unknown files in startup locations, new scheduled tasks (schtasks), suspicious Windows Registry entries (Run, RunOnce), unexpected Windows services, files in Temp or AppData with random names.
  • Security Software & System Anomalies: Antivirus/Windows Defender disabled without user action, security tool alerts (quarantined files), Windows Defender showing "No active protection", inability to run security scans, disabled Task Manager or Registry Editor (Group Policy changes).
  • Mobile Device Indicators (iOS/Android): Unknown apps with Accessibility permissions, unexpected SMS messages with links (SMS harvesting), unusual background processes, device acting as if "jailbroken/rooted", unfamiliar configuration profiles (iOS), unknown Device Administrator apps (Android).
  • Behavioral & Account Anomalies: Accounts logged in from unfamiliar locations (check login history), unexpected password reset emails, social media posting without your knowledge, friend requests sent from your account, unauthorized financial transactions.
// Windows spyware detection commands (run as Administrator) # Check all established network connections with process IDs netstat -ano | findstr ESTABLISHED # View all running processes with their executable paths wmic process get name,executablepath,processid # Review startup programs (Registry and Startup folders) wmic startup get caption,command,user # List all scheduled tasks schtasks /query /fo LIST /v | findstr "TaskName\|Task To Run" # Check Windows services (look for suspicious names) sc query state= all | findstr /i "SERVICE_NAME" # Search for recently created executables in Temp dir C:\Users\*\AppData\Local\Temp\*.exe /o-d # Windows Defender offline scan (recommended for persistence) Start-MpWDOScan # Generate system inventory for analysis systeminfo & tasklist /v & netstat -ano & schtasks /query /fo CSV /v > C:\system_audit.txt // Linux detection commands # Check network connections ss -tunap | grep ESTABLISHED netstat -tunap # Find recently modified files find / -type f -mtime -1 -ls 2>/dev/null # Check cron jobs (persistence) crontab -l cat /etc/crontab ls -la /etc/cron.* # Audit systemd services for suspicious timers/services systemctl list-timers --all systemctl list-units --type=service

Preventing Spyware Infections

Comprehensive Security Software

Install and maintain reputable antivirus/anti-malware solutions with real-time protection, behavior monitoring, and automatic updates. Consider layered protection (AV + EDR + firewall). Enable Windows Defender if on Windows 10/11.

Safe Download & Software Practices

Only download software from official sources (developer websites, Microsoft Store, App Store, Google Play). Avoid cracks, keygens, pirated software, and "free" utilities from untrusted sources - these are common spyware vectors.

Email & Attachment Caution

Do not open attachments or click links from unknown senders. Be wary of unexpected attachments even from known contacts (their accounts may be compromised). Enable "Show file extensions" to detect double extensions (document.pdf.exe).

Browser & Extension Security

Disable automatic downloads, use reputable ad-blockers (uBlock Origin), disable third-party cookies, and use privacy-focused browsers (Firefox with strict tracking protection). Avoid browser extensions from untrusted sources and regularly audit installed extensions.

Mobile Device Security (iOS/Android)

Only install apps from official app stores (Apple App Store, Google Play). Review app permissions carefully - especially Accessibility permissions, Overlay permissions, and Device Admin. Use iOS Lockdown Mode for high-risk users. Keep OS updated.

Regular Updates & Patching

Keep operating systems, software applications, browsers, and security tools updated to patch vulnerabilities exploited by spyware. Enable automatic updates where possible.

Strong Authentication & Account Security

Use strong unique passwords (password manager), enable Multi-Factor Authentication (MFA/2FA) on all accounts, and regularly review account login history for suspicious access.

Physical Security & Access Control

Spyware often requires physical access for installation (especially stalkerware). Secure your devices with strong passwords/biometrics, enable full-disk encryption (BitLocker, FileVault, LUKS), and never leave devices unattended in untrusted environments.

Defense-in-Depth Strategy: Perform regular device audits (quarterly), review installed applications and startup programs, check for unusual system behavior, and monitor network traffic for anomalies. For high-risk individuals (journalists, activists, executives), consider hardware security keys (YubiKey), dedicated security-hardened devices, and regular forensic analysis. The Coalition Against Stalkerware provides resources for domestic surveillance victims.

Spyware Incident Response (What to do if infected)

If you suspect spyware infection, follow these steps in order (do not panic, act systematically):

  • 1. Disconnect from Network: Immediately disconnect the infected device from the internet (disable Wi-Fi, unplug Ethernet). This prevents further data exfiltration and C2 communication. Do not power off (preserves volatile memory for forensics).
  • 2. Backup Critical Data (Offline): If possible, backup important personal files to external storage (USB drive that has never been connected to the infected device). Do not backup executables or unknown files.
  • 3. Run Full Security Scans: Run full system scans with Windows Defender Offline (Windows), reputable antivirus (Malwarebytes, Kaspersky, Bitdefender), and specialized anti-spyware tools (Spybot - Search & Destroy is outdated but still detects some). Use multiple scanners.
  • 4. Change All Passwords (From Clean Device): Using a known-clean device (different computer, smartphone), change passwords for all critical accounts: email, banking, social media, cloud storage, work accounts. Enable MFA where not already enabled.
  • 5. System Restore or Reinstall (Recommended): For confirmed spyware infections, perform a full system wipe (factory reset, OS reinstall) rather than attempting manual removal. Spyware often has multiple backdoors, rootkits, and persistence mechanisms that survive typical removal attempts.
  • 6. Monitor Accounts for 30-90 Days: After remediation, closely monitor financial accounts, credit reports, email login history, and social media accounts for signs of continued compromise. Consider credit freeze/fraud alert if financial data was exposed.
  • 7. Report to Authorities: If you believe you are a victim of illegal surveillance (stalkerware, unauthorized monitoring, intimate partner surveillance), report to local law enforcement and consider contacting domestic violence support organizations (National Domestic Violence Hotline: 800-799-7233). For corporate espionage, report to company security team.

Further Spyware Resources & Information

Coalition Against Stalkerware

International coalition fighting domestic surveillance malware. Provides resources for victims, detection guides, and removal instructions. Website: stalkerware.org

Citizen Lab (University of Toronto)

Research lab tracking government-grade spyware (Pegasus, Predator, FinSpy). Publishes technical analysis, indicators of compromise, and victim assistance resources.

Amnesty International - Mobile Spyware Guide

Guide for detecting Pegasus and other advanced spyware on iOS and Android devices. Includes Mobile Verification Toolkit (MVT) for forensic analysis.

MalwareBazaar Spyware Samples

Free repository of spyware malware samples for security research, detection testing, and threat intelligence. Run only in isolated lab environments.

National Domestic Violence Hotline Tech Safety

Resources for victims of technology-enabled abuse including spyware detection, safety planning, and documentation. Website: techsafety.org

YARA Rules for Spyware Families

Community-maintained YARA detection rules for known spyware families (Pegasus, FinSpy, DarkComet, Agent Tesla, Remcos). Essential for threat hunting.

SANS FOR610 (Reverse Engineering Malware)

Advanced malware analysis course covering spyware reverse engineering, behavior analysis, and detection methodology.

CISA Spyware Detection & Mitigation

CISA (Cybersecurity and Infrastructure Security Agency) guidance on detecting and mitigating spyware threats, including IOCs and response procedures.

← Back to Knowledge Base