Skip to content
← RegistryDossier · 5 steps · 4 edges

polkit pwnkit (CVE-2021-4034) → instant root

Pre-2022 pkexec has a heap-overflow exploitable with no special permissions. Compile / drop the exploit, run as low-priv user, gain root.

Filed by AD Knowledge Base
§ Kill-chainDrag · zoom · scroll

§ Context

Assumed environment: foothold on a Linux host. polkit / policykit-1 not patched (Ubuntu < 18.04.6, CentOS 7.9, etc.). Compilers or a precompiled binary available.

§ Steps

  1. 01
    Low-priv shellInitial Access
    T1078Valid Accounts
  2. 02
    Compile / drop exploitExecution
    T1059Command and Scripting Interpreter
  3. 03
    Check pkexec / polkit versionDiscovery
    T1518Software Discovery
  4. 04
    Run pwnkit → root shellPrivilege Escalation
    L-POLKIT-PWNKITpolkit pwnkit (CVE-2021-4034)
  5. 05
    SSH key + cronPersistence
    L-SSH-AUTHKEYSSSH authorized_keys Backdoor

§ References

§ Frequently asked

What is the "polkit pwnkit (CVE-2021-4034) → instant root" attack path?
Pre-2022 pkexec has a heap-overflow exploitable with no special permissions. Compile / drop the exploit, run as low-priv user, gain root. It chains 5 steps drawn from real-world offensive-security techniques.
What starting position does this attack require?
The first step is Low-priv shell (T1078) — a initial access primitive. Assumed environment: foothold on a Linux host.
What is the final impact of this kill-chain?
The final step lands on SSH key + cron (L-SSH-AUTHKEYS), which falls under Persistence. From here, an operator typically pivots into post-exploitation or maintains persistence.
How can defenders detect or prevent this attack?
Detection and prevention vary per step. Refer to each linked MITRE ATT&CK entry under "References" — every technique on that page lists defensive controls, detection telemetry, and known threat-actor usage.

§ Related dossiers