Cyber security

CVE-2023-36723 – Windows Sandbox Directory Creation Vulnerability

This is PoC for arbitrary directory creation bug in Container Manager service.

This PoC is not thoroughly tested so it may not even work most of the time (it was enough for msrc to confirm vulnerability).

In order to exploit this vulnerability a Windows Sandbox feature have to be installed on windows host. When Windows Sandbox feature is installed a set of directories will be created in c:\programdata directory.

One of those directories is C:\ProgramData\Microsoft\Windows\Containers\BaseImages\<GUID>\BaseLayer. This directory is different as it gives authenticated users group modify permissions on all child objects.

If BaseLayer directory is empty or some of directories inside it are removed, next time when Windows sandbox is started, a process cmimageworker.exe will recreate those directories/files without checking for symbolic links and set DACL that allows authenticated users to modify them.

I have create PoC that will abuse this vulnerability to create directory pwn with permissive DACL’s inside c:\windows\system32 directory as show below:

An attacker can abuse this vulnerability to execute code in process that is running with SYSTEM privileges by abusing SxS assembly loading.

Varshini

Varshini is a Cyber Security expert in Threat Analysis, Vulnerability Assessment, and Research. Passionate about staying ahead of emerging Threats and Technologies.

Recent Posts

ROADTools: The Modern Azure AD Exploration Framework

ROADTools is a powerful framework designed for exploring and interacting with Microsoft Azure Active Directory…

20 hours ago

How to Enumerate Microsoft 365 Groups Using PowerShell and Python

Microsoft 365 Groups (also known as M365 Groups or Unified Groups) are at the heart…

21 hours ago

SeamlessPass: Using Kerberos Tickets to Access Microsoft 365

SeamlessPass is a specialized tool designed to leverage on-premises Active Directory Kerberos tickets to obtain…

2 days ago

PPLBlade: Advanced Memory Dumping and Obfuscation Tool

PPLBlade is a powerful Protected Process Dumper designed to capture memory from target processes, hide…

2 days ago

HikPwn : Simple Scanner For Hikvision Devices With Basic Vulnerability Scanning

HikPwn: Comprehensive Guide to Scanning Hikvision Devices for Vulnerabilities If you’re searching for an efficient…

3 days ago

Comments in Bash Scripts

What Are Bash Comments? Comments in Bash scripts, are notes in your code that the…

1 week ago