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.
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
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
- Turn on Burp Proxy intercept and submit a test feedback message to capture the request.
- Copy the unique Burp Collaborator subdomain from the Collaborator client.
- 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.
- Poll the Collaborator client to see the DNS interaction containing the username.
- 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.