Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2021-4034-pwnkit — PoC educacional do CVE-2021-4034, o PwnKit, LPE via pkexec do polkit. Uso autorizado apenas. | Kitploit
Tools/GitHubGitHub/mac3d0/cve-2021-4034-pwnkit
Privilege EscalationVulnerability AnalysisExploitationPenetration TestingLearning & EducationBinary Exploitation
GitHubmac3d0/cve-2021-4034-pwnkit

CVE-2021-4034-pwnkit

PoC educacional do CVE-2021-4034, o PwnKit, LPE via pkexec do polkit. Uso autorizado apenas.

View Repository
294 months agoNot yet reviewed
Share

CVE-2021-4034, PwnKit

Proof of concept for PwnKit, a local privilege escalation in polkit's pkexec. On a default install any unprivileged local user can become root.

About the bug

Vulnerable versions of pkexec mishandle the process argument count. That lets controlled environment variables get reintroduced into pkexec's environment, which ends up running an attacker controlled shared object as root. It was disclosed on 25 January 2022 by the Qualys Research Team and scores 7.8 high on CVSS v3.1. The NVD entry is CVE-2021-4034.

Practically every polkit release since 2009 was affected until the coordinated fix. Distributions shipped patched packages on or after the disclosure date, so keep your vendor updates current.

Why this repo exists

This is an educational reference for a well documented, publicly disclosed vulnerability. I use it to study the pkexec argument handling flaw, to validate patch status in authorized labs and assessments, and to keep detection and remediation notes.

Build and run

Only run this on systems you own or are authorized to test.

gcc cve-2021-4034-poc.c -o cve-2021-4034-poc
./cve-2021-4034-poc

On a vulnerable host it drops you into a root shell. Verified against Debian 10 buster and CentOS 7.

Remediation

Patch polkit and pkexec to your distribution's fixed release. If you cannot patch right away, remove the SUID bit with chmod 0755 on the pkexec binary, accepting that you lose pkexec privilege delegation. For detection, alert on pkexec runs with an empty argv or with an odd environment such as GCONV_PATH, CHARSET or SHELL right before a root shell shows up.

Credits

The vulnerability was found and responsibly disclosed by the Qualys Research Team.

oss-security advisory: https://seclists.org/oss-sec/2022/q1/80

Qualys write up: https://blog.qualys.com/vulnerabilities-threat-research/2022/01/25/pwnkit-local-privilege-escalation-vulnerability-discovered-in-polkits-pkexec-cve-2021-4034

Legal and ethical use

This code is published only for study and authorized security testing. Running it against systems you do not own or have written permission to test is illegal and can carry criminal and civil liability. Use it in your own labs or under a signed engagement scope. You are responsible for what you do with it.

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    614
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    476
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    389
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    334
  • 5

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    257
  • 6

    antifox

    antifox-ai/antifox

    AI multi-agent autonomous penetration testing platform that runs recon, attack-surface discovery, exploitation validation and evidence-backed report delivery.

    247

Explore all tools

Browse our collection of tools

View all tools →