Skip to content
File upload Write-up Beginner

Shell Upload In Web Server Through Burp Suite

The profile picture upload accepted a file whose extension was changed from .jpg to .php, and the uploaded PHP script could then be executed by visiting its URL. An attacker with an account could run code on the web server.

Sahil maan Follow

Published on systemweakness.com

Shell upload vulnerabilities allow an attacker to upload a malicious PHP file and execute it by accessing it via a web browser. The “shell” is a PHP script that allows the attacker to control the server .

Sahil maan, on systemweakness.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 upload feature trusted the client-supplied file extension and stored the file in a web-accessible location without validating or restricting executable types.

Impact

An attacker with an account could execute arbitrary code on the web server, potentially taking full control of it.

What the attacker needed

A user account on the site; ability to intercept HTTP requests

How it was found

  1. Log in to the site and go to the edit profile page.
  2. Intercept the profile picture upload request in Burp Suite.
  3. Change the uploaded file's extension from .jpg to .php.
  4. Submit the update so the profile is saved.
  5. Copy the image link from the profile page.
  6. Open the copied link in a new tab to execute the uploaded script.

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 a picture for their profile. The site checked the file only by its name, so the author used a tool to rename a picture file to a script file ending in .php. When the site saved it and the author opened the file's web address, the server ran the script, giving control of the server.

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.

Similar reports

View all

Same bug class and techniques, clearest first.

Unrestricted file upload

The lesson behind this report.

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.