Skip to content
RCE Write-up Advanced

️ WAF? LOL: How Burp Collaborator Helped Me Sneak a Shell Throu

A file upload endpoint was vulnerable to command injection, and the WAF could be bypassed by spoofing a localhost IP header. The attacker then used SSRF to reach an unauthenticated Redis instance and wrote a cron job to obtain a reverse shell.

iski Follow

Published on infosecwriteups.com

Free Link🎈

Iski, on infosecwriteups.com

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

Impact

An attacker could execute arbitrary commands on the server and gain a reverse shell, potentially leading to full system compromise.

What the attacker needed

Access to the upload endpoint; ability to send custom headers; internal Redis service unauthenticated

How it was found

  1. Send a request to the upload endpoint with an X-Forwarded-For header set to [redacted] to bypass the WAF.
  2. Inject a command that causes the server to perform a DNS lookup to a Burp Collaborator domain, confirming command injection.
  3. Use the SSRF vulnerability in the url parameter to send a gopher request to the local Redis service.
  4. Use Redis CONFIG SET to change the directory and dbfilename to write a cron job or SSH key.
  5. Save the payload to write the file, leading to a reverse 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.

The web application firewall (WAF) is a security guard that blocks suspicious requests. The attacker tricked it by claiming the request came from the same computer (localhost), so the guard let it through. Then they found a way to make the server run commands and connect back to them, giving them control.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by iski

View all

186 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.