Preventing and handling malware¶
Malware is software built to harm its users: disrupting a computer, collecting sensitive information, spying on the device's owner, sending messages in your name, breaking into other systems, or encrypting your files for ransom. Most of it is criminal and aimed at money, but governments, police, and private individuals also use it to get around encryption, turning on cameras and microphones, logging keystrokes, and copying documents and passwords1.
This page covers ordinary malware on computers and phones. Commercial spyware aimed at journalists and activists is a different tier of capability and cost, covered in what surveillance can actually do. Stalkerware installed by a partner or family member is covered in the domestic-violence guide.
Adapted from EFF Surveillance Self-Defense's How Do I Protect Myself Against Malware?, last reviewed in June 2024, with Android's Play Protect, scam apps common in Taiwan, and where to get help added.
Short on time? Start here
- The most common way in is you installing it, so pause on unexpected attachments, links, and apps
- Keep the system, browser, and apps updated, and leave Windows' built-in protection and Android's Google Play Protect on
- If you find malware, disconnect and stop using the device, then change passwords from a clean one
- Removing malware does not prove the device is clean. Reinstalling is more reliable
How malware gets in¶
A zero-day is a flaw the software maker does not know about yet, like a secret passage into a castle that you cannot guard. Governments stockpile them for targeted attacks, but they are expensive and lose value once used, so it is far more common to trick you into installing malware yourself. It can be disguised as a link, a document, a PDF, or even a security tool, and arrive by email, chat app, or social media1. In Taiwan, a common version is the app a scammer asks you to install, such as a fake investment platform or an Android installer file (APK) passed along outside the official store.
Targeted attacks may need no action at all. EFF's examples include a malicious video file sent over WhatsApp and an invisible iCloud calendar invitation used to install spyware on journalists, opposition politicians, and an NGO worker1.
Defenses¶
- Antivirus: It handles mass, untargeted malware but usually not targeted attacks. EFF recommends antivirus on computers without endorsing a product1. Windows includes protection in the Windows Security app. On Android, Google Play Protect is on by default and checks apps from Google Play and other sources. Check it in the Play Store app under your profile icon > Play Protect > Settings, where "Scan apps with Play Protect" should be on2. Phones without Google Play services, including many sold in mainland China, do not have it
- Suspicious attachments and install sources: Do not open documents or install programs you did not expect, though well-targeted attacks fool trained people too. Preview attachments in Google Drive rather than opening them locally (see recognizing and preventing phishing). Less common operating systems such as Ubuntu or ChromeOS sidestep many delivery tricks but not the most capable attackers1. Install phone apps only from official stores, and treat a request to allow "install unknown apps" as a warning sign
- Updates: Fixes only protect you once installed. Running an unregistered copy of Windows is no reason to skip security updates1. Version notes are in our software update log
- Indicators of compromise: Antivirus may miss new malware, but you can watch for a camera light on when you did not turn on the camera (advanced malware can turn the light off), a warning from Apple, Google, Microsoft, or Meta about state-sponsored attackers, email logins from unfamiliar IP addresses, or a new rule forwarding your mail to an unknown address1
If you find malware¶
- Disconnect and stop using the device: Turn off Wi-Fi. Every keystroke may be going to the attacker1
- Consider expert help: Activists, journalists, and human rights defenders can contact the Access Now Digital Security Helpline, which offers 24/7 technical support3
- Change passwords from a clean device: change every password you typed on the infected one1
- Reinstall the operating system: Removing the malware you found does not guarantee nothing else was installed. Reinstalling removes most malware, though a few advanced kinds can persist. Restore only files from before the infection1
For phones, EFF's Mobile Phones: Other Surveillance Techniques goes further.
Sources and review¶
Adapted from How Do I Protect Myself Against Malware? in EFF's Surveillance Self-Defense, last reviewed on 2024-06-21 and licensed under CC BY 4.0. Play Protect settings were checked in November 2026 against Google Play Help. This page has not been reviewed by EFF, and anoni.net is responsible for any differences from the original.
Where to go from here¶
- Recognizing and preventing phishing: the most common way malware arrives
- What surveillance can actually do: commercial spyware, Lockdown Mode, and Advanced Protection
- Device encryption and data erasure: handling data before and after reinstalling
-
How Do I Protect Myself Against Malware? - EFF Surveillance Self-Defense, last reviewed 2024-06-21. ↩↩↩↩↩↩↩↩↩↩
-
Use Google Play Protect to help keep your apps safe & your data private - Google Play Help. ↩
-
Digital Security Helpline - Access Now. ↩