Code injection in Firefox macOS Desktop Client
Categories
(Core :: Widget: Cocoa, task)
Tracking
()
People
(Reporter: songbo.dian, Unassigned)
Details
(Keywords: reporter-external, Whiteboard: [reporter-external] [client-bounty-form] [verif?])
Attachments
(1 file)
239 bytes,
text/x-csrc
|
Details |
How was this issue discovered:
A blog remind me this issue https://theevilbit.github.io/posts/dyld_insert_libraries_dylib_injection_in_macos_osx_deep_dive/.
This is a common security problem for all Mac apps, I've tested this for most mainly mac browsers like Chrome, Safari, Firefox, Microsoft Edge, Opera, and found that Firefox is vulnerable.
Firefox version && System version:
Firefox (77.0.1 64-bit)
macOS 10.15.4
Summary:
Any malicious application, running with standard user permissions is able to exploit this vulnerability and execute code in your firefox's progress context.
Steps to reproduce:
- Compile the uploaded code,
gcc -dynamiclib test.c -o inject.dylib - Run command in shell,
DYLD_INSERT_LIBRARIES=inject.dylib /Applications/Firefox.app/Contents/MacOS/firefox - Firefox will be start and the code in test.c will be ran in firefox progress space.
Recommendations:
Assuming that the desktop client has been compiled using XCode, a developer needs to turn on "Hardened Runtime" capability making sure that Allow DYLD Environment Variables option is turned off. Another way to disallow the DYLD Environement variables is adding a _RESTRICTED segment to the application binary.
Impact
Code execution in the application's context. Any sensitive resource that may be accessed via the application may be stolen. Attacker is also able to perform any action that user may perform from the firefox.
Updated•5 years ago
|
Updated•5 years ago
|
Updated•1 year ago
|
Updated•9 months ago
|
Description
•