verlass / google-security-research

Automatically exported from code.google.com/p/google-security-research
0 stars 0 forks source link

Cisco AnyConnect Secure Mobility Client v3.1.08009 Elevation of Privilege #460

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Cisco AnyConnect Secure Mobility Client v3.1.08009 Elevation of Privilege
Platform: Windows 8.1 Update, Client version 3.1.08009 (tested on 32 bit only)
Class: Elevation of Privilege

Summary:
The fix for CVE-2015-4211 is insufficient which allows a local application to 
elevate to local system through the CMainThread::launchDownloader command. 

Description:

This is directly related to 
http://tools.cisco.com/security/center/viewAlert.x?alertId=39466. The fix for 
this issue seemed to be modifying the file verification process to only allow a 
signed file which also has in its version information the original filename of 
vpndownloader.exe. This, along with the name change makes it clear you only 
want to execute the VPN Downloader application. However the code doesn’t 
limit the location of the executable file, so one exploitation vector is DLL 
planting. The downloader loads a lot of DLLs from the executable directory 
first, so by copying the vpndownloader.exe file from Program Files to a 
temporary directory and dropping an appropriately named DLL you can get code 
execution as SYSTEM. One such DLL is dbghelp.dll which is loaded explicitly by 
the downloader using LoadLibrary, but there are many more.

Even if by luck the executable wasn’t vulnerable to DLL planting there’s 
many other potential issues, for example even though a lock is made on the 
executable file during signature verification it’s possible to use symbolic 
links to exploit this as a race condition and switch the executable file after 
verification has completed. There’s many other possibilities as well. I’d 
recommend that if you’re really only supposed to be executing vpndownloader 
you only execute it from the secure program files directory which would 
eliminate this issue. 

This was based on work previous done by Kostya Kortchinsky. 

Proof of Concept:

The PoC demonstrates the vulnerability and should create a copy of CMD.EXE 
running at SYSTEM on the current user’s desktop. I’ve provided source for 
the exploit.exe written in C# 4 and the dbghelp.dll in C++, as well as 
binaries. It should run on 32 and 64 bit platforms but I’ve only tested it on 
32 bit.  

1) Copy the exploit.exe and dbghelp.dll  to a location on a local hard disk 
which the current user can write to.
2) Execute exploit.exe as the normal user
3) A command prompt should appear running at SYSTEM

Expected Result:
The service rejects the executable request

Observed Result:
The service executes the file from the temporary directory and allows for 
elevation.

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.

Original issue reported on code.google.com by fors...@google.com on 24 Jun 2015 at 2:00

Attachments:

GoogleCodeExporter commented 9 years ago
Assigned PSIRT-1704595726 and Bug CSCuv01279

Original comment by fors...@google.com on 24 Jun 2015 at 4:38

GoogleCodeExporter commented 9 years ago

Original comment by scvi...@google.com on 25 Jun 2015 at 2:36

GoogleCodeExporter commented 9 years ago
Cisco originally aimed to get the release of the patch for the 22nd September, 
however due to testing issues this has been postponed until the 29th which 
would fall outside of the 90 day disclosure window. Cisco were informed that a 
grace period exists for this exact situation and they could use it if they 
requested. However in this case Cisco has declined to use the grace period.

Original comment by fors...@google.com on 22 Sep 2015 at 7:53

GoogleCodeExporter commented 9 years ago
Cisco have posted the security alert at 
http://tools.cisco.com/security/center/viewAlert.x?alertId=41136 even though 
there's no patch currently available. Cisco indicated that a patch might be 
forthcoming on the 29th September 2015. 

As this has now exceeded the deadline and has been publicly disclosed view 
restriction has been removed.

Original comment by fors...@google.com on 22 Sep 2015 at 4:43

GoogleCodeExporter commented 9 years ago
Fixed in version 4.1.2 of the AnyConnect client.

Original comment by fors...@google.com on 5 Oct 2015 at 3:28