Vulnerabilities > CVE-2019-19781 - Path Traversal vulnerability in Citrix products
Attack vector
NETWORK Attack complexity
LOW Privileges required
NONE Confidentiality impact
HIGH Integrity impact
HIGH Availability impact
HIGH Summary
An issue was discovered in Citrix Application Delivery Controller (ADC) and Gateway 10.5, 11.1, 12.0, 12.1, and 13.0. They allow Directory Traversal.
Vulnerable Configurations
Common Weakness Enumeration (CWE)
Common Attack Pattern Enumeration and Classification (CAPEC)
- Relative Path Traversal An attacker exploits a weakness in input validation on the target by supplying a specially constructed path utilizing dot and slash characters for the purpose of obtaining access to arbitrary files or resources. An attacker modifies a known path on the target in order to reach material that is not available through intended channels. These attacks normally involve adding additional path separators (/ or \) and/or dots (.), or encodings thereof, in various combinations in order to reach parent directories or entirely separate trees of the target's directory structure.
- Directory Traversal An attacker with access to file system resources, either directly or via application logic, will use various file path specification or navigation mechanisms such as ".." in path strings and absolute paths to extend their range of access to inappropriate areas of the file system. The attacker attempts to either explore the file system for recon purposes or access directories and files that are intended to be restricted from their access. Exploring the file system can be achieved through constructing paths presented to directory listing programs, such as "ls" and 'dir', or through specially crafted programs that attempt to explore the file system. The attacker engaging in this type of activity is searching for information that can be used later in a more exploitive attack. Access to restricted directories or files can be achieved through modification of path references utilized by system applications.
- File System Function Injection, Content Based An attack of this type exploits the host's trust in executing remote content including binary files. The files are poisoned with a malicious payload (targeting the file systems accessible by the target software) by the attacker and may be passed through standard channels such as via email, and standard web content like PDF and multimedia files. The attacker exploits known vulnerabilities or handling routines in the target processes. Vulnerabilities of this type have been found in a wide variety of commercial applications from Microsoft Office to Adobe Acrobat and Apple Safari web browser. When the attacker knows the standard handling routines and can identify vulnerabilities and entry points they can be exploited by otherwise seemingly normal content. Once the attack is executed, the attackers' program can access relative directories such as C:\Program Files or other standard system directories to launch further attacks. In a worst case scenario, these programs are combined with other propagation logic and work as a virus.
- Using Slashes and URL Encoding Combined to Bypass Validation Logic This attack targets the encoding of the URL combined with the encoding of the slash characters. An attacker can take advantage of the multiple way of encoding an URL and abuse the interpretation of the URL. An URL may contain special character that need special syntax handling in order to be interpreted. Special characters are represented using a percentage character followed by two digits representing the octet code of the original character (%HEX-CODE). For instance US-ASCII space character would be represented with %20. This is often referred as escaped ending or percent-encoding. Since the server decodes the URL from the requests, it may restrict the access to some URL paths by validating and filtering out the URL requests it received. An attacker will try to craft an URL with a sequence of special characters which once interpreted by the server will be equivalent to a forbidden URL. It can be difficult to protect against this attack since the URL can contain other format of encoding such as UTF-8 encoding, Unicode-encoding, etc.
- Manipulating Input to File System Calls An attacker manipulates inputs to the target software which the target software passes to file system calls in the OS. The goal is to gain access to, and perhaps modify, areas of the file system that the target software did not intend to be accessible.
Exploit-Db
id EDB-ID:47930 last seen 2020-01-16 modified 2020-01-16 published 2020-01-16 reporter Exploit-DB source https://www.exploit-db.com/download/47930 title Citrix Application Delivery Controller (ADC) and Gateway 13.0 - Path Traversal id EDB-ID:47901 last seen 2020-01-11 modified 2020-01-11 published 2020-01-11 reporter Exploit-DB source https://www.exploit-db.com/download/47901 title Citrix Application Delivery Controller and Citrix Gateway - Remote Code Execution (PoC)
Metasploit
description This module exploits a directory traversal in Citrix Application Delivery Controller (ADC), aka NetScaler, and Gateway 10.5, 11.1, 12.0, 12.1, and 13.0, to execute an arbitrary command payload. id MSF:EXPLOIT/LINUX/HTTP/CITRIX_DIR_TRAVERSAL_RCE last seen 2020-06-13 modified 2020-04-21 published 2020-01-13 references reporter Rapid7 source https://github.com/rapid7/metasploit-framework/blob/master//modules/exploits/linux/http/citrix_dir_traversal_rce.rb title Citrix ADC (NetScaler) Directory Traversal RCE 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. id MSF:AUXILIARY/SCANNER/HTTP/CITRIX_DIR_TRAVERSAL last seen 2020-06-14 modified 2020-01-14 published 2020-01-13 references reporter Rapid7 source https://github.com/rapid7/metasploit-framework/blob/master//modules/auxiliary/scanner/http/citrix_dir_traversal.rb title Citrix ADC (NetScaler) Directory Traversal Scanner
Nessus
NASL family CGI abuses NASL id CITRIX_NETSCALER_CTX267027.NASL description The remote Citrix ADC or Citrix NetScaler Gateway device is affected by an arbitrary code execution vulnerability. An unauthenticated, remote attacker may be able to leverage this vulnerability to perform arbitrary code execution on an affected host. Please refer to advisory CTX267027 for more information. last seen 2020-06-01 modified 2020-06-02 plugin id 132397 published 2019-12-24 reporter This script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/132397 title Citrix ADC and Citrix NetScaler Gateway Arbitrary Code Execution (CTX267027) code # # (C) Tenable Network Security, Inc. # include('compat.inc'); if (description) { script_id(132397); script_version("1.10"); script_set_attribute(attribute:"plugin_modification_date", value:"2020/07/10"); script_cve_id("CVE-2019-19781"); script_xref(name:"IAVA", value:"2020-A-0001-S"); script_name(english:"Citrix ADC and Citrix NetScaler Gateway Arbitrary Code Execution (CTX267027)"); script_set_attribute(attribute:"synopsis", value:" The remote device is affected by an arbitrary code execution vulnerability."); script_set_attribute(attribute:"description", value: "The remote Citrix ADC or Citrix NetScaler Gateway device is affected by an arbitrary code execution vulnerability. An unauthenticated, remote attacker may be able to leverage this vulnerability to perform arbitrary code execution on an affected host. Please refer to advisory CTX267027 for more information."); script_set_attribute(attribute:"see_also", value:"https://support.citrix.com/article/CTX267027"); script_set_attribute(attribute:"solution", value: "For versions 10.5.x, 11.1.x, 12.0.x, 12.1.x and 13.0.x, upgrade to 10.5.70.12, 11.1.63.15, 12.0.63.13, 12.1.55.18 and 13.0.47.24 respectively."); script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P"); script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C"); script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"); script_set_cvss3_temporal_vector("CVSS:3.0/E:F/RL:O/RC:C"); script_set_attribute(attribute:"cvss_score_source", value:"CVE-2019-19781"); script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available"); script_set_attribute(attribute:"exploit_available", value:"true"); script_set_attribute(attribute:"metasploit_name", value:'Citrix ADC (NetScaler) Directory Traversal RCE'); script_set_attribute(attribute:"exploit_framework_metasploit", value:"true"); script_set_attribute(attribute:"vuln_publication_date", value:"2019/12/17"); script_set_attribute(attribute:"patch_publication_date", value:"2019/12/17"); script_set_attribute(attribute:"plugin_publication_date", value:"2019/12/24"); script_set_attribute(attribute:"plugin_type", value:"combined"); script_set_attribute(attribute:"cpe", value:"cpe:/o:citrix:netscaler_access_gateway_firmware"); script_set_attribute(attribute:"stig_severity", value:"II"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_family(english:"CGI abuses"); script_copyright(english:"This script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof."); script_dependencies("citrix_netscaler_detect.nbin"); script_require_keys("Host/NetScaler/Detected"); exit(0); } include('audit.inc'); version = get_kb_item_or_exit('Host/NetScaler/Version'); build = get_kb_item('Host/NetScaler/Build'); display_version = version + '-' + build; version = version + '.' + build; fixed_build = NULL; if (version =~ '^10\\.5' && ver_compare(ver:build, fix:'70.12', strict:FALSE) == -1) fixed_build = '10.5-70.12'; if (version =~ '^11\\.1' && ver_compare(ver:build, fix:'63.15', strict:FALSE) == -1) fixed_build = '11.1-63.15'; if (version =~ '^12\\.0' && ver_compare(ver:build, fix:'63.13', strict:FALSE) == -1) fixed_build = '12.0-63.13'; if (version =~ '^12\\.1' && ver_compare(ver:build, fix:'55.18', strict:FALSE) == -1) fixed_build = '12.1-55.18'; if (version =~ '^13\\.0' && ver_compare(ver:build, fix:'47.24', strict:FALSE) == -1) fixed_build = '13.0-47.24'; if (isnull(fixed_build)) audit(AUDIT_INST_VER_NOT_VULN, 'Citrix NetScaler', display_version); report = '\n Installed version : ' + display_version + '\n Installed build : ' + build + '\n Fixed build : ' + fixed_build + '\n'; security_report_v4(port:0, severity:SECURITY_HOLE, extra:report);
NASL family FreeBSD Local Security Checks NASL id FREEBSD_PKG_2BAB995F36D411EA9DAD002590ACAE31.NASL description Art Manion and Will Dormann report : By using an older and less-secure form of open(), it is possible for untrusted template files to cause reads/writes outside of the template directories. This vulnerability is a component of the recent Citrix exploit. last seen 2020-06-01 modified 2020-06-02 plugin id 132879 published 2020-01-15 reporter This script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/132879 title FreeBSD : Template::Toolkit -- Directory traversal on write (2bab995f-36d4-11ea-9dad-002590acae31)
Packetstorm
data source https://packetstormsecurity.com/files/download/155972/cadcg-traversal.nse.txt id PACKETSTORM:155972 last seen 2020-01-16 published 2020-01-16 reporter Mishra Dhiraj source https://packetstormsecurity.com/files/155972/Citrix-ADC-Gateway-Path-Traversal.html title Citrix ADC / Gateway Path Traversal data source https://packetstormsecurity.com/files/download/155904/citrixadcg-exec.txt id PACKETSTORM:155904 last seen 2020-01-13 published 2020-01-11 reporter Project Zero India source https://packetstormsecurity.com/files/155904/Citrix-Application-Delivery-Controller-Gateway-Remote-Code-Execution.html title Citrix Application Delivery Controller / Gateway Remote Code Execution data source https://packetstormsecurity.com/files/download/155930/citrix-exec.rb.txt id PACKETSTORM:155930 last seen 2020-01-13 published 2020-01-13 reporter Ramella Sebastien source https://packetstormsecurity.com/files/155930/Citrix-Application-Delivery-Controller-Gateway-10.5-Remote-Code-Execution.html title Citrix Application Delivery Controller / Gateway 10.5 Remote Code Execution data source https://packetstormsecurity.com/files/download/155905/citrix-traversalexec.txt id PACKETSTORM:155905 last seen 2020-01-13 published 2020-01-11 reporter David Kennedy source https://packetstormsecurity.com/files/155905/Citrix-Application-Delivery-Controller-Gateway-Remote-Code-Execution-Traversal.html title Citrix Application Delivery Controller / Gateway Remote Code Execution / Traversal data source https://packetstormsecurity.com/files/download/155947/citrix_dir_traversal_rce.rb.txt id PACKETSTORM:155947 last seen 2020-01-14 published 2020-01-14 reporter Ramella Sebastien source https://packetstormsecurity.com/files/155947/Citrix-ADC-NetScaler-Directory-Traversal-Remote-Code-Execution.html title Citrix ADC (NetScaler) Directory Traversal / Remote Code Execution
Saint
description | Citrix ADC and Gateway directory traversal and XML file upload |
id | misc_citrixnetscalerver |
title | citrix_adc_dirtrav_xml_upload |
type | remote |
The Hacker News
id THN:166AAAF7F04EF01C9E049500387BD1FD last seen 2020-01-24 modified 2020-01-24 published 2020-01-20 reporter The Hacker News source https://thehackernews.com/2020/01/citrix-adc-patch-update.html title Citrix Releases Patches for Critical ADC Vulnerability Under Active Attack id THN:9994A9D5CFB76851BB74C8AD52F3DBBE last seen 2020-02-18 modified 2020-02-18 published 2020-02-18 reporter The Hacker News source https://thehackernews.com/2020/02/iranian-hackers-vpn-vulnerabilities.html title Iranian Hackers Exploiting VPN Flaws to Backdoor Organizations Worldwide id THN:6ED39786EE29904C7E93F7A0E35A39CB last seen 2020-01-11 modified 2020-01-11 published 2020-01-11 reporter The Hacker News source https://thehackernews.com/2020/01/citrix-adc-gateway-exploit.html title PoC Exploits Released for Citrix ADC and Gateway RCE Vulnerability
Related news
- Organizations Quick to Patch Critical Citrix ADC Vulnerability (source)
- Critical Citrix RCE Flaw Still Threatens 1,000s of Corporate LANs (source)
- Good: IT admins scrambled to patch 80 per cent of public-facing Citrix boxes to close nightmare hijack hole (source)
- Attacks on ADC Ramp Up as Citrix Releases Remaining Patches (source)
- Citrix Releases More Patches for Exploited Flaw, Tool to Detect Compromise (source)
- Citrix Systems and FireEye introduce new tool for detection of compromise (source)
- IoC Scanner shows if Citrix appliances have been compromised via CVE-2019-19781 (source)
- Still losing sleep over that awful Citrix bug? This scanner is here to help... you realize you've already been pwned (source)
- First patches for the Citrix ADC, Gateway RCE flaw released (source)
- 'Nice guy' hackers are seemingly fixing the Citrix server hole, but leaving a nasty present behind (source)
- 'Friendly' hackers are seemingly fixing the Citrix server hole – and leaving a nasty present behind (source)
- Exploits for Citrix ADC and Gateway flaw abound, attacks are ongoing (source)
- Attackers exploiting critical Citrix ADC, Gateway flaw, company yet to release fixes (source)
- US Census Bureau hacked in January 2020 using Citrix exploit (source)
- Postmortem on U.S. Census Hack Exposes Cybersecurity Failures (source)
- Citrix fixes critical ADC and Gateway zero-day exploited in attacks (source)
- Hackers exploit critical Citrix ADC and Gateway zero day, patch now (source)
References
- http://packetstormsecurity.com/files/155904/Citrix-Application-Delivery-Controller-Gateway-Remote-Code-Execution.html
- http://packetstormsecurity.com/files/155904/Citrix-Application-Delivery-Controller-Gateway-Remote-Code-Execution.html
- http://packetstormsecurity.com/files/155905/Citrix-Application-Delivery-Controller-Gateway-Remote-Code-Execution-Traversal.html
- http://packetstormsecurity.com/files/155905/Citrix-Application-Delivery-Controller-Gateway-Remote-Code-Execution-Traversal.html
- http://packetstormsecurity.com/files/155930/Citrix-Application-Delivery-Controller-Gateway-10.5-Remote-Code-Execution.html
- http://packetstormsecurity.com/files/155930/Citrix-Application-Delivery-Controller-Gateway-10.5-Remote-Code-Execution.html
- http://packetstormsecurity.com/files/155947/Citrix-ADC-NetScaler-Directory-Traversal-Remote-Code-Execution.html
- http://packetstormsecurity.com/files/155947/Citrix-ADC-NetScaler-Directory-Traversal-Remote-Code-Execution.html
- http://packetstormsecurity.com/files/155972/Citrix-ADC-Gateway-Path-Traversal.html
- http://packetstormsecurity.com/files/155972/Citrix-ADC-Gateway-Path-Traversal.html
- https://badpackets.net/over-25000-citrix-netscaler-endpoints-vulnerable-to-cve-2019-19781/
- https://badpackets.net/over-25000-citrix-netscaler-endpoints-vulnerable-to-cve-2019-19781/
- https://forms.gle/eDf3DXZAv96oosfj6
- https://forms.gle/eDf3DXZAv96oosfj6
- https://support.citrix.com/article/CTX267027
- https://support.citrix.com/article/CTX267027
- https://twitter.com/bad_packets/status/1215431625766424576
- https://twitter.com/bad_packets/status/1215431625766424576
- https://www.kb.cert.org/vuls/id/619785
- https://www.kb.cert.org/vuls/id/619785