Trustwave Rapid Response: CrowdStrike Falcon Outage Update. Learn More

Trustwave Rapid Response: CrowdStrike Falcon Outage Update. Learn More

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.

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
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

Trustwave Threat Hunting Guide: Identifying PwnKit (CVE-2021-4034) Exploitation

The Trustwave Threat Hunting team has authored a practical guide to help the cybersecurity community address the Linux “polkit” Local Privilege Escalation vulnerability (CVE-2021-4034) by identifying common behavior in exploitation.


On January 25, 2022, Qualys released a research blog detailing a critical vulnerability (aka PwnKit) in the “polkit” component available by default in almost all Linux distributions. At the time of this writing, the Trustwave Threat Hunt team has not witnessed any attacks in the wild using this Local Privilege Escalation.

Our team of threat hunters leveraged the Endpoint Detection and Response (EDR) API across our advanced tier client environment to determine if there was activity from non-root users accessing the ‘gconv-module’ file. This action can also be performed via a normal EDR query or a File Integrity Monitor. If there are findings where non-root users are seen modifying or acting on this file, the following techniques can be used to determine if it is malicious activity indicative of PwnKit exploitation.

How to investigate the results

  1. Check the timeline of events up to two minutes before the file access or modification for any curl/wget execution.
  2. Check the timeline of events up to two minutes before the file access or modification for any shellcode execution, similar to the below:


  1. Check the timeline of events up to one minute before the file access or modification for any compilation like this in command line:

            sh -c gcc -o -shared -fPIC payload.c

  1. Check for username after the event file write/create "gconv-modules". If it is ROOT, then this may be indicative of malicious privilege escalation events.

How the exploit works and how to verify

  1. The exploit will create two folders under the current directory; the folder name can be any random name and "GCONV_PATH="
  2. The two folders will have an exploit attempt file, which can be any random name.
  3. Once the setup is done, the exploitation starts by executing "/usr/bin/pkexec" as ROOT user permission.
  4. You can observe the remaining process will be under ROOT user. This is where the adversary is executing the commands by obtaining ROOT user-level permission.


Although Local Privilege Escalation vulnerabilities require access to the vulnerable system, do not discount this vulnerability. When paired with any simple Remote Code Execution (RCE) vulnerability, this becomes a part of a critical attack chain. Given the massive attack surface that affects most every Linux distribution, this vulnerability will have legs that make it a threat well into 2022.

For more information about PwnKit (CVE-2021-4034), please refer to our Action Response.

Not every organization has the resources or expertise to perform Threat Hunting. Trustwave offers Threat Hunting services that combine human experts and automated processes to bring you purpose-built threat hunting capabilities that help you stay ahead of advanced adversaries.

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