Arbitrary file manipulation through updater.exe (Privilege Escalation)
Originally disclosed on Mozilla
- Fixed in 47 days
- Paid in 5 months
- Disclosed after 47 days
Created attachment 8626686
poc.zip
The updater.exe which is shipped with Firefox 38.0.5 opens the possibility for a local user to manipulate arbitrary files. That can be exploited for example with the maintenance service to run arbitrary executables files with the same privileges as the service.
The vulnerability exists in the process of executing a staged update. During this process the updated files are written to an user controlled working directory. Also temporary update files like *.patch files are written to this directory. As in Bug #925747 these files can be manipulated to change how files are updated, if the attacker sets the working directory path to a writeable location. Manipulations are limited to files in the working directory but with a junction it is possible to break out of the working directory and change arbitrary files. Different to hard links a standard windows user has the rights to create junctions (win7).
The poc needs firefox 38.0.5 (http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/38.0.5/win32/en-US/Firefox%20Setup%2038.0.5.exe) installed to "C:\Program Files (x86)\Mozilla Firefox", the maintenance service and ruby. I have tested the poc with win7 pro. The poc tries to execute a staged update with a junction-prepared working directory and manipulated .manifest and .patch files. For the manipulation the right timing is needed so the poc tries again if it fails. On my computer I need 3-20 tries. After the poc succeeded the content of the helper.exe in the firefox directory is replaced with the content of the standard cmd.exe of windows. And this replaced helper.exe is running in the background with system rights (after an update with the maintenance service the service executes the helper.exe if an updater.ini is present).
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is known
A high-severity access control bug in Application Update. Mozilla made it public on 12 August 2015 as CVE-2015-4505.
About Access control
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.