What Is Malware?

22 minIn Progress

What Is Malware?

Malware (malicious software) is any program intentionally designed to harm, exploit, or otherwise compromise computer systems, networks, or users. Understanding malware is the foundation of being able to analyze it -- you need to know what you are looking at before you can determine how it works.

Why this matters: As a malware analyst, your ability to quickly classify a sample guides every subsequent decision -- which tools to use, which analysis techniques to apply, and what IOCs to prioritize.


Comprehensive Malware Taxonomy

Malware is categorized by its primary behavior and propagation method. Many modern samples blur the lines between categories, combining multiple capabilities in a single payload.

Core Malware Types

CategoryPrimary GoalPropagationNotable ExamplesMITRE ATT&CK
VirusInfect files, replicate via host filesRequires user action (run infected file)CIH, Sality, VirutT1204 (User Execution)
WormSelf-propagate across networksAutonomous, exploits vulnerabilitiesConficker, SlammerT1210 (Exploitation of Remote Services)
TrojanDisguise as legitimate softwareSocial engineering, bundled softwareZeus, NjRATT1036 (Masquerading)
RATRemote access and controlPhishing, watering holesDarkComet, Quasar, Cobalt StrikeT1219 (Remote Access Software)
RansomwareEncrypt files, demand ransomPhishing, RDP brute-force, exploitsLockBit, BlackCat/ALPHV, Conti, REvilT1486 (Data Encrypted for Impact)
RootkitHide malware presence, maintain stealthBundled with other malware, exploitsTDL-4, ZeroAccessT1014 (Rootkit)
BootkitInfect MBR/VBR/UEFI, survive OS reinstallRequires admin/root, firmware exploitsLojax, MosaicRegressorT1542 (Pre-OS Boot)
InfostealerExfiltrate credentials, cookies, crypto walletsPhishing, malvertising, cracked softwareRedLine, Raccoon, Vidar, LummaT1555 (Credentials from Password Stores)
Dropper/LoaderDownload and execute second-stage payloadsEmail attachments, malicious documentsEmotet, QakBot, IcedID, BatLoaderT1105 (Ingress Tool Transfer)
SpywareSurveil user activity (keylogging, screenshots)Bundled software, exploitsPegasus, FinFisherT1056 (Input Capture)
CryptominerMine cryptocurrency using victim resourcesExploits, supply chain, web injectionXMRig-based minersT1496 (Resource Hijacking)
WiperDestroy data, render systems inoperableTargeted deployment, supply chainNotPetya, WhisperGate, HermeticWiperT1485 (Data Destruction)
Botnet AgentEnlist system in botnet for DDoS/spam/proxyWorm-like spreading, loader deliveryMirai, TrickBotT1583.005 (Botnet)

The Blurred Lines: Multi-Function Malware

Modern malware rarely fits neatly into a single category. Consider these real-world examples:

  • Emotet started as a banking trojan, evolved into a loader/botnet that delivered other malware families like TrickBot and Cobalt Strike
  • WannaCry combined ransomware encryption with a worm propagation mechanism using the EternalBlue exploit
  • NotPetya appeared to be ransomware but was actually a wiper -- there was no real decryption mechanism
  • TrickBot began as a banking trojan, added infostealer modules, lateral movement capabilities, and became a loader for Ryuk/Conti ransomware

Malware Evolution Timeline

Understanding how malware has evolved helps you recognize both legacy and modern techniques:

EraPeriodKey DevelopmentsAnalysis Challenge
Early Viruses1980s-1990sBoot sector viruses, file infectors, macro virusesSimple signatures, low volume
Network Worms2000sCode Red, Slammer, Conficker -- autonomous spreadingSpeed of propagation, network analysis
Crime-as-a-Service2008-2015Zeus, SpyEye -- banking trojans, exploit kitsPolymorphism, encryption, anti-analysis
Ransomware Era2016-presentCryptoLocker, WannaCry, LockBit -- extortion at scaleEncryption, data exfil, double extortion
APT & Nation-State2010-presentStuxnet, APT28/29, Lazarus Group -- targeted espionageSophisticated evasion, zero-days, supply chain
AI-Augmented2023-presentLLM-assisted phishing, polymorphic generationRapid variant creation, convincing lures

The Malware Lifecycle (Kill Chain Perspective)

Every malware infection follows a lifecycle. Understanding these phases helps you know what to look for during analysis and maps directly to the Lockheed Martin Cyber Kill Chain and MITRE ATT&CK framework.

Phase 1: RECONNAISSANCE     Attacker gathers info about the target
     |
Phase 2: WEAPONIZATION      Malware payload is crafted (e.g., malicious doc + exploit)
     |
Phase 3: DELIVERY            Payload reaches victim (phishing, drive-by, USB)
     |
Phase 4: EXPLOITATION        Vulnerability or user action triggers execution
     |
Phase 5: INSTALLATION        Malware establishes persistence on the system
     |
Phase 6: COMMAND & CONTROL   Malware beacons to C2 server for instructions
     |
Phase 7: ACTIONS ON          Data theft, lateral movement, ransomware
         OBJECTIVES           deployment, destruction
Malware lifecycle diagram showing delivery through exfiltration stages
Malware lifecycle diagram showing delivery through exfiltration stages

What Each Phase Means for the Analyst

PhaseWhat You Find During AnalysisKey Artifacts
DeliveryHow the sample arrivedPhishing email headers, download URL, dropper file
ExecutionHow code runsParent process, command line args, exploit shellcode
PersistenceHow it survives rebootsRegistry Run keys, scheduled tasks, services, WMI subscriptions
C2 CommunicationHow it phones homeDNS queries, HTTP beacons, encrypted channels, JA3 hashes
Actions on ObjectiveWhat damage it doesEncrypted files, exfiltrated data, lateral movement artifacts

Quick Triage: Identifying Malware Type from Behavior

When you first encounter a sample, these behavioral signals help you classify it:

IF sample encrypts files and drops ransom note
   -> RANSOMWARE

IF sample injects into browsers and hooks HTTP APIs
   -> BANKING TROJAN / INFOSTEALER

IF sample opens a listening port or connects to C2 for remote commands
   -> RAT (Remote Access Trojan)

IF sample copies itself to network shares or exploits remote services
   -> WORM

IF sample installs kernel drivers or hooks SSDT/IDT
   -> ROOTKIT

IF sample downloads and executes additional payloads
   -> DROPPER / LOADER

IF sample mines cryptocurrency (high CPU, connects to mining pools)
   -> CRYPTOMINER

Practical: Identifying a Sample on Your First Encounter

When you receive a suspicious file for the first time, here is the initial triage workflow:

Step 1: Compute hashes and check reputation

# On REMnux
sha256sum suspicious.exe
# Search the hash on VirusTotal, MalwareBazaar, or Hybrid Analysis
Terminal showing sha256sum and md5sum output for a suspicious file
Terminal showing sha256sum and md5sum output for a suspicious file

Step 2: Identify file type (do not trust the extension)

file suspicious.exe
# Example output: PE32 executable (GUI) Intel 80386, for MS Windows

Step 3: Extract strings for initial clues

pestr suspicious.exe | head -50
# Look for: URLs, IP addresses, registry paths, file paths, API names

Step 4: Form initial hypotheses

Based on strings and static properties, ask yourself:

  • Does it reference network APIs? (Likely communicates with C2)
  • Does it reference registry Run keys? (Likely persists)
  • Does it reference crypto APIs? (Might encrypt files or data)
  • Does it reference process manipulation APIs? (Might inject into other processes)

Common Pitfalls and Pro Tips

Pitfall: Trusting file extensions. A file named document.pdf might actually be a PE executable. Always verify with the file command or magic byte inspection.

Pitfall: Single-category thinking. Do not assume a sample has only one function. Modern malware is modular -- a loader today might deploy ransomware tomorrow.

Pro Tip: When classifying malware, focus on the primary behavior you observe, but document all capabilities. A sample might be primarily a RAT but also have infostealer and keylogger modules.

Pro Tip: Map every observed behavior to the MITRE ATT&CK framework from the start. This creates a structured vocabulary that makes your reports actionable for defenders.

Try it in the shell
Practise this lesson's tooling on its sample in an emulated analyst shell. Output is pre-recorded — nothing executes.

Suggested triage steps

  1. 1

    Identify the file

    Before anything else, establish what you are actually looking at.

  2. 2

    Record the hash

    The hash is how every later finding ties back to this exact file.

analyst@lab:~emulated · nothing executes

MAA analyst shell — emulated. Nothing executes.

Type 'help', or click a step on the left.

$