Categories: Kali Linux

UploadScanner : HTTP file upload scanner for Burp Proxy

UploadScanner is a Burp Suite Pro extension to do security tests for HTTP file uploads. Testing web applications is a standard task for every security analyst. Various automated and semi-automated security testing tools exist to simplify the task. HTTP based file uploads are one specialised use case.

However, most automated web application security scanners are not adapting their attacks when encountering file uploads and are therefore likely to miss vulnerabilities related to file upload functionalities.

While a lot of techniques used for file upload testing are documented throughout the web, the code necessary to automate such attacks is often missing. In other cases, the techniques only apply to very specific use cases. One of the goals of this research was to generalise and automate these attacks.

The attack techniques include generic attacks such as Cross Site Scripting (XSS), External Entity Injection (XXE) and PHP/JSP/ASP code injection, but the goal is to execute these attacks customised for the use case of HTTP based file uploads. Additionally, more specific attacks on server side parsers are used as an attack vector, for example Server Side Request Forgery (SSRF) through m3u8 playlist file formats being parsed with LibAv.

File uploads on websites are an underestimated area for security testing. The attack surface on a server that parses files is automatically a lot bigger. While some of the issues that might occur get very high attention (eg. the ImageTragick vulnerability), there are countless memory corruption bugs that get fixed every day in various parses that might also be in use on your webserver.

Also Read Darling – Darwin/Mac OS Emulation Layer For Linux

And while your REST XML web service might not be vulnerable to XML External Entity (XXE) injection, it doesn’t mean your image parser for JPEG XMP metadata (which is XML) has no XXE issue. Various techniques are necessary to successfully upload a file, including correlation of file extensions, content types, and content.

Moreover, the file content has to pass server-side checks or modifications such as image size requirements or resizing operations. Circumventing processing on the server side, creating content that survives the modification or creating content that results in the desired payload after the modification is another goal of this extension.

While there are already a couple of Burp extensions doing some checks, this extension tries to implements most attacks that seem feasible for file uploads. The extension is testing various attacks and is divided into modules. Each module handles several attacks of the same category.

UploadScanner Feature

While the extension has various interesting features in its various modules, one of the main features is:

  1. Taking a small gif, png, jpeg, tiff, pdf, zip and mp4 file
  2. If it’s an image, resize the image (sizes are UI options)
  3. If it’s an image, give it a random new color
  4. If the file format supports it, use the exiftool file format meta data techniques “keywords”, “comment”, “iptc:keywords”, “xmp:keywords”, “exif:ImageDescription” and “ThumbnailImage” …
  5. Inject PHP, JSP, ASP, XXE, SSRF, XXS and SSI payloads …
  6. Upload with various combinations of file extensions and content-types …
  7. Detect issues via sleep based payloads, Burp Collaborator interactions or by downloading the file again

After installing the extension, check the Global & Active Scanning configuration tab of the extension. If a field is marked red, there is an error.

Credit : Tobias “floyd” Ospelt, @floyd_ch

R K

Recent Posts

rmmod Command in Linux: Remove Kernel Modules and Blacklisting

The rmmod command in Linux removes a loaded module from the running kernel. Because the kernel has…

18 hours ago

free Command in Linux: Check Memory Usage and Interpret Output

The free command in Linux gives you a quick summary of RAM and swap usage. It reads…

18 hours ago

diff Command in Linux: Compare Files and Create Patches

The diff command in Linux compares two text files line by line and shows the lines that…

18 hours ago

Flush DNS Cache on Windows, Linux, and macOS: Quick Commands

DNS cache is a temporary database your OS and browser build as you browse. Each time you visit a website, the domain-to-IP mapping is saved locally, cutting out the round trip to a remote DNS server on repeat visits. Stale entries are the most common reason to flush the DNS cache: a server moves to a new IP, but your OS or browser still routes to the old address. This guide covers how to clear the DNS cache on Windows, Linux, and macOS, and how to flush the separate cache stored inside Chrome and Firefox. Flush DNS Cache on Windows The command is the same on Windows 10, Windows 11, and earlier supported releases. Open Command Prompt with administrator privileges. Type cmd in the Windows search bar, right-click Command Prompt, and select Run as…

18 hours ago

Change User Password in Ubuntu: Command Line and GNOME GUI

Using a strong, unique password for every account is one of the most effective security…

2 days ago

Enable and Disable the Root Account in Ubuntu: Full Guide

Ubuntu locks the root account by default. New users often wonder what the root password…

2 days ago