# Windows Sandbox: the right way to open a suspicious file

> What the sandbox isolates, what still leaks through, and when a full VM is the better answer.

**Tested on**

- Build: 26300.9457
- Edition: Pro (26H2)
- Architecture: x64
- Evidence: E1
- Verified: 2026-10-29

## The short answer

Windows Sandbox is a **disposable, isolated desktop** built on the same virtualisation stack as Hyper-V. Close the window and everything in it is gone.

It is the right tool for "I need to open this installer and see what it does":

- it starts in seconds (no OS install);
- it shares nothing with the host by default;
- closing it discards the entire state.

It is the wrong tool for "I want to test a driver" or "I need a persistent test machine".

## Requirements

| Requirement | Detail |
|---|---|
| Edition | **Pro, Enterprise, Education** (not Home) |
| Virtualisation | enabled in firmware (VT-x/AMD-V, and SLAT) |
| Feature | *Windows Sandbox* in **Optional features** |
| Nested virtualisation | the sandbox itself cannot host another hypervisor |

```powershell
Get-WindowsOptionalFeature -Online -FeatureName Containers-DisposableClientVM |
  Select-Object FeatureName,State
# enable if disabled (reboot required)
# Enable-WindowsOptionalFeature -Online -FeatureName Containers-DisposableClientVM -All
```

## What leaks through

| Channel | Default | Risk |
|---|---|---|
| **Clipboard** | shared with host | text/files can cross — **not** isolated |
| **Mapped folder** | off unless configured | a mapped folder is writable from the sandbox |
| **Network** | enabled | malware can reach the internet/LAN |
| **Audio/printing** | limited | usually off |
| **Host filesystem** | not mounted | the point of the sandbox |

That first and third row are why "open it in Sandbox" is not a guarantee: a clipboard-shared, network-enabled sandbox can still exfiltrate what you paste, and can still attack your router.

A `.wsb` configuration file controls this:

```xml
<Configuration>
  <Networking>Disable</Networking>
  <ClipboardRedirection>Disable</ClipboardRedirection>
  <MappedFolders>
    <MappedFolder>
      <HostFolder>C:\Users\me\Downloads\suspect</HostFolder>
      <SandboxFolder>C:\work</SandboxFolder>
      <ReadOnly>true</ReadOnly>
    </MappedFolder>
  </MappedFolders>
</Configuration>
```

Save as `test.wsb`, double-click to launch with those settings.

> **Danger: A mapped folder is a two-way door unless you make it read-only**
>
> Malware inside the sandbox can write to a mapped folder, and therefore onto your host. Always set `ReadOnly` unless you are deliberately extracting output.

## Sandbox versus VM

| | Windows Sandbox | Full VM |
|---|---|---|
| Start time | seconds | minutes |
| Persistence | none | full |
| Snapshot/rollback | no (it is disposable by design) | yes |
| Custom OS | no (same build as host) | any |
| GPU | basic | passthrough possible |
| Good for | one-shot inspection | repeatable testing |

For anything you will do twice, a VM with snapshots is better. For a single suspicious installer, the sandbox is faster and safer than a dirty test machine.

## A safe procedure

1. Put the file in its own folder.
2. Launch a `.wsb` with networking and clipboard **disabled**, folder **read-only**.
3. Open the file, observe, do not enter credentials.
4. Close the sandbox window — state is discarded.
5. If you need the "result", copy it out through a read-write mapping you created deliberately.

## Related

- [Core isolation and HVCI](https://winbook.fyi/en/windows/hardening/core-isolation/)
- [SmartScreen](https://winbook.fyi/en/windows/hardening/smartscreen/)
- [WSL2 and Hyper-V coexistence](https://winbook.fyi/en/windows/dev/hyperv-coexistence/)

## Lab boundary

E1. Sandbox requirements and isolation behaviour are documented by Microsoft. The lab VMs are themselves virtualised without nested support for the sandbox feature, so it was not run here.

## Sources

- [Microsoft Learn — Windows Sandbox](https://learn.microsoft.com/en-us/windows/security/application-security/application-isolation/windows-sandbox/)
- [Microsoft Learn — Virtualization-based security](https://learn.microsoft.com/en-us/windows-hardware/drivers/bringup/)
- [Microsoft Learn — Driver installation](https://learn.microsoft.com/en-us/windows-hardware/drivers/install/)

---

Source: https://winbook.fyi/en/windows/customise/sandbox/
