Escalating Privileges and Bypassing Imunify360: A Journey from RC
The report describes bypassing the Imunify360 WAF to upload a PHP web shell by using a remote file inclusion technique, then exploiting a kernel vulnerability to gain root access. The attacker could execute commands on the server and escalate privileges.
In today’s presentation, I will outline the steps I took to bypass the Imunify360 Web Application Firewall (WAF) on my target, enabling me to upload a web shell. Additionally, I will detail how I leveraged a vulnerability in the “kernel” to gain root access to the server.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the upload endpoint only checked the file extension and Content-Type, and the WAF failed to detect a remote file inclusion payload that fetched and executed code from an external URL.
Impact
The attacker could execute arbitrary commands on the server and escalate privileges to root, potentially leading to full server compromise.
What the attacker needed
Target with file upload; WAF present; attacker-controlled server
How it was found
- Upload a normal image file with a PHP test code injected using Burp.
- Observe that the WAF deletes system() and eval() code, so build a custom backdoor that fetches code from a remote URL.
- Upload the backdoor file with a .phtml extension.
- Access the uploaded file with a URL parameter pointing to the remote shell code to execute commands.
- Check the kernel version using uname -a.
- Download and run a kernel exploit to escalate privileges to root.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A web application firewall (WAF) is a security tool that inspects web traffic and blocks malicious requests. The author found a way to sneak a harmful file past this filter by hiding it inside an image and then using a trick to run code from another server. After getting a foothold, they used a known flaw in the server's operating system to become the all-powerful administrator (root).
What is File upload?
An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.