Trustwave SpiderLabs Uncovers Ov3r_Stealer Malware Spread via Phishing and Facebook Advertising. Learn More

Trustwave SpiderLabs Uncovers Ov3r_Stealer Malware Spread via Phishing and Facebook Advertising. 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
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

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

Latest SpiderLabs Blogs

Ukrainian Intelligence Claims Successful Compromise of the Russian Ministry of Defense

On March 4, 2024, the Telegram channel of the Main Directorate of Intelligence of the Ministry of Defense of Ukraine (GUR) was updated with assertions that they executed a successful cyberattack...

Read More

Cost Management Tips for Cyber Admins

As anyone who has filled out an expense report can tell you, cost management is everyone's responsibility. Organizations must apply a careful balance of budget planning and expenditures that are in...

Read More

Resurgence of BlackCat Ransomware

Updated March 8: Based on our experience, we believe that BlackCat's claim of shutting down due to law enforcement pressure is a hoax. We anticipate their return under a new guise or brand after...

Read More