Dark Mode
Capec-127 Detail
Directory Indexing
Detailed Software Likelihood: High Typical Severity: Medium
Parents: 54
Threats: T277 T291 T340 T383 T396
Tools: 18
Not present
| External ID | Source | Link | Description |
|---|---|---|---|
| CAPEC-127 | capec | https://capec.mitre.org/data/definitions/127.html | |
| CWE-424 | cwe | http://cwe.mitre.org/data/definitions/424.html | |
| CWE-425 | cwe | http://cwe.mitre.org/data/definitions/425.html | |
| CWE-288 | cwe | http://cwe.mitre.org/data/definitions/288.html | |
| CWE-285 | cwe | http://cwe.mitre.org/data/definitions/285.html | |
| CWE-732 | cwe | http://cwe.mitre.org/data/definitions/732.html | |
| CWE-276 | cwe | http://cwe.mitre.org/data/definitions/276.html | |
| CWE-693 | cwe | http://cwe.mitre.org/data/definitions/693.html | |
| T1083 | ATTACK | https://attack.mitre.org/wiki/Technique/T1083 | File and Directory Discovery |
| REF-11 | reference_from_CAPEC | http://projects.webappsec.org/Directory-Indexing | WASC Threat Classification 2.0, 2010, The Web Application Security Consortium (WASC) |
Explore
-
Directory Discovery: Use a method, either manual, scripted, or automated to discover the directories on the server by making requests for directories that may possibly exist. During this phase the adversary is less concerned with whether a directory can be accessed or indexed and more focused on simply discovering what directories do exist on the target.
| Techniques |
|---|
| Send requests to the web server for common directory names |
| If directories are discovered that are native to a server type further refine the directory search to include directories usually present on those types of servers. |
| Search for uncommon or potentially user created directories that may be present. |
Experiment
-
Iteratively explore directory/file structures: The adversary attempts to access the discovered directories that allow access and may attempt to bypass server or application level ACLs by using manual or automated methods
| Techniques |
|---|
| Use a scanner tool to dynamically add directories/files to include their scan based upon data obtained in initial probes. |
| Use a browser to manually explore the website by issuing a request ending the URL in a slash '/'. |
| Attempt to bypass ACLs on directories by using methods that known to work against some server types by appending data to the directory request. For instance, appending a Null byte to the end of the request which may cause an ACL to fail and allow access. |
| Sequentially request a list of common base files to each directory discovered. |
| Try multiple fuzzing techniques to list directory contents for directories that will not reveal their contents with a "/" request |
Exploit
-
Read directories or files which are not intended for public viewing.: The adversary attempts to access the discovered directories that allow access and may attempt to bypass server or application level ACLs by using manual or automated methods
| Techniques |
|---|
| Try multiple exploit techniques to list directory contents for directories that will not reveal their contents with a "/" request |
| Try other known exploits to elevate privileges sufficient to bypass protected directories. |
| List the files in the directory by issuing a request with the URL ending in a "/" slash. |
| Access the files via direct URL and capture contents. |
| Attempt to bypass ACLs on directories by using methods that are known to work against some server types by appending data to the directory request. For instance, appending a Null byte to the end of the request which may cause an ACL to fail and allow access. |
| Sequentially request a list of common base files to each directory discovered. |
- The target must be misconfigured to return a list of a directory's content when it receives a request that ends in a directory name rather than a file name.
- The adversary must be able to control the path that is requested of the target.
- The administrator must have failed to properly configure an ACL or has associated an overly permissive ACL with a particular directory.
- The server version or patch level must not inherently prevent known directory listing attacks from working.
- Ability to send HTTP requests to a web application.
| Low | High |
|---|---|
| To issue the request to URL without given a specific file name | |
| To bypass the access control of the directory of listings |
| Confidentiality |
|---|
| Read Data (Information Leakage) |
- The adversary uses directory listing to view sensitive files in the application. This is an example of accessing the backup file. The attack issues a request for http://www.example.com/admin/ and receives the following dynamic directory indexing content in the response: Index of /admin Name Last Modified Size Description backup/ 31-May-2007 08:18 - Apache/ 2.0.55 Server at www.example.com Port 80 The target application does not have direct hyperlink to the "backup" directory in the normal html webpage, however the attacker has learned of this directory due to indexing the content. The client then requests the backup directory URL and receives output which has a "db_dump.php" file in it. This sensitive data should not be disclosed publicly.