FLARE-VM: Building a Malware Analysis Lab the Safe Way
On this page

Analysing malware has a chicken-and-egg problem: to understand the bad thing, you have to run it or at least open it, and doing that on a normal machine is how you become the next incident. The answer is a disposable, isolated lab — and FLARE-VM, Mandiant’s free install script, builds the Windows half of that lab in one command. It takes a clean Windows VM and layers on 150+ reverse-engineering and malware-analysis tools: disassemblers, debuggers, unpackers, PE viewers, .NET decompilers, network fakers. Everything a malware room needs, pre-wired.
The catch is the part the tool can’t do for you: the isolation. FLARE-VM installs the knives; you’re responsible for making sure you’re cutting in a sealed room. This post covers both — the safe build, then a hands-on tour of the tools you’ll actually reach for.
Ground rule: only analyse samples you’re authorised to handle, and only ever inside a VM you can throw away. Live malware escapes carelessly built labs. Treat every sample as if it will try to.
The two-VM lab, and why
Before FLARE-VM, picture the room it lives in. A proper analysis lab is usually two VMs on an isolated (host-only) network: the FLARE-VM Windows box where you detonate and analyse, and a Linux box (REMnux is the classic choice) that pretends to be the whole internet so the malware “phones home” to you instead of its real server.
Step 1 — A clean, isolated Windows VM
Start from a fresh Windows 10 or 11 install in VMware or VirtualBox. FLARE-VM’s own requirements: Windows 10+, at least 60 GB disk (80–100 GB is more comfortable), 4 GB+ RAM, PowerShell 5+, and a username with no spaces. Then prepare it:
- Give it internet for the install only. The script downloads a lot. You’ll cut the cord afterwards.
- Disable Windows Update so it doesn’t fight the install or change your baseline later.
- Disable Microsoft Defender and Tamper Protection. This is the step people miss. Defender will quarantine the analysis tools themselves — it sees a debugger and an unpacker as threats. Turn off Tamper Protection first (Windows Security → Virus & threat protection → Manage settings), then real-time protection, and for a permanent VM also disable it via Group Policy (
gpedit.msc). - Take a snapshot called something like
clean-base, before FLARE-VM. If the install breaks, you revert instead of rebuilding Windows.
Why disable Defender feels wrong but isn’t: this VM will never do real work and never touch your network. It’s a sterile bench. An antivirus on a bench that’s meant to hold malware just deletes your instruments. The isolation is your protection here, not the AV.
Step 2 — Run the installer
Open PowerShell as Administrator, download the official script, unblock it, and run it:
# Download the installer to the Desktop
(New-Object net.webclient).DownloadFile(
'https://raw.githubusercontent.com/mandiant/flare-vm/main/install.ps1',
"$([Environment]::GetFolderPath('Desktop'))\install.ps1")
# Allow it to run, then launch it
Unblock-File .\install.ps1
Set-ExecutionPolicy Unrestricted -Force
.\install.ps1
A GUI appears listing every package, with checkboxes. The defaults are a sensible full malware-analysis loadout — leave them unless you want a leaner build. From here it’s unattended: the script uses Chocolatey and Boxstarter to install everything, rebooting several times and resuming automatically. On a decent connection it takes 1–3 hours. Walk away.
If you’d rather script it (for rebuilding labs repeatedly), the install takes parameters:
# Non-interactive build with a known password (needed so it can log back in after reboots)
.\install.ps1 -password "LabPass123" -noWait -noGui
# Or drive the exact toolset from your own config file
.\install.ps1 -password "LabPass123" -customConfig "https://example.com/my-flare-config.xml"
If the install stalls: FLARE-VM gets its tools from the separate
VM-Packagesrepo, so a single failed tool is usually a packaging hiccup, not a broken install. The logs that tell you which one are%VM_COMMON_DIR%\log.txt,%PROGRAMDATA%\chocolatey\logs\chocolatey.log, and%LOCALAPPDATA%\Boxstarter\boxstarter.log. Re-running the installer resumes where it left off.
Step 3 — Seal the room
When it finishes, this is the most important step and the easiest to forget:
- Shut the VM down and switch its network adapter to host-only (or disconnect it entirely).
- Boot back up and take a fresh snapshot:
flare-ready. This is the state you revert to after every single sample. - Confirm there are no shared folders and no shared clipboard with your host. Those are the two most common ways malware climbs out of a VM.
Now you have a reusable analysis bench. Detonate a sample, take your notes, then revert to flare-ready and the VM is pristine again.
The toolbox, by job
FLARE-VM drops everything into a FLARE folder on the desktop and Start menu, grouped by purpose. Here’s the map of what to reach for, mirroring how an analysis actually flows:
Static triage: know before you run
Always start without executing anything. Static triage tells you what you’re dealing with and often answers the whole question before you ever detonate.
Detect It Easy (DIE) and PEStudio are the first two files I open. DIE tells you the compiler, the packer, and the entropy (high entropy = packed or encrypted). PEStudio flags the suspicious bits of a PE at a glance — risky imports, blacklisted strings, a VirusTotal score, timestamp oddities.
capa is the one that feels like magic. It reads a binary and tells you its capabilities in plain English — “communicates over HTTP”, “encrypts data using RC4”, “persists via run key” — by matching rules against the disassembly:
capa suspicious.exe
capa -vv suspicious.exe # verbose: shows exactly which code matched each capability
FLOSS (from the same team) is strings on steroids — it also decodes obfuscated strings that malware hides by building them at runtime, which plain strings never sees:
floss suspicious.exe > strings.txt
Round it out with PE-bear or HxD to eyeball the PE structure and hex, CyberChef for quick decode/decrypt of whatever you pull out, and yara to test your detection rules against the sample.
Dynamic analysis: watch it misbehave
When you’re ready to run it (snapshot first!), you watch instead of read. The classic combination:
- Process Monitor (ProcMon) records every file, registry and process operation in real time. Set filters (Process Name is your sample) before you detonate, or you’ll drown. Dropped files and persistence keys show up here instantly.
- Regshot takes a registry+filesystem snapshot before and after, then diffs them — a dead-simple way to see exactly what changed.
- System Informer (the maintained Process Hacker) shows the live process tree, injected threads and handles. Watch for your sample spawning an odd child or hollowing out a legitimate process.
- Wireshark + FakeNet-NG capture the network side. FakeNet-NG intercepts all traffic and answers it with fake services, so the malware reveals its C2 domains and beacon format while never actually reaching the internet.
- ProcDOT takes the ProcMon log and draws it as a visual graph — brilliant for turning thousands of events into a readable story.
A clean dynamic run gives you indicators of compromise — dropped filenames, registry keys, mutexes, domains, IPs — often in ten minutes.
Going deeper: disassembly and debugging
When behaviour isn’t enough and you need to understand the code itself:
Ghidra is the free, full-featured disassembler and decompiler (NSA-built, now open source). Create a project, import the sample, let it auto-analyse, and read the decompiled C-like output alongside the assembly. It’s the workhorse for static deep-dives and the first disassembler I’d learn.
x64dbg (with x32dbg for 32-bit) is the debugger you’ll live in for dynamic deep-dives — set breakpoints, step through, watch registers and memory as the malware runs. FLARE-VM bundles the plugins that matter, including ScyllaHide to defeat anti-debugging tricks and Scylla to fix up a dumped process so it runs standalone.
The two work together beautifully: find the interesting function in Ghidra, then set a breakpoint there in x64dbg to watch it execute with real data.
The specialist shelf
Modern malware is rarely a plain C executable, so FLARE-VM stocks the specialists:
- dnSpyEx — decompiles and debugs .NET assemblies, showing near-original C#. A huge share of commodity malware is .NET, and this often hands you readable source.
- de4dot — removes .NET obfuscation before you decompile.
- UPX — unpacks the most common packer in one command:
upx -d packed.exe. - PE-sieve / HollowsHunter — scan a running process for injected or hollowed code and dump it.
- scdbg / sclauncher — analyse raw shellcode.
- pdfstreamdumper, oledump and the Didier Stevens suite — pull apart malicious documents (PDF, Office).
A first-case workflow
Putting it together, here’s the loop I’d follow on an unknown Windows sample — and recommend to anyone starting out:
If you want a structured course to practise against, TCM Security’s Practical Malware Analysis & Triage is a great match — FLARE-VM is the bench, a course like that is the method.
Keep it fresh
Malware moves fast and so do the tools. Update the toolset periodically from an elevated PowerShell:
# Update all FLARE-VM packages
choco upgrade all -y
Then take a new flare-ready snapshot so your clean baseline includes the updates.
FLARE-VM is maintained in the open by Mandiant. The install script, the configurable package list and the troubleshooting guide live in the mandiant/flare-vm repository, and the individual tool packages (and where to report a broken one) are in the companion VM-Packages project. Build it once, snapshot it well, and you’ve got a disposable malware lab you can rebuild in an afternoon — forever.