Skip to content
RCE Disclosed report Intermediate CVE-2017-7755

DLL Hijacking Firefox installer

The Firefox installer loads a DLL named BCRYPT.dll from the same directory as the installer executable. An attacker who places a malicious BCRYPT.dll in the user's Downloads folder alongside the installer can achieve arbitrary code execution with the installer's privileges.

Yuji Tounai Follow

Originally disclosed on Mozilla

  • Fixed in 17 days
  • Paid in 41 days
  • Disclosed after 17 days
Text
Created attachment 8863692
dll.zip

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36

Steps to reproduce:

1.Create a malicious BCRYPT.dll file and save it in your "Downloads" directory.
2.Download 'Firefox Setup Stub 53.0.exe' and save it in your "Downloads" directory.
3.Execute 'Firefox Setup Stub 53.0.exe' from your "Downloads" directory.
4.Malicious dll file gets executed.



Actual results:

trojan DLL loads cmd.exe and alert the dialog 


Expected results:

DLL file on a Windows computer is placed in the default downloads directory with the Firefox installer, the Firefox installer will load this DLL when it is launched. In circumstances where the installer is run by an administrator privileged account, this allows for the downloaded DLL file to be run with administrator privileges. This can lead to arbitrary code execution from a privileged account.

The original report as published on Mozilla's Bugzilla, by Yuji Tounai. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

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

This allows arbitrary code execution with the privileges of the user running the installer, which could be administrator.

What the attacker needed

Attacker can place a file in the Downloads folder; victim runs the installer from that folder

How it was found

  1. Create a malicious BCRYPT.dll file and save it in your Downloads directory.
  2. Download 'Firefox Setup Stub 53.0.exe' and save it in your Downloads directory.
  3. Execute 'Firefox Setup Stub 53.0.exe' from your Downloads directory.
  4. Malicious dll file gets executed.

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 needs extra code from files called DLLs. Windows looks for these DLLs in several places, including the folder where the program was started. Here, the Firefox installer looked for a DLL in the Downloads folder, so an attacker could put a fake DLL there and have it run automatically.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More from Mozilla

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.