Skip to content
RCE Write-up Intermediate

I PWNED A FEEDBACK FORM USING BLIND OS COMMAND INJECTION WITH DN

The feedback form passed user input to a shell command without sanitisation, allowing an attacker to run arbitrary commands on the server. Because the output was not shown, the attacker used a DNS lookup to exfiltrate the result of the whoami command.

Sumanth Yerranagula Follow

Published on medium.com

🎓 Lab from: PortSwigger Academy 🧠 Skill: Blind OS Command Injection + OAST (Out-of-Band App Security Testing) ⚔️ Target: Feedback form that silently executes shell commands

Sumanth Yerranagula, on medium.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

Root cause

Likely the application passed user-supplied input directly to a shell command without sanitisation or validation.

Impact

An attacker could execute arbitrary operating system commands on the server, and even without direct output, exfiltrate data via DNS.

What the attacker needed

Access to the feedback form; Burp Collaborator domain

How it was found

  1. Turn on Burp Proxy intercept and submit a test feedback message to capture the request.
  2. Copy the unique Burp Collaborator subdomain from the Collaborator client.
  3. Replace the email field with a payload that uses command separators and nslookup to send the output of whoami as a subdomain to the Collaborator domain.
  4. Poll the Collaborator client to see the DNS interaction containing the username.
  5. Submit the leaked username to complete the lab.

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 feedback form took what you typed and put it directly into a command that the computer runs. An attacker could add extra commands to that input, and even though the app didn't show the result, the attacker could make the server send a DNS request (like a phone book lookup) containing the result to a server they 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 Sumanth Yerranagula

View all

5 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.