CAPEC-170 - Web Application Fingerprinting

An attacker sends a series of probes to a web application in order to elicit version-dependent and type-dependent behavior that assists in identifying the target. An attacker could learn information such as software versions, error pages, and response headers, variations in implementations of the HTTP protocol, directory structures, and other similar information about the targeted service. This information can then be used by an attacker to formulate a targeted attack plan. While web application fingerprinting is not intended to be damaging (although certain activities, such as network scans, can sometimes cause disruptions to vulnerable applications inadvertently) it may often pave the way for more damaging attacks.

Severity

Likelihood

Confidentiality

Integrity

Availability

  • Attack Methods 1
  • Analysis
  • Purposes 1
  • Reconnaissance
  • Scopes 1
  • "Varies by context"
  • Confidentiality

Low level: Attacker knows how to send HTTP request, SQL query to a web application.

Any web application can be fingerprinted. However, some configuration choices can limit the useful information an attacker may collect during a fingerprinting attack.

While simple fingerprinting can be accomplished with only a web browser, for more thorough fingerprinting an attacker requires a variety of tools to collect information about the target. These tools might include protocol analyzers, web-site crawlers, and fuzzing tools. Footprinting a service adequately may also take a few days if the attacker wishes the footprinting attempt to go undetected.

Step 1 - Request fingerprinting

Use automated tools or send web server specific commands to web server and wait for server's response..

Tecnique ID: 1 - Environment(s) env-Web

Use automated tools or send web server specific commands to web server and then receive server's response.

Indicator ID: 1 - Environment(s) env-Web

Type: Positive

HTTP response headers contain fingerprinting sensitive fields indicating server's vendors and versions.

Indicator ID: 2 - Environment(s) env-Web

Type: Inconclusive

HTTP response headers do not contain fingerprinting sensitive fields indicating server's vendors and versions.


Security Control ID: 1

Type: Detective

Web application firewall may detect a large amount of HTTP requests from the same host.


Outcome ID: 1

Type: Success

A list of fingerprinting sensitive information from HTTP response headers.

Outcome ID: 1

Type: Failure

There is no HTTP response header information available.



Step 1 - Increase the accuracy of server fingerprinting of Web servers

Attacker usually needs to send several different commands to accurately identify the web server. Attacker can also use automated tools to send requests to the server. The responses of the server may be different in terms of protocol behavior..

Tecnique ID: 1 - Environment(s) env-Web

Observe the ordering of the several HTTP response headers. The ordering of the header of each server may have unique identities.

Tecnique ID: 2 - Environment(s) env-Web

Send bad requests or requests of nonexistent pages to the server.

Tecnique ID: 3 - Environment(s) env-Web

Attacker takes existing automated tools to recognize the type and the version of the web server in use.

Indicator ID: 1 - Environment(s) env-Web

Type: Positive

Find different inner reordering of headers in HTTP response due to different versions of the server.

Indicator ID: 2 - Environment(s) env-Web

Type: Positive

Every server answers to a Bad request in a different way due to different versions of the server.

Indicator ID: 3 - Environment(s) env-Web

Type: Positive

Find signatures of web servers in database of automated tools.

Indicator ID: 4 - Environment(s) env-Web

Type: Negative

HTTP response headers all look like identical.


Security Control ID: 1

Type: Detective

Alert on standard fingerprinting probes. Use the same vulnerability catalogs that adversaries use.

Security Control ID: 2

Type: Detective

Alert on bad request.

Security Control ID: 3

Type: Preventative

Obfuscate server fields of HTTP response.

Security Control ID: 4

Type: Preventative

Hide inner ordering of HTTP response header.

Security Control ID: 5

Type: Preventative

Customizing HTTP error codes such as 404 or 500.


Outcome ID: 1

Type: Success

The attacker successfully identifies server's vendors and versions.


Step 2 - Identify Web Application Software

After the web server platform software has been identified, the attacker start to identify web application technologies such as ASP, .NET, PHP and Java on the server..

Tecnique ID: 1 - Environment(s) env-Web

Examine the file name extensions in URL, for example .php indicates PHP script interfaced with Apache server.

Tecnique ID: 2 - Environment(s) env-Web

Examine the HTTP Response Headers. This may leak information about software signatures

Tecnique ID: 3 - Environment(s) env-Web

Examine Cookies that may contain server's software information.

Tecnique ID: 4 - Environment(s) env-Web

Check error pages.

Indicator ID: 1 - Environment(s) env-Web

Type: Positive

File name extensions can be found in the URL.

Indicator ID: 2 - Environment(s) env-Web

Type: Positive

HTTP Response headers show software version.

Indicator ID: 3 - Environment(s) env-Web

Type: Positive

Cookies leak information for server's version.

Indicator ID: 4 - Environment(s) env-Web

Type: Positive

From error messages, the stack trace of errors and exceptions may also explicitly tell application software information.


Security Control ID: 1

Type: Detective

Alert on standard fingerprinting probes. Use the same vulnerability catalogs that adversaries use.

Security Control ID: 2

Type: Detective

Alert on bad request.

Security Control ID: 3

Type: Preventative

Hide URL file extension.

Security Control ID: 4

Type: Preventative

Hide HTTP response header software information filed.

Security Control ID: 5

Type: Preventative

Hide cookie's software information filed

Security Control ID: 6

Type: Preventative

Appropriately deal with error messages.


Outcome ID: 1

Type: Success

File name extensions can be found in the URL.

Outcome ID: 1

Type: Success

HTTP Response headers show software version.

Outcome ID: 1

Type: Success

Cookies leak information for server's version.

Outcome ID: 1

Type: Success

From error messages, the stack trace of errors and exceptions may also explicitly tell application software information.

Outcome ID: 1

Type: Success

The attacker successfully identifies web application software vendors and versions.


Step 3 - Identify Backend Database Version

Determining the database engine type can assist attackers' attempt to successfully execute SQL injection. Some database API such as ODBC will show a database type as part of the driver information when reporting an error..

Tecnique ID: 1 - Environment(s) env-Web

Use tools to send bogus SQL query to the server and check error pages.

Indicator ID: 1 - Environment(s) env-Web

Type: Positive

Get error messages from SQL response.

Indicator ID: 2 - Environment(s) env-Web

Type: Negative

No error messages.


Security Control ID: 1

Type: Detective

Alert on standard fingerprinting probes. Use the same vulnerability catalogs that adversaries use.

Security Control ID: 2

Type: Detective

Alert on bad request.

Security Control ID: 3

Type: Preventative

Obfuscate database type in Database API's error message.


Outcome ID: 1

Type: Success

The attacker successfully identifies database type from error messages.

Outcome ID: 2

Type: Failure

The attacker fails to identify database type from error messages.



Implementation: Obfuscate server fields of HTTP response.

Implementation: Hide inner ordering of HTTP response header.

Implementation: Customizing HTTP error codes such as 404 or 500.

Implementation: Hide URL file extension.

Implementation: Hide HTTP response header software information filed.

Implementation: Hide cookie's software information filed.

Implementation: Appropriately deal with error messages.

Implementation: Obfuscate database type in Database API's error message.