Trustwave and Cybereason Merge to Form Global MDR Powerhouse for Unparalleled Cybersecurity Value. Learn More

Trustwave and Cybereason Merge to Form Global MDR Powerhouse for Unparalleled Cybersecurity Value. 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

CrypKey License Service Allows Privilege Escalation

Overview

CrypKey (https://www.crypkey.com/) is a third-party licensing service for Windows that integrates with existing software packages to prevent piracy and illegal duplication of software and data. I discovered that this service was installed on my system and decided to investigate it a little deeper. What I found was a trivial Privilege Escalation vulnerability and despite multiple attempts to get the vendor to patch the issue, a patch is still unavailable at the time of publication.

Attack Details

While reviewing the installed services on a Windows machine one day, I found an interesting service that runs as LocalSystem:

Image001

 

Examining filesystem activity on startup reveals access to publicly writable location:

Image002

 

The service is failing to open a file, which seems to be some configuration based on the extension.

Since the C:\ProgramData location allows any users to write to it, any unprivileged authenticated user can just create CrypKey directory and file CKCS.INI in it with the following content:

[..\\TEMP\\M.]

Once the service is restarted (for example, after the computer is rebooted), the following file access attempt will be made:

 

Now that we know what the service is looking for, let’s make it happy and add that file with the following content (again, no privileges required since the location is TEMP under WINDOWS):

[GENERAL]
STATUS=Enabled

Now, after another service restart, it will try to load a library:

Image004

 

With this, we now know exactly what library the service is looking for. All the attacker needs to do now is add a DLL called CKConfig.DLL under C:\WINDOWS\TEMP and it will be loaded, and its startup code executed as LOCALSYSTEM.

Summary

This flaw allows privilege escalation from any regular user to LOCALSYSTEM. It requires no special tools, only a text editor to modify two configuration files and any malware masked as a DLL.

Mitigation

We initially reached out to CrypKey in June with multiple attempts to communicate the seriousness of this vulnerability. The only response we received from the vendor was that it was not interested in patching this issue and the organization gave no further explanation. Over a period of several months, Trustwave SpiderLabs attempted to convince the vendor that the issue is critical and impacted its user base. Unfortunately, the vendor did not see the importance of a patch, and we have been forced to release this advisory without an associated patch.

For user’s unable to uninstall this software, we recommend auditing any access to the configuration file: C:\ProgramData\CrypKey\CKCS.INI

Reference

TWSL2021-019: Privilege Escalation in CrypKey License Software Licensing System

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