Microsoft’s Windows Sandbox – A Disposable Virtual Machine to run Untrusted Programs including .Exe files

Windows Sandbox

Have you ever used virtual machines only for running untrusted programs to protect your PC from running into trouble? Well, Microsoft has brought to you “Windows Sandbox”, which is as secure for your computer as any virtual machine could be. In addition, it will be far quicker, reliable and always up to date as long as your computer is.

Even if you are not power user, but a little above than most common users who would think twice to run a program that they don’t know what it is. Such as a program you found on the internet, or something that came through an email, executable files have always been risky if  came from a unknown source or from a less trustworthy source.

This is the case where most common users have always been prone to stuck with troubles and end up having malware or even viruses in their PCs, you remember the ransomware, right? But this is the case where power users or geeks would always use virtual machines (with guest operating systems) to run those untrusted programs or files to try in an isolated environment that won’t hurt the host operating system.

Microsoft has just did an excellent job to bring the “Windows Sandbox” as a feature in Windows 10 operating systems that will run just like any virtual machine, giving you a fresh copy of “Guest Windows 10” running in an isolated sandbox environment. The feature comes with the recently released Insider Preview Build 18305, which is currently available to Windows Insiders in the Fast ring. However, the Windows Sandbox will only be rolled out to Windows 10 Pro and Windows 10 Enterprise.

Windows Sandbox

Windows Sandbox running with guest (Windows 10) in host Windows 10 operating system / Microsoft

Microsoft has designed the Windows Sandbox as a secure and disposable guest Windows 10 environment. It is a lightweight virtual machine and will run exactly like the one, though when closed, everything will be disposed off (or more simply, everything will be deleted). Hence it requires a an operating system image to boot from and will require hardware-based virtualization – must be enabled in BIOS.

How Windows Sandbox will work, and how it is different from ordinary Virtual Machines?

Microsoft has made it a lot better than other virtual machines. Instead of downloading a full operating system image like you would do with any other virtual machine, Windows Sandbox will use a copy of Windows 10 already installed on your PC. You will have to enable/install the Windows Sandbox from Windows Features.

Microsoft keeps a “dynamic base image” in a compressed 25MB package on the host computer. Once the Windows Sandbox is enabled/installed, it will occupy only about 100MB of your disk space. That’s why they call it a “lightweight” virtual machine as the majority of the files in the package are immutable, which only are the links to the existing files on the host operating system.

Windows Sandbox Dynamic Base Package

Dynamically generated operating system image with clean copies of mutable files which can change, and links to immutable files that already exist on the host operating system cannot be changed.

Windows Sandbox is integrated with the Windows Kernel. The virtualization uses the Microsoft’s hypervisor to run a separate kernel that isolates the Windows Sandbox from the host. It also uses “integrated kernel scheduler, smart memory management, and virtual GPU.” However, the host system is always in charge and reclaim memory from the Sandbox whenever needed.

Windows Sandbox will also be using the same physical memory pages, that is to use same executable pages on the Sandbox as that on the host securely where no secrets will be shared.

Windows Sandbox Direct Map

Direct Map (right), using host’s physical memory on the guest/sandbox, unlike Traditional VM (left)

Windows Insiders will be able to start testing Windows Sandbox they have installed Insider Preview Build 18305. You can find more technical details of Microsoft’s Windows Sandbox at company’s blog post in Tech Community.

In fact, virtual machines have always been a friendly tool for developers to test their own programs in multiple environments/platforms. Though it will not be as as useful for developers because it will only run an image of the host operating system. They won’t be able to setup their desired platforms or different guest operating systems.

Windows Sandbox Prerequisites/Requirements

  • Windows 10 Pro or Enterprise Insider build 18305 or later
  • AMD64 architecture
  • Virtualization capabilities enabled in BIOS
  • 8GB RAM recommended (4GB minimum)
  • 1 GB of free disk space minimum (SSD recommended)
  • 4 cores with hyperthreading recommended (2 CPU cores minimum)