Hello, and welcome. This first module establishes a repeatable Windows laboratory before we touch crash analysis, mitigations, or heap behavior. The goal is not merely to get Windows Server running: it is to create a controlled system that can be reset to a known state, can preserve a useful in-memory state when necessary, and cannot casually expose experimental targets to your normal network.
You will build one isolated Windows Server 2022-or-later desktop VM, configure a deliberately restricted virtual network, and establish a checkpoint workflow suited to native x64 exploit-development experiments. By the end, you should be able to distinguish a clean-launch baseline from a live pre-trigger checkpoint—a distinction that matters later when ASLR, heap state, and debugger context become relevant.
1. Design the lab around repeatability and containment
Use a dedicated host-side location for the VM, such as:
D:\GraspLabs\HyperV\WS2022-x64-Lab\
Avoid folders synchronized by OneDrive, consumer backup software, or source-control clients. A VM and its checkpoint-differencing disks can be large, change frequently, and are not appropriate to treat as ordinary project files.
A practical starting configuration is:
| Setting | Recommended starting value | Reason |
|---|---|---|
| VM name | WS2022-x64-Lab | Makes checkpoint and debugger records unambiguous. |
| VM generation | Generation 2 | Appropriate for current Windows Server releases and supports modern firmware features. |
| Guest OS | Windows Server 2022 Desktop Experience, or later | Provides the desktop environment needed for GUI target applications and debugging tools. |
| Virtual CPUs | 2 initially | Enough for a desktop target and debugger without introducing needless host contention. |
| RAM | 8 GB, static if host capacity permits | Keeps a major host-controlled variable fixed during labs. |
| Disk | Dynamically expanding VHDX | Saves host space initially; monitor free capacity as checkpoints accumulate. |
| Secure Boot | Enabled | Preserve a realistic modern baseline unless a later controlled lab explicitly requires otherwise. |
| Network | Private virtual switch | No path to the host or external network. |
The RAM recommendation differs deliberately from a general-purpose VM setup. Disable Dynamic Memory for this course’s main target VM. Dynamic Memory is useful for server consolidation, but repeatable user-mode experiments benefit from holding guest memory capacity constant. This does not remove ASLR or make heap placement magically deterministic; it simply removes one avoidable variable.
Two reproducibility ideas must stay separate:
- A cold baseline lets you restore the same installed OS, tools, and files, then start a new process. Address randomization and allocator state may still differ on each fresh launch—as they should on a modern system.
- A live Standard checkpoint can restore the guest’s captured RAM state, including a running test process. That is useful when you need to replay an experiment from a particular pre-trigger state.
Neither is a reason to weaken mitigations or disable ASLR. The course will measure and accommodate variation rather than erase it.
Containment is also layered rather than absolute. Keep the VM free of personal accounts, SSH keys, browser profiles, mapped drives, and work credentials. When handling untrusted or malformed inputs, disable unnecessary VM integration features—especially clipboard, drive, printer, and device redirection. This course uses intentionally vulnerable laboratory programs and benign proofs of impact; do not treat a checkpoint as protection for experimenting against real software or unknown malware.
2. Build the virtual machine
Before starting, ensure Hyper-V is enabled on the host and that you have a Windows Server 2022-or-later ISO from an authorized Microsoft source. Keep the ISO in a stable location outside the VM’s checkpoint directory, since it is installation media rather than mutable lab state.
Installing Windows Server 2022 as a Virtual Machine in Hyper-V
Watch “Installing Windows Server 2022 as a Virtual Machine in Hyper-V” by Troy Berg for a concise walk-through of the Hyper-V wizard, Generation 2 selection, disk creation, ISO attachment, and the Desktop Experience installer choice.
In the New Virtual Machine Wizard, watch VM profile setup for naming, custom VM storage, Generation 2, memory, and switch selection. Notice that the video retains Dynamic Memory; for this lab, return to the VM’s Memory settings afterward and disable it. Then watch disk and ISO setup to create the VHDX and attach installation media. Finally, watch Windows installation and select a Desktop Experience edition rather than Server Core.
In Hyper-V Manager, create the VM with the profile above. During the wizard:
- Select Generation 2.
- Assign a fixed amount of startup memory appropriate for the host. After the wizard, open Settings → Memory and clear Enable Dynamic Memory.
- Create a VHDX on the dedicated lab volume.
- Attach the Server ISO as the DVD drive.
- Attach the VM to the private switch created in the next section. If you have not made it yet, choose Not Connected temporarily rather than an external switch.
- Start the VM and install Desktop Experience.
After the first guest login, record the guest OS version and build. Do not install debuggers, compilers, or lab targets yet; the next lessons will make those installations explicit. At this stage, the important outcome is a clean OS with stable VM configuration.
After installation, eject the ISO unless you have a reason to keep it mounted. This avoids later confusion about boot order or installer media.
3. Make the default network private
For exploit-development targets, the default should be no external network path. Hyper-V offers three basic switch types:
| Switch type | Connectivity | Use in this course |
|---|---|---|
| External | Guest can reach the physical network through a host adapter | Avoid as the normal configuration. |
| Internal | Guest and host can communicate; it can be paired with NAT | Use only for deliberate, time-bounded provisioning or controlled host-to-guest transfer. |
| Private | Guests on that switch can communicate with one another, but not with the host or external network | Default for the laboratory target. |
Create a private switch named Lab-Private.
Create and configure a virtual switch with Hyper-V | Microsoft Learn
Read Microsoft Learn’s “Create and configure a virtual switch with Hyper-V” to confirm the available switch types and the Hyper-V Manager workflow for creating one.
In the “Prerequisites” and “Create a virtual switch” sections, first note the three supported switch types. Then follow the Hyper-V Manager steps. Choose Private, name the switch Lab-Private, and do not select a physical NIC.
You can also create the switch from an elevated PowerShell session on the host:
New-VMSwitch -Name "Lab-Private" -SwitchType Private
Get-VMSwitch -Name "Lab-Private"
Attach Lab-Private to the VM in Settings → Network Adapter.
A private switch does not solve every containment problem. For example, it does not prevent copying a file through an enabled clipboard channel, mounting an ISO, or exposing the host through a risky VM-integration configuration. It does, however, remove the ordinary TCP/IP route from guest to host and internet, which is the correct default for later fuzzing and vulnerable-application work.
If a future installation step truly requires outbound access, do it deliberately: use a separate provisioning state, temporarily attach an internal/NAT or external network only for that purpose, then disconnect it, verify the VM’s configuration, and take a new trusted baseline. Do not silently convert the main lab machine into an internet-connected workstation.
4. Use Standard checkpoints for laboratory state
Hyper-V calls snapshots checkpoints. For this course, select Standard checkpoints for the main lab VM.

A Standard checkpoint captures the VM configuration and virtual-memory state at the checkpoint moment. A Production checkpoint is designed for data-consistent backup semantics and does not preserve the VM’s RAM state. For an exploit lab, this distinction is operational:
- Use a cold Standard checkpoint as a recoverable clean filesystem and OS baseline.
- Use a live Standard checkpoint when preserving the state of a running guest process would help reproduce a crash or pre-trigger setup.
- Do not use checkpoints as backups. They create dependent differencing disks, can consume substantial storage, and are not a substitute for exporting or backing up an important VM.
Using checkpoints | Microsoft Learn
Read Microsoft Learn’s “Using checkpoints” for the authoritative distinction between checkpoint types and the procedures for creating and applying them.
In “Changing the Checkpoint Type,” read the checkpoint distinction, concentrating on why Standard checkpoints are the appropriate laboratory choice. In “Creating checkpoints,” follow checkpoint creation. Then, in “Applying checkpoints,” read the apply choices, especially the difference between preserving the current branch and discarding it.
Open VM Settings → Management → Checkpoints and make these choices:
- Enable checkpoints.
- Select Standard checkpoints.
- Set the checkpoint file location to a folder on the dedicated lab volume, if it is not already there.
- Do not use the “Create standard checkpoints if a production checkpoint fails” option as your strategy. Select Standard directly, so the result is explicit and predictable.
The same configuration can be verified from host PowerShell:
$vm = "WS2022-x64-Lab"
Set-VM -Name $vm -CheckpointType Standard
Get-VM -Name $vm | Select-Object Name, State, CheckpointType
A checkpoint naming convention
Checkpoint names should identify purpose and state, not merely a date. Use a lexically sortable convention:
00-clean-os
01-tools-installed
02-target-build-a
run-014-pre-trigger
crash-014-post-trigger
The first two names are course-wide baselines; later names distinguish a particular controlled run. Keep names short but meaningful. A label such as final, new, or test2 becomes useless when comparing crash reports several weeks later.
Create the first baseline
When the fresh guest is configured, shut it down cleanly and create:
Checkpoint-VM -Name $vm -SnapshotName "00-clean-os"
Get-VMCheckpoint -VMName $vm
Creating the baseline while the VM is off avoids storing a large RAM image when you only need the installed-OS state. Later, when the VM is running and a precise process state matters, the extra disk cost of a live Standard checkpoint is justified.
To restore the cold baseline and discard unneeded current changes:
Restore-VMCheckpoint -VMName $vm -Name "00-clean-os" -Confirm:$false
In Hyper-V Manager, the equivalent action is right-clicking the checkpoint and choosing Apply. Treat Apply as destructive for the current branch. Choose Create Checkpoint and Apply only when the current state is independently worth preserving.
Never delete .avhdx files manually in Explorer. Delete checkpoints through Hyper-V Manager or the Hyper-V cmdlets and allow Hyper-V time to merge the changes safely. Check host free space before making many live checkpoints.
5. Verify that the lab actually resets what you think it resets
A repeatable lab should be tested, not assumed. Perform the following short validation sequence after creating 00-clean-os.
-
Verify isolation. In VM Settings, confirm that the only network adapter is connected to
Lab-Private, not an external switch. Confirm that no enhanced-session drive or clipboard redirection is enabled for experimental files. -
Verify the cold baseline. Start the VM, create and save a marker file such as
C:\LabState\baseline-test.txt, then shut down. Apply00-clean-os, boot again, and confirm that the marker file is gone. This proves you restored the intended disk state. -
Verify live-memory restoration. Boot the VM, open Notepad, type a distinctive line, and deliberately leave it unsaved. Create a checkpoint named
checkpoint-memory-testwhile the guest is running. Close Notepad and delete any related files. Applycheckpoint-memory-test. The restored guest should return with Notepad and its unsaved text present.
Microsoft’s checkpoint example uses this same idea: a Standard checkpoint restores the guest to the state in which an open application and its unsaved text were captured.
Do not overinterpret the last test. It proves that the guest’s in-memory application state is preserved; it does not restore host-side state such as a debugger window running on the host, a host clipboard, external services, or actions already performed outside the VM. Later, when a target is debugged from WinDbg, a checkpoint can restore the guest process’s state, but you may need to reconnect the debugger.
Finally, restart the VM normally from the 00-clean-os baseline at least twice. This establishes an important expectation for later work: clean OS state is repeatable, but user-mode image bases, heap addresses, and allocation behavior may legitimately vary from one new process launch to another.
6. Start a lab ledger now
Create a plain text or Markdown file on the host, for example:
D:\GraspLabs\lab-record.md
Record the following for this baseline:
- Host OS and Hyper-V version.
- Guest edition, version, and build.
- VM name, Generation 2 status, virtual CPU count, and static RAM setting.
- Secure Boot state.
- VHDX location and available host disk capacity.
- Virtual switch name and type:
Lab-Private, Private. - Checkpoint type: Standard.
- Checkpoint file location.
- Baseline checkpoint name:
00-clean-os. - Date of the cold-restore and live-memory-restore validation.
- Any enabled integration or redirection features.
This record will become the foundation for later crash triage and exploit reliability measurements. If a future result changes, you should be able to tell whether the target binary, VM configuration, OS build, mitigation policy, or checkpoint state changed with it.
Key takeaways
You now have the design for a useful exploit-development lab: a Generation 2 Windows Server desktop VM, static guest memory, a private virtual switch, and Standard checkpoints stored separately from ordinary host files. The essential checkpoint distinction is that a cold baseline resets installed state, while a live Standard checkpoint can preserve guest RAM and a running process state.
Keep the main VM disconnected from external networks, avoid sensitive host integration channels, and treat checkpoints as managed Hyper-V state rather than portable backups. Record the configuration before adding tools or targets.
Next, you will configure WinDbg for native x64 debugging, including Microsoft symbols and the paths needed to resolve your laboratory target accurately.
Can't find a good explanation? Sign up and we'll make it for you
Sign up