---
title: "Identifying Malware Types | FiveStudy"
description: "Viruses, worms, trojans, RATs, ransomware, spyware, keyloggers, logic bombs, rootkits, and fileless malware: how each starts, what it does, and how to identify it from evidence."
url: https://fivestudy.com/guides/ap-cybersecurity-4-1-b-identifying-malware-types
---

[AP Cybersecurity](https://fivestudy.com/ap-cybersecurity) · Study guide

# Identifying Malware Types

[Figure: FiveStudy]

FiveStudy

AP® Cybersecurity · Unit 4 · Device Security, Malware & Authentication

AP® Cybersecurity · Unit 4 · Device Security, Malware & Authentication

# Identifying Malware Types

Viruses, worms, trojans, ransomware, spyware, keyloggers, logic bombs, rootkits, and fileless malware: how each works and how to tell them apart.

1. What malware is 2. How malware spreads 3. What malware does 4. Hiding and waiting 5. Fileless malware 6. All the types at a glance 7. Worked examples 8. Common mistakes

## 1 What malware is

**Malware** (malicious software) is software that can damage or destroy a device or network, or give an adversary access to a device and its data. Malware is usually a tool for one step of a larger plan: getting in, staying in, stealing, or causing damage. Identifying the type tells defenders what the attacker is trying to do and what to check next.

## 2 How malware spreads

**Figure 1.** The quickest way to tell these three apart: does it need a person to run it (virus), spread by itself (worm), or hide inside something wanted (trojan)?

- **Virus**: must be activated by a user running or opening a file, such as a document with harmful macros or an infected program.
- **Worm**: spreads from one computer to another *without* human interaction, often by exploiting a network weakness, so it can infect thousands of machines quickly.
- **Trojan**: malware embedded in software that seems harmless (a free game, a “codec,” a fake update). A **remote access trojan (RAT)** gives the adversary remote control of the target system.

## 3 What malware does

- **Ransomware** encrypts a device's files so the user cannot open them, then usually shows a screen demanding payment within a fixed time and promising a decryption key in return.
- **Spyware** tracks a user's actions on a computer and sends that information back to an adversary.
- **Keylogger**: software or hardware that records the user's keystrokes and sends them back to the adversary, who can often pull usernames and passwords out of them.

## 4 Hiding and waiting

- **Logic bomb**: malware set to trigger only when specific conditions are met: a date and time, a particular operating system version, the computer's language setting, an employee's name disappearing from the payroll.
- **Rootkit**: sophisticated malware that gets into the operating system itself and can control nearly every part of the system, including hiding itself (and other malware) from detection.

## 5 Fileless malware

Most malware is a file or collection of files that anti-malware tools can scan. **Fileless malware** is malicious code that lives only in **RAM** (the computer's working memory) and uses legitimate programs already installed on the device, such as built-in administration tools, to do its work. With no malicious file on the disk, file-scanning tools have nothing to find, and restarting the computer may erase the evidence.

## 6 All the types at a glance

| Type | Key feature | A clue in an incident |
| --- | --- | --- |
| Virus | Activated when a user opens or runs a file | Infection started right after someone opened an attachment |
| Worm | Spreads without human interaction | Many computers infected within minutes, no one clicked anything |
| Trojan | Hidden in harmless-looking software | Infection traced to a free program the user installed |
| Remote access trojan (RAT) | Gives the adversary remote control | A computer receiving commands from an outside server |
| Ransomware | Encrypts files and demands payment | Files won't open; a ransom note appears |
| Spyware | Tracks user activity and reports it | Browsing and activity data sent to an unknown server |
| Keylogger | Records keystrokes (software or hardware) | Passwords stolen even though no one shared them |
| Logic bomb | Triggers on specific conditions | Damage starts on a certain date or after a certain event |
| Rootkit | Controls the operating system and hides itself | Security tools show nothing, yet the system behaves strangely |
| Fileless malware | Lives in RAM; uses legitimate tools | No malicious file found; built-in tools running odd commands |

The key idea

Identify malware by how it starts (user action, self-spreading, disguised), what it does (encrypts, spies, logs keys, gives control), and how it hides (waits for a trigger, hides in the system, lives only in memory).

## 7 Worked examples

Worked Example 1 Identify the malware

### Overnight, every computer

Overnight, hundreds of computers across a company are infected, one after another, through an unpatched network service. No employee opened anything; most were asleep. What type of malware is this?

1. 1

   It spread from computer to computer on its own.

2. 2

   No human action was needed.

**Answer:** A worm. Patching the vulnerable service would stop its spread.

Worked Example 2 Identify the malware

### The payroll trigger

A programmer adds code to a company system that deletes the customer database if their own name is ever removed from the payroll. Months after they are fired, the database is wiped. What type of malware is this?

1. 1

   The malicious code sat inactive until a specific condition was met: the name disappearing from payroll.

2. 2

   Malware set to trigger only under certain conditions is a logic bomb.

**Answer:** A logic bomb planted by an insider.

Worked Example 3 Identify the malware

### The free video converter

A student downloads a free video converter from an unofficial site. It works fine, but a week later the student's computer is receiving commands from a server overseas, and someone is browsing the student's files. What type?

1. 1

   The malware arrived hidden in software that seemed harmless: a trojan.

2. 2

   It gives an outside adversary control of the computer: a remote access trojan (RAT).

**Answer:** A remote access trojan, delivered inside the fake converter.

Worked Example 4 Identify the malware

### Nothing on the disk

Investigators see a computer's built-in administration tool running strange commands that download data, but anti-malware scans find no malicious file anywhere, and after a restart the activity stops. What type?

1. 1

   No malicious file on disk, so file scanning finds nothing.

2. 2

   It uses a legitimate, already-installed program.

3. 3

   It disappears after a restart, which fits code living only in RAM.

**Answer:** Fileless malware.

Worked Example 5 Identify the malware

### Passwords no one shared

An accountant never shared their password, yet attackers logged in with it. A scan finds a hidden program that recorded everything typed and uploaded it each night. What type?

1. 1

   It recorded keystrokes and sent them to the adversary.

2. 2

   Passwords were extracted from the recorded typing.

**Answer:** A keylogger (software). Hardware keyloggers do the same from a small device on the keyboard cable.

## 8 Common mistakes

Common Mistake 1 · Calling all malware a “virus”

A virus specifically needs a user to open or run a file. Self-spreading malware is a worm; disguised malware is a trojan.

Common Mistake 2 · Mixing up spyware and keyloggers

Spyware tracks a user's actions broadly; a keylogger records keystrokes. A keylogger is a focused kind of spying.

Common Mistake 3 · Assuming a clean scan means a clean computer

Rootkits hide from detection and fileless malware has no file to scan.

Common Mistake 4 · Thinking a logic bomb acts immediately

It waits for its condition. That is why it can sit unnoticed for months.

Identify malware like this

“This is a worm, because it spread from computer to computer across the network without anyone opening a file or clicking a link. A virus would have needed a user to run the infected file.”

Name the type, point to the defining behavior in the evidence, and rule out the closest alternative.

FiveStudy AP® Cybersecurity · Identifying Malware Types
