Report generated by XSS.CX at Fri Nov 19 21:20:17 CST 2010.


Cross Site Scripting Reports | Hoyt LLC Research

1. HTTP header injection

Loading

2. Cross-site scripting (reflected)



1. HTTP header injection  next

Summary

Severity:   High
Confidence:   Certain
Host:   https://auth.verizon.com
Path:   /amserver/UI/Login

Issue detail

The value of the goto request parameter is copied into the Location response header. The payload 468b3%0d%0ae6a869cb573 was submitted in the goto parameter. This caused a response containing an injected HTTP header.

Issue background

HTTP header injection vulnerabilities arise when user-supplied data is copied into a response header in an unsafe way. If an attacker can inject newline characters into the header, then they can inject new HTTP headers and also, by injecting an empty line, break out of the headers into the message body and write arbitrary content into the application's response.

Various kinds of attack can be delivered via HTTP header injection vulnerabilities. Any attack that can be delivered via cross-site scripting can usually be delivered via header injection, because the attacker can construct a request which causes arbitrary JavaScript to appear within the response body. Further, it is sometimes possible to leverage header injection vulnerabilities to poison the cache of any proxy server via which users access the application. Here, an attacker sends a crafted request which results in a "split" response containing arbitrary content. If the proxy server can be manipulated to associate the injected response with another URL used within the application, then the attacker can perform a "stored" attack against this URL which will compromise other users who request that URL in future.

Issue remediation

If possible, applications should avoid copying user-controllable data into HTTP response headers. If this is unavoidable, then the data should be strictly validated to prevent header injection attacks. In most situations, it will be appropriate to allow only short alphanumeric strings to be copied into headers, and any other input should be rejected. At a minimum, input containing any characters with ASCII codes less than 0x20 should be rejected.

Request

GET /amserver/UI/Login?realm=dotcom&module=AIAW&clientId=myvz&goto=468b3%0d%0ae6a869cb573 HTTP/1.1
Host: auth.verizon.com
Connection: keep-alive
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: RegistrationApp=SessionId=8d2315d0-c961-442f-b3ac-b606fe73e7e0; VZGEO=west; vzAppID=; V347=CT-2; LOB_CATEGORY=; Product=A; ProductXML=A; vzpers=STATE=TX; vzapps=STATE=TX; CustTrackPage=GHP; RecentlyVisitedOffers=fios_fiftv_dp,FiOS Double Play,69.99*/^; BusinessUnit=business; op629myverizongum=a01502v07o26bkl00b6l5126bkl00k6ns7d46; op629myverizonliid=a01502v07o26bkl00b6l5126bkl00k6ns7d46; myservices=vzdock=N; MediaSelectionCookie=A=&B=&C=nr2liYUIqsVUTefrms4XwUMiIG0Q0WQ8Vfky/1Ou14xUdaKgrLESuL7oVYJFcmRnYCQjNuRbl0c=&D=Kxbc9cX1IJa2k8/FjKMZXg==&E=&F=&G=&H=&I=

Response

HTTP/1.1 302 Moved Temporarily
Server: Sun-ONE-Web-Server/6.1
Date: Sat, 20 Nov 2010 02:15:45 GMT
Content-length: 0
Content-type: text/html
P3P: policyref="/w3c/p3p.xml", CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
Cache-control: private
Pragma: no-cache
X-dsameversion: 7 2005Q4 patch5 (Tue Feb 27 17:18:03 2007) SunOS
Am_client_type: genericHTML
Location: https://www22.verizon.com/myverizon/?session=n&goto=468b3
e6a869cb573

Set-cookie: JSESSIONID=551CF2532820EFDFFF319A43015D9990;Path=/
Set-cookie: AMAuthCookie=AQIC5wM2LY4SfcyLSw2AprZCxoQFFnJupN9A%2FsDZ3JgYIpY%3D%40AAJTSQACNjkAAlMxAAIwMw%3D%3D%23;Domain=.verizon.com;Path=/
Set-cookie: amlbcookie=03;Domain=.verizon.com;Path=/
Set-cookie: AMAuthCookie=LOGOUT;Domain=.verizon.com;Expires=Thu, 01-Jan-1970 00:00:10 GMT;Path=/
Connection: close


2. Cross-site scripting (reflected)  previous

Summary

Severity:   High
Confidence:   Firm
Host:   https://auth.verizon.com
Path:   /amserver/UI/Login

Issue detail

The value of the goto request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 8af9a"%3b4024f132588 was submitted in the goto parameter. This input was echoed as 8af9a";4024f132588 in the application's response.

This behaviour demonstrates that it is possible to terminate the JavaScript string into which our data is being copied. An attempt was made to identify a full proof-of-concept attack for injecting arbitrary JavaScript but this was not successful. You should manually examine the application's behaviour and attempt to identify any unusual input validation or other obstacles that may be in place.

Note that a redirection occurred between the attack request and the response containing the echoed input. It is necessary to follow this redirection for the attack to succeed. When the attack is carried out via a browser, the redirection will be followed automatically.

Remediation detail

Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context.

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 organisation. 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 organisation 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 organisation 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.

Remediation background

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 /amserver/UI/Login?realm=dotcom&module=AIAW&clientId=myvz&goto=https%3A%2F%2Fwww22.verizon.com%3A443%2FForYourHome%2FMyAccount%2FProtected%2FServices%2FMyServices.aspx8af9a"%3b4024f132588 HTTP/1.1
Host: auth.verizon.com
Connection: keep-alive
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: RegistrationApp=SessionId=8d2315d0-c961-442f-b3ac-b606fe73e7e0; VZGEO=west; vzAppID=; V347=CT-2; LOB_CATEGORY=; Product=A; ProductXML=A; vzpers=STATE=TX; vzapps=STATE=TX; CustTrackPage=GHP; RecentlyVisitedOffers=fios_fiftv_dp,FiOS Double Play,69.99*/^; BusinessUnit=business; op629myverizongum=a01502v07o26bkl00b6l5126bkl00k6ns7d46; op629myverizonliid=a01502v07o26bkl00b6l5126bkl00k6ns7d46; myservices=vzdock=N; MediaSelectionCookie=A=&B=&C=nr2liYUIqsVUTefrms4XwUMiIG0Q0WQ8Vfky/1Ou14xUdaKgrLESuL7oVYJFcmRnYCQjNuRbl0c=&D=Kxbc9cX1IJa2k8/FjKMZXg==&E=&F=&G=&H=&I=

Response (redirected)

HTTP/1.1 200 OK
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
ETag:
X-Powered-By: ASP.NET
Content-Type: text/html
Cache-Control: private, max-age=7200
Date: Sat, 20 Nov 2010 02:15:21 GMT
Connection: keep-alive
Connection: Transfer-Encoding
Set-Cookie: ASPSESSIONIDSCSBQTCB=EHCLJDFBFEEGFCIFCBIGJOAL; path=/
Set-Cookie: NSC_xxx22_tqmbu_mcw=ffffffff895bc66b45525d5f4f58455e445a4a423660;path=/
Set-Cookie: ak-sf=false; expires=Sat, 20-Nov-2010 02:20:21 GMT; path=/myverizon/; domain=verizon.com
Content-Length: 129007

<!-- Vignette V6 Fri Nov 19 18:15:20 2010 -->

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Verizon | My Verizon Sign In - Online Account Management</title>
...[SNIP]...
   window.location.href="http://www22.verizon.com/Foryourhome/MyAccount/Unprotected/UserManagement/Login/Login.aspx?goto=https://www22.verizon.com/ForYourHome/MyAccount/Protected/Services/MyServices.aspx8af9a";4024f132588";
}

function fnSetSessionCookie(name,value,path,domain){
   document.cookie=name+"="+escape(value)+((path)?";path="+path:"")+((domain)?";domain="+domain:"");
}
var strRemOpt="";
var strMyVzCom=f
...[SNIP]...

Report generated by XSS.CX at Fri Nov 19 21:20:17 CST 2010.