CAPEC-127
Directory Indexing
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.
Soyutlama
Detailed
Tipik ciddiyet
Medium
Saldırı ihtimali
High
Saldırıyı anla
Bu saldırı kalıbı nedir?
Uygulama akışı
Saldırı adım adım nasıl ilerler?
Explore
Directory Discovery
Kullanılan teknikler
- 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
Kullanılan teknikler
- 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.
Kullanılan teknikler
- 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.
Gereksinimler
Saldırının gerçekleşmesi için ne gerekir?
Ön koşullar
- 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.
Gerekli beceri
- Low: To issue the request to URL without given a specific file name
- High: To bypass the access control of the directory of listings
Gerekli kaynak
- Ability to send HTTP requests to a web application.
Etki
Başarılı saldırı neye yol açar?
Etkilenen alanlar: Confidentiality
Savunma
Nasıl önlenir ve etkisi azaltılır?
Gerçek dünya