NShiftKey-Rule-Guide logo NShiftKey-Rule-Guide

1. Vulnerability Description

image2015-12-10 11_16_22

type content
If you have changed your web server settings to enable directory listings Most web servers provide a directory listing function by default and Options enable you to turn on/off
If the administrator has set this option to On, the folder can be accessed in the way as http://www.target.com/data/, then a list of files and directories appears.
If an application’s bug causes directory listing This is a case of directory listing due to unintended results in a specific application. A typical example is the case where vulnerabilities were found in all versions of Resin 2.1.x and 3.x.
If there is no default page such as Index.html and index.jsp, it is possible by adding %3f.jsp behind a directory. (Example : http://www.target.com/data/%3f.jsp )
The same result occurs on the Netscape web server by entering /?wp-cs-dump, /?PageServices behind a domain.

2. How to check vulnerability

2.1 Direct Inspection Method

** Note **
If there is a directory called ""file"" under the web root of the web server called http://test.com/, enter http://test.com/file/ in the URL address field of the web browser.

At this time, if all the contents of the ""file"" directory are displayed on the screen, it means that a directory listing vulnerability exists, and you must enter'/' at the end.

image2015-12-9 18_30_27

image2015-12-9 18_34_28

2.2. Check through Google

Web application Directory listing exposure pattern
IIS Parent Directory
Apache Directory Listing
Tomcat Directory Listing
Resin, etc… Index of /

image2015-12-10 10_4_41

3. Vulnerability Countermeasure

3.1. Change of Web Server configuration

IIS

image2015-12-10 10_55_22

Apache

<Directory ""/var/www/html"">
Options Indexed
</Directory>

Tomcat

<param-name> listings </param-name>
<param-name> false </param-name>

Resin

<doc-dir> doc </doc-dir>
<directory-servlet> none</directory-servlet>

3.2. Create Default Page on all directories below the Web root (index.html, index.asp, index.jsp, etc.)

3.3 Additional countermeasure