You Don’t Need a 0-Day for RCE: A Real-World Kill Chain
The origin server behind Cloudflare was directly reachable, allowing the attacker to bypass the WAF. The avatar upload endpoint only checked the Content-Type header, so an ASPX web shell was uploaded and executed, leading to remote code execution.
infosecwriteups.com
Published on infosecwriteups.com
There is a pervasive myth in cybersecurity that achieving Remote Code Execution (RCE) on an enterprise target requires a sophisticated 0-day exploit or months of reverse engineering. In reality, some of the most devastating breaches happen through a simple chain of logical misconfigurations.
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 origin server was directly accessible from the internet and the file upload endpoint validated only the client-supplied Content-Type header, not the file extension or content.
Impact
An attacker could execute arbitrary commands on the server with application pool privileges, potentially reading configuration files, stealing user data, or pivoting into the internal network.
What the attacker needed
Authenticated user account; origin IP discoverable via OSINT; origin server directly reachable
The fix
The server should require authenticated origin pulls and firewall rules to only accept traffic from the WAF, and the upload endpoint should validate file extensions and content.
How it was found
- Find the origin IP using historical SSL certificate data from Censys.
- Verify the origin IP by sending a request with the original Host header and checking for a 200 response without Cloudflare headers.
- Configure Burp Suite to resolve the domain directly to the origin IP.
- Intercept the avatar upload request and change the file extension to .aspx while keeping Content-Type as image/png.
- Upload the file and access it via the public uploads directory to execute the web shell.
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 filter that blocks malicious requests before they reach the server. Here, the server itself was reachable directly, so the filter could be skipped. The upload feature trusted a label saying the file was an image, but the file was actually a script that the server ran.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.