Disclaimer
Everything in this article is for educational purposes only. I do not promote any illegal activities. I am not responsible for any damage caused by the misuse of this information.
Recently, while working on a new HTB retired machine Unrested, I had to find a way to exploit some recently added CVEs of Zabbix. These included:
CVE-2024-36467 (missing access controls on the
user.update
function within theCUser
class) and CVE-2024-42327 (SQL injection in theuser.get
function in theCUser
class), which are leveraged to gain user access on the target.
The source code for such a complex system is huge, and it would take a very long time to figure out what exactly is exploitable. However, GitHub introduced their Copilot feature, integrated directly into the web client, allowing users to search for information within a repository. Such a heaven for hackers to find flaws in public source code, lol…
I replaced the placeholders and made a POST request based on their API documentation:
Some brief explanations:
userid
is my current user ID, which has restricted privileges."usrgrpid":"7"
is theZabbix administrators
group."usrgrpid":"13"
is theInternal
group.- The response indicates that the change was successful, adding the user to both unrestricted privilege groups.
You are my best friend now!