Information disclosure vulnerabilities

information leakage when the website unintentionally reveals sensitive information to its users
  • Users data: usernames, passwords, financial information
  • Sensitive commercial or business data
  • Technical details about the website and its infrastructure

Examples

  • Revealing the names of hidden directories, their structure, and their contents via a robots.txt file or directory listing
  • Providing access to source code files via temporary backups
  • Explicitly mentioning database table or column names in error messages
  • Unnecessarily exposing highly sensitive information, such as credit card details
  • Hard-coding API keys, IP addresses, database credentials, and so on in the source code
  • Hinting at the existence or absence of resources, usernames, and so on via subtle differences in application behavior

test for information disclosure vulnerabilities

avoid focussing too narrowly on a particular vulnerability. Sensitive data can be leaked in all kinds of places, so it is important not to miss anything that could be useful later

Fuzzing

the goal is to make the website response with an error message or any message that helps or to make the website do weird things that can be test more
  • try submitting unexpected data types
  • use specially crafted fuzz strings to see what effect this has
  • identify differences in responses by comparing HTTP status codes, response times, lengths, and so on.
  • Use grep matching rules to quickly identify occurrences of keywords, such as error, invalid, SELECT, SQL, and so on.
  • change headers/ add headers
  • change methods
  • add parameters/ change parameters

chase errors

**Verbose error messages can sometimes disclose interesting information while you go about your normal testing workflow

sources for information disclosure

robots.txt & sitemap.xml:

web crowlers use those two files to index the website and some time the owners of the website don’t want to index specific directories which could contain sensitive information

Directory listings:

some websites allow directory listing for directories that do not have an index page present, you can view the files on that directory and if the website is not configured well you can view these files which usually contains source code

Developer comments

Error messages

One of the most common causes of information disclosure is verbose error messages, you should always pay close attention to all error messages

they can disclose:
  • what input or data type is expected from a given parameter
  • information about different technologies being used by the website
  • open-source framework

Debugging data

sometimes be logged in a separate file it can serve as a useful reference for understanding the application’s runtime state. It can also provide several clues as to how they can supply crafted input to manipulate the application state and control the information received.

Debug messages can sometimes contain vital information for developing an attack, including:

  • Values for key session variables that can be manipulated via user input
  • Hostnames and credentials for back-end components
  • File and directory names on the server
  • Keys used to encrypt data transmitted via the client