Domain 9Security & PKICORE

Setup Vulnerable Windows Server 2008-Metasploitable 3

Technical guide detailing the import, STOP 0x0000007B BSOD forensic analysis, offline registry driver injection, and IDE storage bus resolution for running Windows Metasploitable 3 under Proxmox VE.

Domain: Domain 9: Security & PKI•Updated: 2026-08-30
#Metasploit#Homelab#Windows Server 2008 R2#Proxmox#BSOD#Storage Drivers

Setting up Homelab - Windows Server 2008 R2 Metasploitable 3


Executive Summary

Running Windows Server 2008 R2 Metasploitable 3 inside Proxmox VE (KVM/QEMU) is essential for Windows offensive security testing, Active Directory exploration, and vulnerability analysis. However, converting VirtualBox-targeted .box appliances directly into QEMU virtual machines triggers an immediate STOP 0x0000007B INACCESSIBLE_BOOT_DEVICE Blue Screen of Death (BSOD).

This guide walks through extracting the disk image, diagnosing why standard SCSI and SATA attachments fail during kernel initialization, injecting early boot driver startup flags via the offline Windows Registry (regedit in WinRE), and finalizing the storage topology in Proxmox.


1. Environment Setup & Image Import

  • Image Acquisition: Downloaded the virtualbox target archive (.box, ~7.01 GB) from the Rapid7 HCP Vagrant Registry.
  • Archive Extraction: Uncompressed the .box file (a standard TAR archive) to extract the virtual hard disk file box-disk1.vmdk.
  • VM Shell Creation: Created VM frame VM 104 in Proxmox VE (No ISO media, default BIOS set to SeaBIOS).
  • CLI Disk Import: Imported the VMDK directly into Proxmox local-lvm storage using the shell:
qm importdisk 104 box-disk1.vmdk local-lvm --format qcow2

2. Initial Boot Failure & Symptom Analysis

  • Windows Error Recovery Menu: Booting the VM immediately triggered the “Windows Error Recovery” screen instead of loading the OS.
  • Rapid Boot Loop: Selecting Start Windows Normally caused an immediate screen flicker, a high-speed Blue Screen of Death (BSOD), and a hard VM reboot.
  • Troubleshooting Strategy: Forced Windows to freeze on crash screens to capture the exact hex STOP code rather than allowing automatic reboots.

3. BSOD Forensic Analysis

  • Captured BSOD Error Code: *** STOP: 0x0000007B (0xFFFFFFFFC0000034, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000)
  • Primary Parameter (0x0000007B): Maps to INACCESSIBLE_BOOT_DEVICE.
  • Secondary Parameter (0xFFFFFFFFC0000034): Maps to NTSTATUS STATUS_OBJECT_NAME_NOT_FOUND.
  • Diagnostic Conclusion:
    • SeaBIOS and bootmgr loaded successfully.
    • During Phase 0 kernel initialization, Windows attempted to mount C:\Windows\System32\drivers.
    • The OS lacked active, initialized drivers for the virtual storage bus presented by QEMU.
    • Windows crashed because it could no longer read its own boot disk.

4. Troubleshooting Matrix: What Was Attempted

+-----------------------------------------------------------------------------------+
|                           TROUBLESHOOTING MATRIX                                  |
+-------------------------------------+---------------------------------------------+
| Attempt                             | Result & Technical Cause                    |
+-------------------------------------+---------------------------------------------+
| 1. Changing CPU Type (`host`)       | FAILED: Crash caused by storage driver      |
|                                     | lockouts, not CPU instruction faults.       |
+-------------------------------------+---------------------------------------------+
| 2. Changing Bus to SATA (`sata0`)   | FAILED: `STOP 0x0000007B` persisted because |
|                                     | `msahci.sys` is disabled by default in VBox.|
+-------------------------------------+---------------------------------------------+
| 3. WinRE `bcdedit` Modifications    | FAILED: WinRE loaded temporary RAM disk (`X:\`)|
|                                     | without active binding to offline BCD store.|
+-------------------------------------+---------------------------------------------+
| 4. Offline Registry Hive Injection  | SUCCESS: Forces Windows to load IDE and SATA|
|    (`msahci`, `pciide`, `intelide`) | drivers during Phase 0 early boot.          |
+-------------------------------------+---------------------------------------------+

Attempt 1: Changing CPU Type (x86-64-v2 / host)

  • Action: Switched CPU model in Proxmox UI to mask instruction sets.
  • Result: FAILED.
  • Why: The crash was caused by storage driver lockouts, not CPU instruction faults.

Attempt 2: Changing Bus Controller to SATA

  • Action: Attached disk under sata0.
  • Result: FAILED. STOP 0x0000007B persisted.
  • Why: Windows Server 2008 R2 has SATA AHCI drivers (msahci.sys) disabled by default (Start = 3) on VirtualBox builds.

Attempt 3: Executing bcdedit Fixes in Recovery Console

  • Action: Ran bcdedit /set {default} bootmenupolicy Legacy from WinRE.
  • Result: FAILED. Element not found / Parameter incorrect.
  • Why: WinRE command prompt loaded a temporary RAM disk environment (X:\), which lacked active binding to the offline system BCD store.

Attempt 4: Offline Registry Modification

  • Action: Loaded C:\Windows\System32\config\SYSTEM hive in WinRE regedit and updated storage driver Start keys to 0.
  • Result: SUCCESS. Forces Windows to load IDE and SATA drivers during early boot.


5. Step-by-Step Resolution

Step 1: Inject Driver Startup Keys via WinRE

  1. Boot VM into Startup Repair / System Recovery Options $\rightarrow$ Open Command Prompt.
  2. Launch regedit.
  3. Highlight HKEY_LOCAL_MACHINE $\rightarrow$ Click File > Load Hive…
  4. Select C:\Windows\System32\config\SYSTEM and name it OFFLINE.
  5. Navigate to HKEY_LOCAL_MACHINE\OFFLINE\ControlSet001\services\.
  6. Modify the Start DWORD value to 0 (Boot Start) for these keys:
    • msahci (SATA AHCI Driver)
    • pciide (PCI IDE Driver)
    • intelide (Intel IDE Driver)
    • atapi (ATAPI Controller Driver)

  1. Highlight OFFLINE key $\rightarrow$ Click File > Unload Hive… $\rightarrow$ Exit regedit.

Step 2: Align Storage Bus Topology in Proxmox

  1. Power off VM 104.
  2. In Proxmox UI, go to VM > Hardware.
  3. Detach the SATA disk.
  4. Select Unused Disk 0 $\rightarrow$ Click Edit $\rightarrow$ Set Bus/Device to IDE 0 (ide0) or SCSI with LSI 53C895A controller.
  5. In VM > Options > Boot Order, enable ide0 as the primary boot entry.

6. Guest Console Interaction & Login

  • Problem: Pressing CTRL + ALT + DELETE on a Linux host triggers host OS system reboot/logout dialogs instead of passing to the VM console.
  • Workaround Option A (Proxmox GUI):
    • Click the left drawer tab (>) on the noVNC Console window.
    • Click the Ctrl-Alt-Delete button in the side menu.
  • Workaround Option B (Proxmox CLI):
    • Run qm sendkey 104 ctrl-alt-delete from the host shell.
  • Default Credentials:
    • Username: vagrant
    • Password: vagrant


7. Key Technical Lessons

  1. Virtual Appliance Portability: Pre-baked VM appliances often have storage drivers stripped or disabled except for the source hypervisor’s controller.
  2. WinRE Offline Hive Editing: When an OS will not boot, WinRE’s regedit can mount offline system hives from System32\config to toggle driver Start values between 0 (boot), 1 (system), 2 (auto), and 3 (manual/disabled).
  3. Storage Controller Fallback: Legacy Windows versions (Server 2008 / 7) reliably boot on standard IDE (ide0) before paravirtualized VirtIO drivers are installed.