Description
A bug exists in the polkit pkexec binary in how it processes arguments. If the binary is provided with no arguments, it will continue to process environment variables as argument variables, but without any security checking. By using the execve call we can specify a null argument list and populate the proper environment variables. This exploit is architecture independent.
Module options
To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':
msf > use exploit/linux/local/cve_2021_4034_pwnkit_lpe_pkexecmsf undefined(cve_2021_4034_pwnkit_lpe_pkexec) > show actions ...actions...msf undefined(cve_2021_4034_pwnkit_lpe_pkexec) > set ACTION < action-name >msf undefined(cve_2021_4034_pwnkit_lpe_pkexec) > show options ...show and set options...msf undefined(cve_2021_4034_pwnkit_lpe_pkexec) > runPrioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub