TExcelTAD
Home › Malware Analysis, Digital Forensics & Incident Response › The Analysis Lab: REMnux, FLARE-VM, Snapshots and a Fake Internet

The Analysis Lab: REMnux, FLARE-VM, Snapshots and a Fake Internet

A malware sample is a program written to do harm to whatever machine runs it, and to spread from there if it can. An analysis lab exists so that the "whatever machine" is a disposable virtual machine on a network that leads nowhere. Most lab accidents are not exotic VM escapes. They are ordinary: a shared folder that let the sample encrypt the host's documents, a bridged network adapter that let it reach the office LAN, a clipboard that carried a "harmless" string out, a snapshot that was never taken so the infected VM was reused for a week.

This lesson is about building the lab right. The general lab material (hypervisors, host-only networks, snapshots) is in Hypervisors, VM Networks and Snapshots and Lab Safety Rules; here we add what malware analysis needs on top.

The standard layout

physical host (samples stay inside encrypted archives here) Windows analysis VM FLARE-VM tools, 10.10.0.20 gateway + DNS = 10.10.0.53 clean snapshot before each run REMnux VM, 10.10.0.53 INetSim: fake DNS, HTTP, SMTP packet capture of everything static tools host-only 10.10.0.0/24 real LAN / Internet: no route
  • REMnux is a free Linux distribution for malware analysis (maintained by Lenny Zeltser and contributors): static tools for many file types, network tools, and INetSim, which answers DNS, HTTP(S), SMTP, FTP and other protocols with fake but plausible replies.
  • FLARE-VM is a set of installation scripts from Mandiant's FLARE team that turns a Windows VM into an analysis workstation (debuggers, disassemblers, PE viewers, Sysinternals tools). You install it yourself on a Windows VM you are licensed to use.
  • FakeNet-NG (also from FLARE) does a similar job to INetSim but runs on the Windows VM itself, intercepting its traffic locally. Use one or the other.

The point of the fake Internet is that a sample which "phones home" gets an answer, so it keeps behaving normally, while every request is logged and nothing leaves the lab. The fake DNS server answers every name with the REMnux address; the fake HTTP server returns a default page or file for any URL.

The isolation rules

Rule Why
Host-only or internal network; never bridged or NAT NAT gives the sample the Internet; bridged gives it your LAN
No shared folders, no drag-and-drop, no shared clipboard Each is a channel from the guest to the host's files
No USB pass-through, no unneeded virtual devices Fewer devices, fewer paths out
Clean snapshot taken before the run; revert after every run An infected VM must never be reused
Hypervisor patched; guest additions minimal VM escapes are rare but real, and they target these components
Samples move only as password-protected archives Stops accidental execution and anti-virus deletion in transit
No credentials of yours in the VM: no work accounts, SSH keys or browser sessions Infostealers take whatever is there
A separate host if possible; never your daily work machine Defence in depth if everything else fails

Some samples check for a VM or for analysis tools and stay quiet when they find one. That is a limit of the lab, discussed in Sandboxes; the answer is to record it as a finding, never to weaken the isolation.

A lab configuration checker

Lab VMs are configured in files (VirtualBox .vbox, VMware .vmx, libvirt XML). Before any run, check the configuration rather than trusting memory. The example applies the rules above to two synthetic VM descriptions written as Python dictionaries (the field names are simplified; a real checker would parse the hypervisor's file):

python · try it yourself
RULES = [
    ("network is host-only or internal",     lambda vm: all(n in ("hostonly", "internal") for n in vm["nics"])),
    ("no shared folders",                    lambda vm: not vm["shared_folders"]),
    ("clipboard and drag-and-drop disabled", lambda vm: vm["clipboard"] == "disabled" and vm["dnd"] == "disabled"),
    ("no USB pass-through",                  lambda vm: not vm["usb_devices"]),
    ("a clean snapshot exists",              lambda vm: any(s["clean"] for s in vm["snapshots"])),
    ("DNS points into the lab",              lambda vm: vm["dns"].startswith("10.10.0.")),
]

vms = {
    "flare-win10": {"nics": ["hostonly"], "shared_folders": [], "clipboard": "disabled", "dnd": "disabled",
                    "usb_devices": [], "snapshots": [{"name": "clean-2026-01-15", "clean": True}], "dns": "10.10.0.53"},
    "quick-test":  {"nics": ["nat", "hostonly"], "shared_folders": ["C:\\Users\\me\\Downloads"],
                    "clipboard": "bidirectional", "dnd": "disabled", "usb_devices": ["usb-stick"],
                    "snapshots": [], "dns": "192.0.2.53"},
}

for name, vm in vms.items():
    failures = [rule for rule, check in RULES if not check(vm)]
    print(f"{name}: {'READY' if not failures else 'NOT SAFE FOR SAMPLES'}")
    for rule in failures:
        print(f"  FAIL  {rule}")
flare-win10: READY
quick-test: NOT SAFE FOR SAMPLES
  FAIL  network is host-only or internal
  FAIL  no shared folders
  FAIL  clipboard and drag-and-drop disabled
  FAIL  no USB pass-through
  FAIL  a clean snapshot exists
  FAIL  DNS points into the lab

The quick-test VM is what accidents look like: someone added a NAT adapter "to install a tool", mapped their Downloads folder to copy the sample in, and never took a snapshot. Each failure is a path for a sample to reach something real.

How lab failures are detected

  • Network: capture on the host-only network and on the host's real interface during runs. Any lab traffic on the real interface is a leak. A DNS query from the analysis VM to anything except the lab resolver means a misconfiguration.
  • Host: run endpoint protection on the host (not only in the VM), and alert when hypervisor processes write outside the VM's directory.
  • Process: a checklist (like the script above) signed off before each run, and a lab log of which sample ran in which snapshot and when.

How the lab is kept safe

  • Take the clean snapshot right after installing tools, put the date in its name, and revert with a script, not by hand.
  • Download tools on a separate "build" network that is never used during analysis; then switch the adapter to host-only and verify it.
  • Rebuild the analysis VM from scratch periodically: snapshots accumulate drift.
  • For high-risk work (worms, wipers, samples aimed at hypervisors) use a dedicated physical host on an air-gapped network.

Pitfalls

  • "Just for a second" NAT. Some samples act within seconds of starting; one second online can be enough to report a victim or download a second stage.
  • Analysing on the host. Static tools on the host are acceptable for samples inside archives you never extract there; one double-click in the wrong window is not.
  • Forgetting that the fake Internet changes behaviour. A sample that gets INetSim's default page may take a different path than one that reached its real server. Record the INetSim configuration with your results.
  • Leaving the VM running. Revert right after the run; an infected VM left idle can still act on the host-only network.

Practice

1. Why is a NAT adapter as dangerous as a bridged one for malware analysis?

NAT gives the VM outbound Internet access through the host. The sample can reach its real infrastructure, report the victim, download payloads or attack other hosts. NAT only hides the VM from inbound connections.

2. A sample makes no network requests in your lab. Name two lab-related explanations before concluding that it has no network capability.

DNS or HTTP was not simulated (no fake server answered, so it gave up), or it detected the VM or the analysis tools and stayed quiet. It may also wait longer than the run lasted or need a trigger (a user action, a date). Static analysis of its imports and strings helps decide.

3. Add a rule to the checker: the VM must have at most 8 GB of RAM.

Add ("RAM at most 8 GB", lambda vm: vm.get("ram_gb", 0) <= 8) to RULES and a ram_gb field to each VM. The rule is an example of encoding a policy; whatever your lab's policy is, check it in code before every run.

Test yourself

What does INetSim provide in an analysis lab?

  1. Real Internet access through a proxy
  2. Fake but plausible answers for DNS, HTTP, SMTP and other services, with logging
  3. A Windows debugger
  4. Disk encryption for samples

Which of these is a direct path from the guest to the host's files?

  1. A host-only network
  2. A shared folder
  3. A clean snapshot
  4. A fake DNS server

When should an analysis VM be reverted to its clean snapshot?

  1. Once a month
  2. After every sample run
  3. Only when it crashes
  4. Never, snapshots slow it down

What is FLARE-VM?

  1. A Linux distribution
  2. Installation scripts that turn a Windows VM into an analysis workstation
  3. A hypervisor
  4. A malware family