New issue
Advanced search Search tips
Starred by 2 users
Status: Fixed
Owner:
Closed: Jan 2015
Cc:



Sign in to add a comment
Windows: Impersonation Check Bypass with MRXDAV
Project Member Reported by forshaw@google.com, Oct 24 2014 Back to list
Title: Windows: Impersonation Check Bypass with MRXDAV
Platform: Windows 7, 8.1 Update 32/64 bit
Class: Security Bypass

The implementation of WebDAV consists of two parts, a user-mode service which implements the majority of the functionality and a kernel mode driver which acts to interface with the redirector driver. The driver and user-mode devices communicate using FS/Device control codes.

There's a bug in the way that the driver verifies that the caller has sufficient permissions to communicate with the driver. It performs effectively:

LUID luid;
SeCaptureSubjectContext(&ctx)
SeQueryAuthenticationId(SeQuerySubjectContextToken(&ctx), &luid);
if(luid == LocalSystemLUID)
{
   local_system = true;
}

The code makes no verification that the caller isn't impersonating local system at identification level. This allows a normal user to capture a system token and (from what I can tell) pretend to be the WebClient service, which might lead to a significant amount of unexpected behaviour such as implementing custom filesystem semantics.

Attached is a simple PoC which demonstrates the issue. It sends the control code 0x140394 to the webdav redirector driver. To reproduce follow the steps.

1) Ensure the WebClient service and MRXDAV.SYS drivers are running. This can be achieved through manual starting or navigating to a webdav share such as \\live.sysinternals.com\tools. 
2) Execute TestWebDAV.exe from the command line as a normal, non-admin user
3) The program should print, "Sent request, should have got access denied" if it succeeded. 

Expected result: 
The DeviceIoControl should fail with ERROR_ACCESS_DENIED

Observed result:
The DeviceIoControl succeeds 

This bug is subject to a 90 day disclosure deadline. If 90 days elapse
without a broadly available patch, then the bug report will automatically
become visible to the public.

 
Poc_TestWebDav.zip
59.8 KB Download
Project Member Comment 1 by forshaw@google.com, Oct 24 2014
Labels: MSRC-20915
Project Member Comment 2 by forshaw@google.com, Nov 28 2014
Owner: forshaw@google.com
Project Member Comment 3 by forshaw@google.com, Dec 2 2014
Labels: -Product-Windows Product-Windows-Kernel
Project Member Comment 4 by forshaw@google.com, Jan 13 2015
Correspondance Date: 29 Oct 2014

< Microsoft informs us that they've reproduced the issue and it seems likely that's it will be a bulletin class issue but they state that they will get back to us with confirmation soon soon. 
Project Member Comment 5 by forshaw@google.com, Jan 13 2015
Labels: CVE-2015-0011
Fixed in https://technet.microsoft.com/en-us/library/security/ms15-008.aspx
Project Member Comment 6 by forshaw@google.com, Jan 16 2015
Status: Fixed
Project Member Comment 7 by forshaw@google.com, Jan 20 2015
Labels: -Restrict-View-Commit
Removing view restriction.
Sign in to add a comment