Skip to content

Disposable and secure virtual lab for malware analysis and traffic inspection using Hyper-V on Windows 11.

License

Notifications You must be signed in to change notification settings

edprybylko/HyperVSecLab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

25 Commits
Β 
Β 
Β 
Β 

Repository files navigation

HyperVSecLab - Security lab w/ disposable VMs and mobile-device monitoring

A modular, Qubes-inspired virtual lab for Windows 11 using Hyper-V, pfSense, Xubuntu, and Tailscale VPN β€” designed to sandbox suspicious files, monitor host and mobile network traffic, and forward real-time alerts directly to your Windows desktop.

HyperVSecLab turns your Windows laptop into a personal security operations center (SOC), complete with deep packet inspection, behavioral analysis, and live notifications β€” no dual-booting required.

Built for analysts, homelabbers, and security-conscious users who want hardened isolation, full-device monitoring, and zero-trust network control β€” even for mobile devices.

With built-in support for Tailscale VPN, you can route your phone's traffic through the lab to detect malware behavior, DNS tunneling, C2 beacons, and more using enterprise-grade tools like Suricata and Zeek.


πŸ“¦ FEATURES

βœ“ Tailscale VPN support for Windows host, guest VMs, and mobile devices β€” with full routing and traffic monitoring through net-vm

βœ“ Persistent net-vm with pfSense + Suricata + Zeek for deep traffic inspection

βœ“ Disposable inspect-vm for analyzing suspicious files (PDF, DOCX, EXE, etc.)

βœ“ Real-time alerts sent to Windows via toast notifications

βœ“ Transfer.vhdx drive auto-syncs logs and config files between host and VMs

βœ“ PowerShell-based automation (build, setup, snapshot, destroy)


🧰 SYSTEM REQUIREMENTS

  • Windows 11 Pro / Enterprise (Hyper-V enabled)
  • Surface Pro 9 or similar device with > 8GB RAM
  • Hyper-V Virtualization enabled in BIOS
  • At least 40 GB of free disk space

🧱 REPOSITORY STRUCTURE

C:\HyperVSecLab\

β”œβ”€β”€ build.ps1 β†’ Interactive script to build net-vm / inspect-base

β”œβ”€β”€ new-lab.ps1 β†’ Launches disposable inspect-vm with VHDs

β”œβ”€β”€ setup.ps1 β†’ Provisions pfSense net-vm (Suricata, Zeek, Tailscale)

β”œβ”€β”€ create-transfer.ps1 β†’ Creates and populates transfer.vhdx

β”œβ”€β”€ burn.ps1 β†’ Wipes lab session or full net-vm setup

β”œβ”€β”€ tray-monitor.ps1 β†’ Windows tray icon and state monitor

β”œβ”€β”€ transfer\

β”‚ β”œβ”€β”€ config\

β”‚ β”‚ β”œβ”€β”€ hypervseclab.rules β†’ Suricata custom rules

β”‚ β”‚ β”œβ”€β”€ tailscale.zeek β†’ Zeek detection script for UDP 41641

β”‚ β”‚ β”œβ”€β”€ netvm-alert-forwarder.sh β†’ Shell watcher to forward alerts

β”‚ β”‚ └── logs\

β”‚ β”‚ β”œβ”€β”€ suricata\

β”‚ β”‚ β”œβ”€β”€ zeek\

β”‚ β”‚ └── alerts-summary.txt

β”œβ”€β”€ isos\

β”‚ β”œβ”€β”€ netgate-installer-amd64.iso β†’ pfSense ISO

β”‚ └── xubuntu-XX.XX-desktop.iso β†’ Xubuntu ISO (optional minimal/server)


🧩 REQUIRED DOWNLOADS

  1. PuTTY Tools (plink + pscp)
    Download from: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

    • Required for setup.ps1 SSH automation
    • Add plink.exe and pscp.exe to your system PATH
  2. pfSense ISO (Net-VM) Download from: https://www.netgate.com/downloads

    • Choose pfSense CE (Community Edition)
    • Extract the .gz to get the .iso
  3. Xubuntu ISO (Inspect-VM) Download from: https://xubuntu.org/download/

    • You can choose minimal install during setup
    • ISO must be placed in the /isos folder
  4. Tailscale Account (Free) Register at: https://tailscale.com

    • Used to connect your devices (mobile, host, net-vm)
    • Subnet routing enabled through pfSense net-vm

πŸš€ GETTING STARTED

  1. Clone the repo into:
    C:\HyperVSecLab\

  2. Download and move ISO files into the /isos folder:

    • netgate-installer-amd64.iso
    • xubuntu-*.iso
  3. Run:
    build.ps1
    β†’ Choose option to build net-vm (pfSense) and/or inspect-vm base

  4. Boot pfSense, complete guided install:

    • Assign interfaces: WAN (external), LAN (internal)
    • LAN IP recommended: 10.10.10.1/24
    • Disable IPv6 (optional)
    • Enable SSHD via console menu (option 14)
  5. From host, run:
    setup.ps1
    β†’ Installs Suricata, Zeek, Tailscale
    β†’ Sets up alert forwarders and syncs logs

  6. On mobile or external device, install Tailscale app and connect β†’ Route traffic through net-vm

  7. To analyze suspicious files:

    • Run new-lab.ps1 to spin up inspect-vm
    • Drop files into sandboxed transfer-sandbox.vhdx
  8. Logs are synced to:
    transfer/config/logs/
    and alerts forwarded live to your Windows desktop


πŸ“£ ALERTING & LOGGING

βœ“ Suricata and Zeek monitor all LAN/VPN traffic
βœ“ Alerts logged and forwarded via:

  • netvm-alert-forwarder.sh
  • Windows toast notifications (via toast-listener.ps1) βœ“ Logs written to:
  • /mnt/transfer-config/logs/suricata/
  • /mnt/transfer-config/logs/zeek/
  • alerts-summary.txt for daily review

🧼 RESETTING THE LAB

Run:

  • burn.ps1 -mode session
    β†’ Destroys only the disposable inspect-vm + session disks

  • burn.ps1 -mode all
    β†’ Wipes net-vm, virtual switches, and resets lab to clean state


Built with πŸ’» PowerShell, πŸ” pfSense, 🧠 Zeek, πŸ›‘οΈ Suricata, and ☁️ Tailscale

Inspired by Qubes OS, brought to your Windows desktop.

About

Disposable and secure virtual lab for malware analysis and traffic inspection using Hyper-V on Windows 11.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published