Bill’s Steak House (RCE) (WebVerse-pro.com)
The review upload feature only checked file types on the client side, so an attacker could upload a .phtml file containing a web shell. Visiting that file executed commands on the server, allowing the attacker to read the flag file.
medium.com
Published on medium.com
Lab can be found at: https://webverselabs-pro.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 server trusted the client-side file type check and allowed executable file extensions such as .phtml to be uploaded and served.
Impact
An attacker could execute arbitrary code on the server and read sensitive files such as the flag.
What the attacker needed
Access to the review upload feature; ability to intercept HTTP requests
The fix
The server should validate file types and extensions on the server side and prevent executable files from being uploaded or served.
How it was found
- Go to the reviews section of Bill’s Steak House.
- Capture the file upload request in Burp Suite.
- Bypass the client-side file type check and upload a .phtml web shell.
- Visit the uploaded file at /uploads/terminal.phtml to execute commands.
- Read the flag from /home/billy/flag.txt.
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 website let people upload files for reviews but only checked the file type in the browser, not on the server. By intercepting the upload request, the author changed the file to a type the server would run as code. That let them run commands on the server and read a secret file.
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.