Lab 19: Malware Analysis & Digital Forensics

Objective

Perform static and dynamic analysis of malicious scripts, then conduct digital forensics on a compromised system:

  1. Static analysis — examine malware source without executing it; identify IOCs, obfuscation, and capabilities

  2. Dynamic analysis — execute malware in an isolated container and observe system call behaviour

  3. Log forensics — parse access logs, auth logs, and cron logs to reconstruct the attack timeline

  4. Artefact recovery — find attacker-planted files, modified timestamps, and hidden data

  5. Write an incident timeline — convert raw forensic evidence into a readable incident report


Background

Every breach leaves evidence. Forensics turns that evidence into a timeline. Malware analysis turns an unknown binary into a capability report. Both are essential for incident response, threat hunting, and building better defences.

Real-world examples:

  • 2016 Bangladesh Bank SWIFT heist — forensic analysis of the attackers' tools revealed they used a custom malware family (Evtdiag) that specifically deleted Windows event log entries to slow investigation. Timeline reconstruction took 3 months.

  • 2017 NotPetya — static analysis within hours of outbreak revealed it was not ransomware (no viable decryption mechanism) but a wiper. This changed the response from "pay the ransom" to "rebuild from backup."

  • 2020 SolarWinds — Mandiant analysts performed static analysis of SUNBURST DLL; identified a 2-week dormancy period hardcoded in the malware designed to avoid sandbox analysis timeouts.

  • Log forensics (everyday SOC) — correlating access logs, auth logs, and DNS queries is the primary method for detecting lateral movement in 80%+ of enterprise incidents.

MITRE ATT&CK: T1027 (Obfuscated Files), T1059 (Command/Scripting Interpreter), T1070 (Indicator Removal)


Architecture

Time

50 minutes


Lab Instructions

Step 1: Setup — Plant Malware Samples and Log Data


Step 2: Static Analysis — Examine Without Executing


Step 3: Log Forensics — Attack Timeline Reconstruction

📸 Verified Output:


Step 4: Artefact Hunting


Steps 5–8: Report Template


Further Reading

Last updated