πŸ–₯️Pwnkit: CVE-2021-4034

Interactive lab for exploiting and remediating Pwnkit (CVE-2021-4034) in the Polkit package

https://tryhackme.com/room/pwnkitarrow-up-right
Room Attributes
Value

Subscription Required

False [Free]

Type

Walkthrough

Difficulty

Info

Tags

Polkit, Pwnkit, Linux, CVE-2021-4034

Task 1 - Info Introduction and Deploy!

Deploy the machine by clicking on the green "Deploy" button at the top of this task!

circle-check

Task 2 - Tutorial Background

Is Pwnkit exploitable remotely (Aye/Nay)?

chevron-rightReveal Flag 🚩hashtag

🚩Nay

In which Polkit utility does the Pwnkit vulnerability reside?

chevron-rightReveal Flag 🚩hashtag

🚩pkexec

Task 3 - Practical Exploitation

Read through the cve-2021-4034-poc.c file and try to understand how it works. See if you can match this up with the Qualys security advisoryarrow-up-right and the explanation given in the previous task!

circle-check

Exploit the vulnerability! What is the flag located at /root/flag.txt?

chevron-rightReveal Flag 🚩hashtag

🚩THM{CONGRATULATIONS-YOU-EXPLOITED-PWNKIT}

[Bonus Question β€” Optional] Using the Qualys advisoryarrow-up-right and the repositoryarrow-up-right linked in the task, try to write your own version of the Pwnkit exploit.

circle-check

Task 4 - Tutorial Remediations

Read the remediations task

circle-check

Patch the vulnerability on any Linux devices that you manage!

circle-check

Task 5 - Info Conclusion

I understand and can use Pwnkit!

circle-check

Last updated