Common types of malware
| Type | What it does |
|---|---|
| Virus | Attaches itself to other files and spreads when they are shared or opened |
| Worm | Copies itself across a network on its own, with no click needed |
| Trojan horse | Poses as a useful app or file to get you to install it |
| Ransomware | Locks your files and demands a payment to unlock them |
| Spyware | Watches what you do and sends it on, from passwords to messages |
| Rootkit | Hides deep in the system so other malware stays out of sight |
NIST’s definitions name viruses, worms, Trojan horses, spyware and rootkits as malware, along with some forms of adware.1
How malware gets on your device
- Email attachments and links. Opening a file or following a link in a phishing email is a common way in.4
- Ads and compromised websites. Malicious ads and hacked sites can deliver it too, sometimes just from visiting the page.4
- Fake or tampered downloads. Cracked software, fake updates and unofficial apps often carry it.
- Unpatched software. Attackers look for apps and operating systems that are missing updates.3
What malware is after
CISA describes malware as any software used to gain unauthorized access in order to steal data, disrupt services or damage systems.2 For an individual that usually means passwords, payment details and personal data, or control of the device itself.3 Complaints about malware to the FBI’s Internet Crime Complaint Center doubled in 2025, to 893 from 441 the year before.5
How to protect yourself from malware
- Update everything. Install updates for your operating system, browser and apps, and only from a trusted source.3
- Keep the built-in protection on. Make sure your anti-malware tool updates itself and runs regular checks.4
- Be careful with attachments and links in email or texts you weren’t expecting.4
- Remove apps and browser extensions you don’t use. Some collect personal data without you knowing.3
- Back up your files to a device that isn’t always connected, so malware can’t reach the copy.4
Related terms
Sources
- NIST Computer Security Resource Center, Glossary: malware.
- CISA, Malware, phishing, and ransomware.
- CISA, CISA Insights: Mitigating the impacts of doxing (software updates and apps).
- FBI Internet Crime Complaint Center, Ransomware (how malware is downloaded, and tips).
- FBI Internet Crime Complaint Center, 2025 Internet Crime Report.
Questions about malware
What is the difference between malware and a virus?
Malware is the umbrella term for any harmful software. A virus is one kind of malware, the kind that spreads by attaching itself to other files. All viruses are malware, but not all malware is a virus.
What is the difference between malware and ransomware?
Ransomware is one type of malware. What sets it apart is the demand: it locks your files and asks for money to unlock them.
Can phones get malware?
Yes. Phones get malware too, most often through apps from outside the official app stores, malicious links in texts and missing updates.
Can malware come from opening an email?
The usual risk is in what you do next: the FBI lists opening an email attachment and following a link among the ways people download malware without knowing. Keep your mail app and device updated as well.