Polkit Local Privilege Escalation Vulnerability (CVE-2021-4034)


Description

This rule detects attempts to exploit a privilege escalation vulnerability in Polkit's pkexec. Through the execution of specially crafted code, a local user can exploit this weakness to attain root privileges on a compromised system. This rule is highly specific in its scope.

Query · falco

spawned_process and user.loginuid != 0 and proc.name=pkexec and proc.args = ''

Rule dependencies

Depends on

  • composes · Falco macro spawned_process
    A shared condition, not a detection — not indexed on this site.

Analyst notes

Detect Polkit pkexec Local Privilege Escalation Exploit (CVE-2021-4034) | args=%proc.args evt_type=%evt.type user=%user.name user_uid=%user.uid user_loginuid=%user.loginuid process=%proc.name proc_exepath=%proc.exepath parent=%proc.pname command=%proc.cmdline terminal=%proc.tty exe_flags=%evt.arg.flags

Raw source Polkit Local Privilege Escalation Vulnerability (CVE-2021-4034) · Falco YAML
Esc
Published by falcosecurity/rules ↗, licensed under Apache 2.0 ↗. Reproduced here unmodified.
rule: Polkit Local Privilege Escalation Vulnerability (CVE-2021-4034)
desc: 'This rule detects attempts to exploit a privilege escalation vulnerability
  in Polkit''s pkexec. Through the execution of specially crafted code, a local user
  can exploit this weakness to attain root privileges on a compromised system. This
  rule is highly specific in its scope.

  '
condition: spawned_process and user.loginuid != 0 and proc.name=pkexec and proc.args
  = ''
output: Detect Polkit pkexec Local Privilege Escalation Exploit (CVE-2021-4034) |
  args=%proc.args evt_type=%evt.type user=%user.name user_uid=%user.uid user_loginuid=%user.loginuid
  process=%proc.name proc_exepath=%proc.exepath parent=%proc.pname command=%proc.cmdline
  terminal=%proc.tty exe_flags=%evt.arg.flags
priority: CRITICAL
tags:
- maturity_sandbox
- host
- container
- process
- users
- mitre_privilege_escalation
- TA0004

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.