Enterprise endpoints face constant exposure to weaponized phishing campaigns, malicious PDF attachments, and zero-day browser exploits. Windows Defender Application Guard (WDAG) leverages hardware virtualization (Hyper-V micro-VMs) to isolate untrusted web browsing and Microsoft Office document editing inside hardware-rooted containers. Because Windows Sandbox shares the same lightweight container architecture as WDAG, security engineers can author custom .wsb XML configurations to simulate WDAG isolation policies, test Credential Guard barriers, and audit clipboard isolation boundaries in Windows 11.
Understanding WDAG Container Isolation Boundaries
Application Guard containers enforce strict enterprise security policies:
- Micro-VM Hypervisor Isolation: The container runs a separate copy of the Windows operating system kernel inside a dedicated Hyper-V partition, completely isolated from host memory and storage.
- Clipboard & File Boundaries: Administrators can control whether text and images can be copied into or out of the container (
<ClipboardRedirection>). - Credential Isolation: Enterprise domain credentials and Kerberos tickets are completely isolated from container processes, preventing rogue scripts from harvesting user identity.
Authoring the WDAG Container Hardening Script
Create a dedicated host folder (e.g. C:\SandboxWDAG) and save a PowerShell provisioning script named InitWDAG.ps1:
# InitWDAG.ps1 - Configure WDAG simulation and clipboard restrictions inside Windows Sandbox
Write-Host "Configuring WDAG container simulation boundaries..." -ForegroundColor Cyan
# 1. Enforce AppGuard Enterprise Isolation Registry Keys
$appGuardPath = "HKLM:SOFTWAREMicrosoftHvsi"
if (-not (Test-Path $appGuardPath)) { New-Item -Path $appGuardPath -Force | Out-Null }
Set-ItemProperty -Path $appGuardPath -Name "BlockNonEnterpriseContent" -Value 1 -Type DWord
Set-ItemProperty -Path $appGuardPath -Name "AllowCameraMicrophoneRedirection" -Value 0 -Type DWord
Write-Host "Hardware container device redirection restricted." -ForegroundColor Green
# 2. Block Local Intranet Traversal from Untrusted Sandbox Session
$lsaPath = "HKLM:SYSTEMCurrentControlSetControlLsa"
Set-ItemProperty -Path $lsaPath -Name "DisableDomainCreds" -Value 1 -Type DWord
Write-Host "Domain credential exposure disabled inside container." -ForegroundColor Green
Write-Host "WDAG isolation simulation ready." -ForegroundColor Green
Constructing the WSB Configuration File
Create an XML configuration file named WdagSandbox.wsb on your desktop:
<Configuration>
<VGpu>Enable</VGpu>
<Networking>Default</Networking>
<MemoryInMB>6144</MemoryInMB>
<ClipboardRedirection>Disable</ClipboardRedirection>
<MappedFolders>
<MappedFolder>
<HostFolder>C:SandboxWDAG</HostFolder>
<SandboxFolder>C:WDAGConfig</SandboxFolder>
<ReadOnly>true</ReadOnly>
</MappedFolder>
</MappedFolders>
<LogonCommand>
<Command>powershell.exe -ExecutionPolicy Bypass -File C:WDAGConfigInitWDAG.ps1</Command>
</LogonCommand>
</Configuration>
Verifying Isolation Boundaries Inside the Sandbox
To confirm that WDAG container protections are actively enforced:
- Double-click
WdagSandbox.wsbto boot the virtual container. - The PowerShell window executes and applies the isolation configuration.
- Copy text on your physical Windows 11 host machine. Attempt to paste it into Notepad inside the sandbox session.
- Verify that paste operations fail, confirming that
<ClipboardRedirection>Disable</ClipboardRedirection>prevents unauthorized data exchange between host and container. - Open Microsoft Edge inside the sandbox and attempt to navigate to local host network shares or intranet IPs. Confirm that credential isolation blocks access to corporate single sign-on resources.