[Intermediate] — the taxonomy, the lifecycle every sample follows, and the handful of techniques you’ll recognise in almost all of them.
The kid version first
“Malware” is any software written to do harm — but that’s a huge category, and lumping it together hides the useful structure. Almost all malware follows the same lifecycle (get in, run, hide, persist, phone home, act) and reuses the same handful of techniques (injection, persistence, C2). Learn the lifecycle and the techniques, and any new sample becomes “which known moves is this one using?”
The taxonomy — by what it does
Malware is categorised by purpose and spreading method. The distinctions matter because they tell you what to look for:
| Type | What it is |
|---|---|
| Virus | Attaches to a file/program; spreads when that runs. (The word is overused for all malware) |
| Worm | Self-propagating across a network with no user action — WannaCry, Conficker. The fast-spreading kind |
| Trojan | Disguised as something legitimate; the user runs it willingly. The most common initial vector |
| Dropper / Loader | A small first stage whose only job is to fetch and run the real payload. Keeps the initial file small and clean-looking |
| RAT (Remote Access Trojan) | Gives the attacker interactive remote control — the “hands on keyboard” tool |
| Ransomware | Encrypts files, demands payment. The dominant financially-motivated threat → threats |
| Spyware / Infostealer | Steals credentials, cookies, crypto wallets, keystrokes. Feeds the credential economy → credential attacks |
| Rootkit | Hides itself deep in the OS (or below it), subverting the system’s own view so it can’t be seen |
| Bootkit | A rootkit in the boot process, loading before the OS → boot |
| Cryptominer | Steals compute to mine cryptocurrency. Noisy, low-sophistication, common |
| Wiper | Destroys data outright — sabotage, often disguised as ransomware |
These combine. A real incident is often: a trojan (initial access) → dropper (fetches) → RAT (control) → infostealer (loot) → ransomware (payoff). Recognising the stages matters more than pinning one label.
The lifecycle — the shape every sample shares
Whatever the type, malware moves through the same phases, and this is the frame for analysing any sample. It maps onto the cyber kill chain and MITRE ATT&CK:
1. DELIVERY phishing attachment, drive-by download, USB, supply chain
2. EXECUTION the user runs it, or an exploit runs it → [[cybersecurity/11-binary-exploitation/index|exploitation]]
3. DEFENSE EVASION unpack, disable AV, detect the sandbox → [[cybersecurity/13-malware-and-reverse-engineering/05-evasion-and-anti-analysis|evasion]]
4. PERSISTENCE survive reboot (see below)
5. PRIVILEGE ESC / DISCOVERY gain admin, map the machine and network
6. COMMAND & CONTROL phone home for instructions (see below)
7. ACTIONS ON OBJECTIVE encrypt / steal / spread / destroy — the actual goal
When you analyse a sample, you’re identifying which of these it does and how. “What’s its persistence mechanism? Its C2? Its objective?” are the questions that structure the work → the workflow.
The techniques you’ll see everywhere
A few mechanisms recur across almost all malware. Recognising them is most of practical analysis:
Persistence — surviving a reboot. Malware that vanishes on restart is useless, so it plants itself to auto-run:
- Registry Run keys (
...\CurrentVersion\Run) — the classic, and easy to spot - Scheduled tasks / cron jobs
- Windows services — runs as SYSTEM, starts at boot
- Startup folders, DLL hijacking, COM hijacking
- The fancy ones: WMI event subscriptions, bootkits (before the OS)
A persistence mechanism is one of the first things to identify — it’s how the infection is removed, and it’s a reliable detection point. MITRE ATT&CK catalogues dozens.
Process injection — hiding inside a legitimate process. Rather than run as its own suspicious process, malware injects its code into a trusted one (explorer.exe, svchost.exe) so its activity looks legitimate:
- DLL injection, process hollowing (start a legit process, replace its guts), thread hijacking
- The import tell:
VirtualAllocEx+WriteProcessMemory+CreateRemoteThread→ imports
Living off the land (LOLBins). Modern malware increasingly uses built-in Windows tools — powershell, certutil, rundll32, mshta, wmic — instead of dropping its own binaries. Nothing malicious on disk to detect, and it blends with admin activity. This is the dominant modern evasion strategy, and the same instinct as AD lateral movement.
Fileless malware takes this further — living only in memory (in the registry, in a running process), never writing a payload to disk. Hard to catch with file-scanning AV, which is why detection moved toward behaviour → EDR.
Command and Control (C2)
Most malware phones home — to receive commands, exfiltrate data, and pull updates. The C2 channel is a defining feature and a prime detection point → networking:
- How it communicates — often over HTTPS (blends with normal web traffic), sometimes DNS tunnelling, occasionally over legit services (Telegram, Discord, GitHub) to hide among trusted destinations
- Finding the C2 address is a key analysis goal — it’s an indicator you can block network-wide, and it can identify the attacker
- DGA (Domain Generation Algorithms) — malware that generates hundreds of pseudo-random domains daily so defenders can’t just block one address; the attacker registers a few. Reversing the DGA lets defenders pre-block them
- Frameworks — Cobalt Strike (commercial, pervasively abused), Metasploit’s Meterpreter, Sliver, Mythic. Recognising a known C2 framework’s signature is a fast identification → post-exploitation
Key insight
Almost all malware follows one lifecycle — deliver, execute, evade, persist, phone home, act — and reuses a small set of techniques (persistence, injection, living-off-the-land, C2), so analysis becomes “which known moves is this sample using?” rather than deciphering something wholly novel. The high-value questions for any sample are its persistence mechanism (how it’s removed and detected), its C2 (an indicator to block network-wide), and its objective. The modern trend is toward fileless, living-off-the-land techniques that leave nothing on disk — which is exactly why detection shifted from scanning files to watching behaviour.
Related
- evasion and anti-analysis — how it hides from you
- the analysis workflow — extracting these details
- security operations — the kill chain, ATT&CK, and detection
- the threat taxonomy — the higher-level view
Source: [reference] — Aug 2026.
Software engineering
Infrastructure & security
Computer science
Hardware & engineering