- What is CAPEC-127?
- An adversary crafts a request to a target that results in the target listing/indexing the content of a directory as output. One common method of triggering directory contents as output is to construct a request containing a path that terminates in a directory name rather than a file name since many applications are configured to provide a list of the directory's contents when such a request is received. An adversary can use this to explore the directory tree on a target as well as learn the names of files. This can often end up revealing test files, backup files, temporary files, hidden files, configuration files, user accounts, script contents, as well as naming conventions, all of which can be used by an attacker to mount additional attacks.
- How does a Directory Indexing attack work?
- It typically unfolds over 3 phases. It begins with: [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.
- How do you prevent CAPEC-127?
- 1. Using blank index.html: putting blank index.html simply prevent directory listings from displaying to site visitors.
- What weaknesses does CAPEC-127 target?
- CAPEC-127 exploits 7 CWE weaknesses, including CWE-276 (Incorrect Default Permissions), CWE-285 (Improper Authorization), CWE-288 (Authentication Bypass Using an Alternate Path or Channel), CWE-424 (Improper Protection of Alternate Path).
- How severe is CAPEC-127?
- MITRE rates CAPEC-127 as Medium severity with high likelihood of attack.