03
Malware Analysis
Malware analysis is the study of malicious software to understand its behavior, identify its capabilities, and develop detection and prevention methods. This section covers various types of malware, analysis techniques, and defensive strategies.
4 topics, 13 scripts
Keyloggers
DraftA keylogger records what a user types so the attacker can collect passwords, messages and card numbers. Software keyloggers run on the victim's machine; hardware keyloggers sit between the keyboard and the computer.
- T1056.001
1 scriptReviewed Oct 11, 2026Ransomware
Not reviewedRansomware is a type of malware that encrypts files or locks systems, demanding payment (ransom) for decryption. It's one of the most damaging cyber threats, affecting individuals, businesses, and critical infrastructure.
4 scriptsNot yet reviewedRootkits
Not reviewedA rootkit is a collection of malicious software designed to provide unauthorized access to a computer while hiding its presence. Rootkits operate at the deepest levels of the operating system, modifying kernel components, system calls, and core system functions to remain undetected.
4 scriptsNot yet reviewedTrojans
Not reviewedA Trojan (or Trojan Horse) is a type of malware that disguises itself as legitimate software to trick users into installing it. Unlike viruses and worms, Trojans do not self-replicate but can create backdoors, steal data, or download additional malware.
4 scriptsNot yet reviewed
Read the full category guide
Overview
Malware analysis is the study of malicious software to understand its behavior, identify its capabilities, and develop detection and prevention methods. This section covers various types of malware, analysis techniques, and defensive strategies.
Categories Covered
- Ransomware - File-encrypting malware
- Trojans - Deceptive malware
- Rootkits - System-hiding malware
- Keyloggers - Credential stealers
- Worms - Self-replicating malware (planned)
- Botnets - Controlled networks of malware (planned)
Malware Types
| Type | Description | Common Vectors | Impact |
|---|---|---|---|
| Ransomware | Encrypts files for ransom | Email, RDP | Critical |
| Trojan | Disguised as legitimate software | Downloads, USB | High |
| Rootkit | Hides system presence | Exploits, Drivers | Critical |
| Keylogger | Records keystrokes | Phishing, Trojans | High |
| Worm | Self-replicating | Network, Email | Medium |
| Botnet | Controlled network | Various | High |
Analysis Methodologies
1. Static Analysis
- Examining code without execution
- File fingerprinting (hashes)
- String analysis
- PE header examination
- Disassembly
2. Dynamic Analysis
- Executing in sandbox environment
- Behavior monitoring
- Network traffic analysis
- Process monitoring
- Registry/file system changes
3. Memory Analysis
- RAM forensics
- Process dumping
- Rootkit detection
- In-memory payloads
Analysis Tools
Static Analysis Tools
- PE Studio - PE file analysis
- IDA Pro - Disassembler
- Ghidra - Reverse engineering
- Strings - Extract strings
- DIE - Detect It Easy
Dynamic Analysis Tools
- Cuckoo Sandbox - Automated analysis
- ProcMon - Process monitor
- Wireshark - Network analysis
- RegShot - Registry comparison
- API Monitor - API call tracking
Memory Analysis
- Volatility - Memory forensics
- Rekall - Memory analysis
- LiME - Memory acquisition
Malware Lifecycle
flowchart LR
%% Initial Access
A[Infection Vector]
A1[Phishing Email]
A2[Malicious Attachment]
A3[Drive-by Download]
A4[Exploited Vulnerability]
A --> A1
A --> A2
A --> A3
A --> A4
%% Execution
B[Execution]
B1[User Opens File]
B2[Exploit Triggered]
B3[Macro / Script Runs]
A --> B
B --> B1
B --> B2
B --> B3
%% Persistence
C[Persistence]
C1[Registry Run Keys]
C2[Scheduled Tasks]
C3[Startup Folder]
C4[Service Installation]
B --> C
C --> C1
C --> C2
C --> C3
C --> C4
%% Command & Control
D[Command & Control]
D1[HTTP/HTTPS Beaconing]
D2[DNS Tunneling]
D3[Encrypted Channels]
C --> D
D --> D1
D --> D2
D --> D3
%% Payload Delivery
E[Payload Delivery]
E1[Ransomware Deployment]
E2[Credential Stealing]
E3[Data Exfiltration]
D --> E
E --> E1
E --> E2
E --> E3
%% Impact
F[Impact]
F1[System Encryption]
F2[Data Theft]
F3[Service Disruption]
F4[Financial Loss]
E --> F
F --> F1
F --> F2
F --> F3
F --> F4
Detection Methods
Signature-Based Detection
- Known malware patterns
- File hashes
- Behavioral signatures
- Network signatures
Heuristic Analysis
- Suspicious behavior patterns
- Code anomalies
- Anti-debugging techniques
- Packers/obfuscation
Behavioral Analysis
- File system changes
- Registry modifications
- Process injection
- Network connections
Best Practices
For Analysts
# Always analyze in isolated environment
# Use snapshots for easy restoration
# Document all findings
# Follow responsible disclosure
Prevention
- Least Privilege – Limit user permissions
- Application Whitelisting – Only allow approved software
- Regular Updates – Patch vulnerabilities promptly
- Email Filtering – Block malicious attachments
- User Training – Recognize social engineering attacks
Safety Warnings
⚠️ CRITICAL: Malware analysis is dangerous!
- ❌ NEVER analyze malware on production systems
- ✅ ALWAYS use isolated virtual machines (VMs) with network isolation
- 🚫 DISABLE shared folders and clipboard access
- 💾 USE snapshots before execution
- 👀 MONITOR for escape attempts
- 📋 FOLLOW strict lab safety protocols
References
- Malware Analysis Fundamentals
- Practical Malware Analysis
- OWASP Malware Threats
- VirusTotal
- Hybrid Analysis
Source folder: 03-malware-analysis