Client Network Footprinting (using AJAX/XSS)
Attack Pattern ID: 85 (Detailed Attack Pattern Completeness: Complete)Typical Severity: Very HighStatus: Draft
+ Description

Summary

This attack utilizes the frequent client-server roundtrips in Ajax conversation to scan a system. While Ajax does not open up new vulnerabilities per se, it does optimize them from an attacker point of view. In many XSS attacks the attacker must get a "hole in one" and successfully exploit the vulnerability on the victim side the first time, once the client is redirected the attacker has many chances to engage in follow on probes, but their is only one first chance. In a widely used web application this is not a major problem because 1 in a 1,000 is good enough in a widely used application.

A common first step for an attacker is to footprint the environment to understand what attacks will work. Since footprinting relies on enumeration, the conversational pattern of rapid, multiple requests and responses that are typical in Ajax applications enable an attacker to look for many vulnerabilities, well known ports, network locations and so on.

+ Attack Prerequisites

The user must allow Javscript to execute in their browser

+ Typical Likelihood of Exploit

Likelihood: High

+ Methods of Attack
  • Protocol Manipulation
  • Injection
  • Brute Force
+ Examples-Instances

Description

Footprinting can be executed over almost any protocol including HTTP, TCP, UDP, and ICMP, with the general goal of gaining further information about a host environment to launch further attacks. By appending a malicious script to an otherwise normal looking URL, the attacker can probe the sysem for banners, vulnerabilities, filenames, available services, and in short anything the host process has access to. The results of the probe are either used to execute additional javascript (for example, if the attacker's footprint script identifies a vulnerability in a firewall permission, then the client side script executes a javascript to change client firewall settings, or an attacker may simply echo the results of the scan back out to a remote host for targeting future attacks).

+ Attacker Skills or Knowledge Required

Skill or Knowledge Level: Medium

To land and launch a script on victim's machine with appropriate footprinting logic for enumerating services and vulnerabilities in Javascript

+ Solutions and Mitigations

Design: Use browser technologies that do not allow client side scripting.

Design: Utilize strict type, character, and encoding enforcement

Implementation: Ensure all content that is delivered to client is sanitized against an acceptable content specification.

Implementation: Perform input validation for all remote content.

Implementation: Perform output validation for all remote content.

Implementation: Disable scripting languages such as Javascript in browser

Implementation: Patching software. There are many attack vectors for XSS on the client side and the server side. Many vulnerabilities are fixed in service packs for browser, web servers, and plug in technologies, staying current on patch release that deal with XSS countermeasures mitigates this.

+ Attack Motivation-Consequences
  • Information Leakage
+ Injection Vector

Payload delivered through standard communication protocols, such as Ajax application.

+ Payload

Command(s) executed directly on host

+ Activation Zone

Client machine and client network

+ Payload Activation Impact

Enables attacker to execute probes against client system.

+ Related Weaknesses
CWE-IDWeakness NameWeakness Relationship Type
79Failure to Preserve Web Page Structure ('Cross-site Scripting')Targeted
113Failure to Sanitize CRLF Sequences in HTTP Headers ('HTTP Response Splitting')Targeted
348Use of Less Trusted SourceTargeted
96Improper Neutralization of Directives in Statically Saved Code ('Static Code Injection')Targeted
20Improper Input ValidationTargeted
116Improper Encoding or Escaping of OutputTargeted
184Incomplete BlacklistSecondary
86Improper Neutralization of Invalid Characters in Identifiers in Web PagesSecondary
712OWASP Top Ten 2007 Category A1 - Cross Site Scripting (XSS)Targeted
692Incomplete Blacklist to Cross-Site ScriptingTargeted
+ Related Attack Patterns
NatureTypeIDNameDescriptionView(s) this relationship pertains toView\(s\)
ChildOfAttack PatternAttack Pattern169Footprinting 
Mechanism of Attack (primary)1000
+ Purposes
  • Reconnaissance
+ CIA Impact
Confidentiality Impact: HighIntegrity Impact: LowAvailability Impact: Low
+ Technical Context
Architectural Paradigms
Client-Server
SOA
Frameworks
All
Platforms
All
Languages
AJAX
+ References

Shreeraj Shah, "Ajax footprinting for Web 2.0 applications", http://www.net-security.org/dl/articles/Ajax_fingerprinting.pdf

+ Content History
Submissions
SubmitterDateComments
Gunnar Peterson2007-02-28
Modifications
ModifierOrganizationDateComments
Sean BarnumCigital, Inc2007-03-07Review and revise