GHOSTNET›MALWARE ANALYSIS›CONCEPT
LAB →
MOD-07 · INTERMEDIATE MODULE

MALWARE ANALYSIS & REVERSE ENGINEERING

Methodology · Static Analysis · Dynamic Analysis · Ghidra · YARA Rules · Ransomware Anatomy · Evasion · Memory Forensics

7
CHAPTERS
~2.5hr
TOTAL READ
ADVANCED
DIFFICULTY
MOD-07
IDENTIFIER
BEGINNER~15 min READCHAPTER 1 OF 8

Analysis Methodology & Lab Setup

KEY POINTS · THE QUICK VERSION
  • Always start with static triage (hash, strings, imports) before ever executing a sample
  • Take a clean VM snapshot before execution — you need to be able to roll back instantly
  • INetSim simulates network services inside the VM — malware C2 traffic becomes observable and safe
  • REMnux is the purpose-built Linux distro for malware analysis — includes all the tools pre-configured
Scan these first, then read below for the depth and examples — or jump straight to the lab.

Malware analysis is like a forensic autopsy — you are studying a dangerous thing in a controlled environment to understand exactly what it does. There are two main approaches: static (examining the file without running it) and dynamic (running it in a sealed container and observing behavior). Professionals use both.

◈ PICTURE IT — MTAANI EDITION

A strange parcel is dumped at your plot gate with no sender. You do not tear it open on the sitting-room table. You carry it to an empty spare room where a mess can be contained, read everything printed on the outside first — weight, labels, who it is addressed to — and only then, carefully, cut the tape. That spare room is your isolated analysis VM; reading the outside is static analysis; opening it under watch is dynamic analysis. Never open the parcel in the room where you live.

Analysis Approaches

APPROACHMETHODTOOLSWHEN TO USE
Static (basic)Strings, hashes, imports — no executionstrings, file, pestudio, pefileFirst 5 minutes — quick triage
Static (advanced)Disassembly, decompilation, code flow analysisIDA Pro, Ghidra, Binary NinjaDeep understanding without execution risk
Dynamic (basic)Execute in sandbox, observe behaviourAny.run, Cuckoo, Hybrid AnalysisFast behavioural overview
Dynamic (advanced)Interactive analysis, API monitoring, memory dumpsx64dbg, Procmon, WiresharkBypass evasion, full control needed
HybridStatic to map structure, dynamic to confirmAll of the aboveComplete picture — used in reports

Analysis Workflow

// STRUCTURED ANALYSIS PROCESS
Phase 1: TRIAGE (5 minutes)
  - Hash the file, check VirusTotal
  - strings output for quick intel
  - file type identification
  - Submit to sandbox (runs in parallel)

Phase 2: STATIC ANALYSIS (30-60 minutes)
  - PE header analysis (imports, sections, entropy)
  - Disassemble/decompile key functions
  - Map code flow and identify capabilities
  - Document IOCs: strings, domains, registry keys

Phase 3: DYNAMIC ANALYSIS (30-60 minutes)
  - Execute in isolated VM (snapshot first!)
  - Monitor: filesystem, registry, network, processes
  - Capture full network traffic with Wireshark
  - Interactive if needed (sandbox or manual)

Phase 4: REPORTING
  - Document: capabilities, persistence, IOCs
  - Write YARA rule if novel sample
  - Threat intel sharing if appropriate

Safe Lab Setup

// ANALYSIS LAB REQUIREMENTS
# Isolated VM (VMware or VirtualBox):
# - Windows 10/11 for PE malware
# - Take CLEAN SNAPSHOT before any execution
# - Network: Host-only or NAT (NEVER bridged to real network)
# - No shared folders between host and analysis VM
# - No clipboard sharing during execution

# REMnux — purpose-built malware analysis distro:
# https://remnux.org
# Includes: volatility, viper, radare2, yarGen, pdftools

# Fake network services (inside analysis VM):
sudo apt install inetsim
sudo inetsim
# Simulates DNS, HTTP, SMTP, FTP responses
# Malware connects to fake C2 → you see its comms

# Handling samples safely:
# - Rename .exe to .malz or .vir to prevent accidental run
# - Store in password-protected ZIP (password: infected)
# - SHA256 hash is your sample identifier
# - NEVER double-click — always Open With or run in sandbox
CRITICAL

Never execute malware samples on your host machine or any network-connected system you care about. Use an isolated virtual machine with networking disabled or pointed at INetSim. The only exception is deliberate dynamic analysis with proper containment. One mistake = real infection.

RECAP · CHECK YOURSELF
  • Always start with static triage (hash, strings, imports) before ever executing a sample
  • Take a clean VM snapshot before execution — you need to be able to roll back instantly
  • INetSim simulates network services inside the VM — malware C2 traffic becomes observable and safe
  • REMnux is the purpose-built Linux distro for malware analysis — includes all the tools pre-configured
Read to the end to count this chapter
▸ READY TO PRACTISE
You've now covered enough for Lab steps 1–2 of 22. Try them in the lab while it's fresh.
OPEN LAB ▸
⚡ TEST YOURSELF
End-of-chapter quiz
A dozen questions — recall and practical. Graded, earns up to 20 XP.
PRACTISE IN THE LAB ▸
READY TO PRACTICE?
MOD-07 Interactive Lab
22 steps · 465 XP · Real commands · Flag captures
LAUNCH LAB →
← MOD-06: WEB ATTACKSMOD-08: NETWORK ATTACKS →