Vulnerabilities > CVE-2017-6526 - Improper Authentication vulnerability in Dnatools Dnalims 42015S13

047910
CVSS 10.0 - CRITICAL
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
COMPLETE
Integrity impact
COMPLETE
Availability impact
COMPLETE
network
low complexity
dnatools
CWE-287
critical
exploit available
metasploit

Summary

An issue was discovered in dnaTools dnaLIMS 4-2015s13. dnaLIMS is vulnerable to unauthenticated command execution through an improperly protected administrative web shell (cgi-bin/dna/sysAdmin.cgi POST requests).

Vulnerable Configurations

Part Description Count
Application
Dnatools
1

Common Weakness Enumeration (CWE)

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Authentication Abuse
    An attacker obtains unauthorized access to an application, service or device either through knowledge of the inherent weaknesses of an authentication mechanism, or by exploiting a flaw in the authentication scheme's implementation. In such an attack an authentication mechanism is functioning but a carefully controlled sequence of events causes the mechanism to grant access to the attacker. This attack may exploit assumptions made by the target's authentication procedures, such as assumptions regarding trust relationships or assumptions regarding the generation of secret values. This attack differs from Authentication Bypass attacks in that Authentication Abuse allows the attacker to be certified as a valid user through illegitimate means, while Authentication Bypass allows the user to access protected material without ever being certified as an authenticated user. This attack does not rely on prior sessions established by successfully authenticating users, as relied upon for the "Exploitation of Session Variables, Resource IDs and other Trusted Credentials" attack patterns.
  • Exploiting Trust in Client (aka Make the Client Invisible)
    An attack of this type exploits a programs' vulnerabilities in client/server communication channel authentication and data integrity. It leverages the implicit trust a server places in the client, or more importantly, that which the server believes is the client. An attacker executes this type of attack by placing themselves in the communication channel between client and server such that communication directly to the server is possible where the server believes it is communicating only with a valid client. There are numerous variations of this type of attack.
  • Utilizing REST's Trust in the System Resource to Register Man in the Middle
    This attack utilizes a REST(REpresentational State Transfer)-style applications' trust in the system resources and environment to place man in the middle once SSL is terminated. Rest applications premise is that they leverage existing infrastructure to deliver web services functionality. An example of this is a Rest application that uses HTTP Get methods and receives a HTTP response with an XML document. These Rest style web services are deployed on existing infrastructure such as Apache and IIS web servers with no SOAP stack required. Unfortunately from a security standpoint, there frequently is no interoperable identity security mechanism deployed, so Rest developers often fall back to SSL to deliver security. In large data centers, SSL is typically terminated at the edge of the network - at the firewall, load balancer, or router. Once the SSL is terminated the HTTP request is in the clear (unless developers have hashed or encrypted the values, but this is rare). The attacker can utilize a sniffer such as Wireshark to snapshot the credentials, such as username and password that are passed in the clear once SSL is terminated. Once the attacker gathers these credentials, they can submit requests to the web service provider just as authorized user do. There is not typically an authentication on the client side, beyond what is passed in the request itself so once this is compromised, then this is generally sufficient to compromise the service's authentication scheme.
  • Man in the Middle Attack
    This type of attack targets the communication between two components (typically client and server). The attacker places himself in the communication channel between the two components. Whenever one component attempts to communicate with the other (data flow, authentication challenges, etc.), the data first goes to the attacker, who has the opportunity to observe or alter it, and it is then passed on to the other component as if it was never intercepted. This interposition is transparent leaving the two compromised components unaware of the potential corruption or leakage of their communications. The potential for Man-in-the-Middle attacks yields an implicit lack of trust in communication or identify between two components.

Exploit-Db

descriptiondnaLIMS DNA Sequencing - Directory Traversal / Session Hijacking / Cross-Site Scripting. CVE-2017-6526,CVE-2017-6527,CVE-2017-6528,CVE-2017-6529. Webapps exp...
fileexploits/cgi/webapps/41578.txt
idEDB-ID:41578
last seen2017-03-10
modified2017-03-10
platformcgi
port
published2017-03-10
reporterExploit-DB
sourcehttps://www.exploit-db.com/download/41578/
titlednaLIMS DNA Sequencing - Directory Traversal / Session Hijacking / Cross-Site Scripting
typewebapps

Metasploit

descriptionThis module utilizes an administrative module which allows for command execution. This page is completely unprotected from any authentication when given a POST request.
idMSF:EXPLOIT/LINUX/HTTP/DNALIMS_ADMIN_EXEC
last seen2020-06-09
modified2017-07-24
published2017-03-09
references
reporterRapid7
sourcehttps://github.com/rapid7/metasploit-framework/blob/master//modules/exploits/linux/http/dnalims_admin_exec.rb
titlednaLIMS Admin Module Command Execution

Packetstorm

Seebug

bulletinFamilyexploit
descriptiondnaLIMS Code Execution / XSS / Traversal / Session Hijacking web-application Advisory URL: https://www.shorebreaksecurity.com/blog/product-security-advisory-psa0002-dnalims/ Date published: Mar 08, 2017 Vendor: dnaTools, Inc. CVE IDs: [2017-6526, 2017-6527, 2017-6528, 2017-6529] USCERT VU: 929263 #### Vulnerability Summaries 1) Improperly protected web shell [CVE-2017-6526] dnaLIMS requires authentication to view cgi-bin/dna/sysAdmin.cgi, which is a web shell included with the software running as the web user. However, sending a POST request to that page bypasses authentication checks, including the UID parameter within the POST request. 2) Unauthenticated Directory Traversal [CVE-2017-6527] The viewAppletFsa.cgi seqID parameter is vulnerable to a null terminated directory traversal attack. This allows an unauthenticated attacker to retrieve files on the operating system accessible by the permissions of the web server. This page also does not require authentication, allowing any person on the Internet to exploit this vulnerability. 3) Insecure Password Storage [CVE-2017-6528] An option, which is most likely the default, allows the password file (/home/dna/spool/.pfile) to store clear text passwords. When combined with the unauthenticated directory traversal vulnerability, it is possible to gain the username and password for all users of the software and gain complete control of the software. 4) Session Hijacking [CVE-2017-6529] Each user of the dnaLIMS software is assigned a unique four-digit user identification number(UID) upon account creation. These numbers appear to be assigned sequentially. Multiple pages of the dnaLIMS application require that this UID be passed as a URL parameter in order to view the content of the page. Consider the following example: The URL a `http://<SERVER NAME REDACTED>/cgi-bin/dna/seqreq2N.cgi?username=61685578,2410a` is a valid URL to view the page for sequencing requests for the user with the UID of 2410. The username parameter of the URL is the mechanism for authentication to the system. The first eight-digit number of the username parameter appears to be a session identifier as it changes every time the user logs in from the password.cgi page, however this value is not checked by the seqreq2N.cgi page. This allows an attacker to guess the four-digit UID of valid user accounts that have an active session. The user with the UID of 2419 currently has an active session, so we can simply hijack this useras session by requesting this page and specifying the UID 2419. 5) Cross-site Scripting The seqID parameter of the viewAppletFsa.cgi page is vulnerable to a reflected cross site scripting attack via GET request as seen in the following URL: ``` http://<SERVER NAME REDACTED>/cgi-bin/dna/viewAppletFsa.cgi?seqID=7415-7<SCRIPT Alert("XSS") </SCRIPT> ``` 6) Cross-site Scripting The navUserName parameter of the seqTable*.cgi page is vulnerable to a reflected cross site scripting attack via POST request as seen in the example below. The * reflects a short name for a client, (ie Shorebreak Security may be seqTableSS.cgi or seqTableshorebreak.cgi) and may not be vulnerable for all dnaLIMS installs. 7) Improperly Protected Content Many of the pages within the admin interface are not properly protected from viewing by authenticated users. This can give an attacker additional system information about the system, or change system/software configuration. Software was conducted on a live production system, therefore the pages themselves were tested, forms within these pages were not. This is also not an exhaustive list of improperly protected pages: cgi-bin/dna/configuration.cgi cgi-bin/dna/createCoInfo.cgi cgi-bin/dna/configSystem.cgi cgi-bin/dna/combineAcctsN.cgi
idSSV:92931
last seen2017-11-19
modified2017-04-10
published2017-04-10
reporterRoot
sourcehttps://www.seebug.org/vuldb/ssvid-92931
titlednaLIMS Code Execution / XSS / Traversal / Session Hijacking (CVE-2017-6526)