Windows Sandbox is a lightweight, disposable desktop environment built into Windows 10 and Windows 11 Pro, Enterprise and Education that runs applications in isolation from the host operating system. Each session starts from a clean, pristine copy of Windows, and when the window closes, all software, files and state are permanently deleted.
Within Windows security, the feature belongs to the family of virtualization-based protections. It uses the Microsoft hypervisor to separate a guest kernel from the host, which makes it a practical tool for opening suspicious attachments, testing installers or browsing untrusted sites without risking the main system.
How Windows Sandbox isolates untrusted code
Windows Sandbox runs a separate kernel inside a Hyper-V virtual machine, so code inside it cannot directly access host memory, processes or files. Unlike a conventional virtual machine, it needs no separate installation image or license: it builds its environment from the host’s own Windows files.
Several design choices keep it fast and small. A dynamic base image links most unchanged system files to the host as read-only references, so the sandbox occupies only around 25 MB on disk when idle and roughly 100 MB when running. Direct map memory sharing lets the guest reuse host pages for identical system binaries, and an integrated kernel scheduler treats sandbox threads like host processes, which lets the host reclaim memory and CPU when needed.
The table below describes the core components and the role each plays in the isolation model.
| Component | Function | Security effect |
|---|---|---|
| Hyper-V hypervisor | Runs the guest kernel in its own partition | Hardware-enforced boundary |
| Dynamic base image | Reuses host system files as immutable links | Clean start on every launch |
| Direct map memory | Shares identical read-only pages | Low overhead without write access |
| Integrated scheduler | Schedules guest work as host threads | Responsive host under load |
| WDAGUtilityAccount | Default local account inside the guest | No host credentials exposed |
Requirements and configuration options
Windows Sandbox requires a supported edition, hardware virtualization enabled in firmware and enough resources for a second running Windows instance. It is not available on Windows Home editions, and it is enabled through Turn Windows features on or off or with the Enable-WindowsOptionalFeature cmdlet using the feature name Containers-DisposableClientVM.
| Requirement | Minimum | Recommended |
|---|---|---|
| Edition | Windows 10 or 11 Pro, Enterprise, Education | Current supported release |
| Architecture | 64-bit (AMD64 or ARM64) | 64-bit with SLAT support |
| Memory | 4 GB RAM | 8 GB RAM or more |
| Free disk space | 1 GB | SSD storage |
| CPU cores | 2 cores | 4 cores with hyperthreading |
Behavior is customized with Windows Sandbox configuration files, plain XML documents with the .wsb extension. Opening such a file launches a sandbox with the specified settings, which makes repeatable test environments easy to share within a team.
| Setting | Purpose | Security consideration |
|---|---|---|
vGPU | Enables or disables virtual GPU | Disable to reduce attack surface |
Networking | Turns network access on or off | Disable for offline malware analysis |
MappedFolders | Shares host folders, optionally read-only | Always prefer read-only mapping |
LogonCommand | Runs a script after sign-in | Automates tool setup |
ClipboardRedirection | Allows copy and paste with the host | Disable to block data transfer |
MemoryInMB | Sets guest memory | Prevents host resource exhaustion |
Recent Windows 11 releases also added command-line control through the wsb tool, which can start, list and stop sessions and execute commands inside them, and some builds allow state to persist across a guest restart until the sandbox itself is closed.
Windows Sandbox compared with related isolation features
Windows Sandbox is a whole-desktop disposable environment, which distinguishes it from features that protect individual processes or credentials. It complements, rather than replaces, other virtualization-based security components.
| Feature | What it isolates | Persistence |
|---|---|---|
| Windows Sandbox | Entire temporary desktop | Discarded on close |
| Hyper-V virtual machine | Full installed operating system | Persistent with checkpoints |
| Credential Guard | Secrets of the LSA process | Permanent host protection |
| Memory integrity | Kernel-mode code integrity checks | Permanent host protection |
| Smart App Control | Blocks untrusted apps before execution | Policy on the host |
A full Hyper-V virtual machine remains the better choice when an analyst needs a specific Windows version, snapshots or long-running persistent tooling. Windows Sandbox wins when the priority is speed, zero maintenance and a guaranteed clean state.
Practical uses in administration and security work
The most common use is safe detonation of unknown files: opening an unexpected email attachment, testing a downloaded utility or inspecting a script before running it on production machines. Administrators also use it to test software deployments, validate installer switches and check how an application behaves on a clean profile.
- Triage of suspicious files with networking disabled and a read-only mapped folder.
- Installer testing to confirm silent switches and dependencies on a clean system.
- Browsing untrusted sites in a session that leaves no cookies or downloads behind.
- Training and demonstrations that must start identically every time.
- Reproducing user issues without contamination from a technician’s own profile.
In managed environments, administrators can control availability through Group Policy or Intune, for example disabling clipboard sharing, printer redirection or networking for every sandbox session in the organization.
Limitations and security caveats
Windows Sandbox is strong isolation, not perfect isolation. Any enabled channel, such as networking, a writable mapped folder or clipboard redirection, is a potential path back to the host or the local network. Malware with network access can still reach internal systems or exfiltrate data that the user pastes into the guest.
Some advanced malware detects virtualized environments and stays dormant, so a file that appears harmless in the sandbox may still be malicious. The environment also lacks the instrumentation of a dedicated malware analysis lab, such as API tracing or memory forensics. Because everything is deleted on close, any evidence must be copied out deliberately before the session ends.
| Problem | Likely cause | Fix |
|---|---|---|
| Feature cannot be enabled | Virtualization disabled in firmware | Enable VT-x or AMD-V in UEFI |
| Sandbox fails to start | Conflicting hypervisor or low memory | Free resources, check Hyper-V state |
| Malware reached the network | Networking left enabled | Disable it in the .wsb file |
| Host files were modified | Mapped folder was writable | Set ReadOnly to true |
| Results lost after closing | Disposable design | Export logs to a mapped folder first |
A plain-language summary
Windows Sandbox is like a brand-new spare computer inside your computer that appears in a window whenever you need it. You can open a strange file or install an unknown program there, and whatever happens stays inside that window.
When you close it, the spare computer vanishes completely, along with anything you did in it. Next time you open it, it is clean again. It is a quick way to try something risky without putting your real files at stake, as long as you do not open doors between the two, such as shared folders or the network.
An example from practice
An IT administrator at a mid-sized accounting firm receives a report from staff about an email with an attachment named as an overdue invoice. Rather than opening it on a workstation, the administrator launches a prepared .wsb configuration file that disables networking, clipboard redirection and the virtual GPU, and maps a quarantine folder as read-only.
Inside the sandbox, the administrator opens the document, which immediately tries to run a macro that drops a script into the temporary folder. With no network connection, the script fails to download its payload. The administrator records the file names and the process behavior, copies notes to a separate writable log folder, then closes the window.
The entire check takes about ten minutes, the host and network remain untouched, and the firm uses the gathered indicators to block the sender and the attachment hash across its email filtering and endpoint protection.