CAPEC-86, XSS, Cross Site Scripting, favicon.ico, splashpage.mtv.com

XSS DORK for favicon.ico, CAPEC-86: Embedding Script (XSS ) in HTTP Headers

Report generated by CloudScan Vulnerability Crawler at Mon Feb 14 10:04:31 CST 2011.


The DORK Report

Loading

1. Cross-site scripting (reflected)

2. Flash cross-domain policy

3. Robots.txt file

4. Content type incorrectly stated



1. Cross-site scripting (reflected)  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://splashpage.mtv.com
Path:   /favicon.ico

Issue detail

The value of REST URL parameter 1 is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 3ad54</script><script>alert(1)</script>ddbab9eb078 was submitted in the REST URL parameter 1. This input was echoed unmodified in the application's response.

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

Remediation detail

Echoing user-controllable data within 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.

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.

Remediation background

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

Request

GET /favicon.ico3ad54</script><script>alert(1)</script>ddbab9eb078 HTTP/1.1
Host: splashpage.mtv.com
Proxy-Connection: keep-alive
Referer: http://clutch.mtv.com/24d989%3C/script%3E%3Cscript%3Ealert(document.cookie)%3C/script%3E38a049cb2c7
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.98 Safari/534.13
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: mtvn_guid=1297527364-309; __qca=P0-1103908855-1297527452750; s_nr=1297527458235; mbox=check#true#1297536208|session#1297536147898-22419#1297538008

Response

HTTP/1.1 404 Not Found
Server: Apache/2
X-Powered-By: PHP/5.2.8
X-Pingback: http://splashpage.mtv.com/xmlrpc.php
Last-Modified: Sat, 12 Feb 2011 18:42:12 GMT
Pragma: no-cache
X-Cache-Term: short
Content-Type: text/html; charset=UTF-8
Cache-Control: must-revalidate, max-age=600
Expires: Sat, 12 Feb 2011 18:52:12 GMT
Date: Sat, 12 Feb 2011 18:42:12 GMT
Connection: close
Vary: Accept-Encoding
Connection: Transfer-Encoding
Set-Cookie: ak-mobile-detected=no; expires=Sun, 13-Feb-2011 00:42:12 GMT; path=/
Vary: User-Agent
Content-Length: 34754


<!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" dir="ltr" lang="en-US">
<head p
...[SNIP]...
<script type="text/javascript">
mtvn.btg.Controller.sendPageCall( {
    pageName: 'BLOGS/splashpage/favicon.ico3ad54</script><script>alert(1)</script>ddbab9eb078',
    channel: 'BLOGS',
    hier1: 'BLOGS/splashpage/favicon.ico3ad54</script>
...[SNIP]...

2. Flash cross-domain policy  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://splashpage.mtv.com
Path:   /crossdomain.xml

Issue detail

The application publishes a Flash cross-domain policy which allows access from any domain.

Allowing access from all domains means that any domain can perform two-way interaction with this application. Unless the application consists entirely of unprotected public content, this policy is likely to present a significant security risk.

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: splashpage.mtv.com

Response

HTTP/1.0 200 OK
Server: Apache/2
Last-Modified: Thu, 20 May 2010 15:37:31 GMT
ETag: "1bc7071-112-487085a4804c0"
Accept-Ranges: bytes
Content-Length: 274
Content-Type: application/xml
Cache-Control: max-age=600
Date: Sat, 12 Feb 2011 18:42:06 GMT
Connection: close
Set-Cookie: ak-mobile-detected=no; expires=Sun, 13-Feb-2011 00:42:06 GMT; path=/
Vary: User-Agent

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
   <allow-access-from domain="*" secure="false" />
   <allow-
...[SNIP]...

3. Robots.txt file  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://splashpage.mtv.com
Path:   /favicon.ico

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: splashpage.mtv.com

Response

HTTP/1.0 200 OK
Server: Apache/2
Last-Modified: Fri, 13 Aug 2010 19:03:49 GMT
ETag: "116ab6c-4b-48db924942f40"
Accept-Ranges: bytes
Content-Length: 75
Content-Type: text/plain
Cache-Control: max-age=1800
Date: Sat, 12 Feb 2011 18:42:06 GMT
Connection: close
Set-Cookie: ak-mobile-detected=no; expires=Sun, 13-Feb-2011 00:42:06 GMT; path=/
Vary: User-Agent

User-agent: *
Disallow: /wp-admin/
Sitemap: /wp-content/uploads/sitemap.xml

4. Content type incorrectly stated  previous

Summary

Severity:   Information
Confidence:   Firm
Host:   http://splashpage.mtv.com
Path:   /wp-content/themes/charlie_default/community/flux.inc

Issue detail

The response contains the following Content-type statement:The response states that it contains plain text. However, it actually appears to contain script.

Issue background

If a web response specifies an incorrect content type, then browsers may process the response in unexpected ways. If the specified content type is a renderable text-based format, then the browser will usually attempt to parse and render the response in that format. If the specified type is an image format, then the browser will usually detect the anomaly and will analyse the actual content and attempt to determine its MIME type. Either case can lead to unexpected results, and if the content contains any user-controllable data may lead to cross-site scripting or other client-side vulnerabilities.

In most cases, the presence of an incorrect content type statement does not constitute a security flaw, particularly if the response contains static content. You should review the contents of the response and the context in which it appears to determine whether any vulnerability exists.

Issue remediation

For every response containing a message body, the application should include a single Content-type header which correctly and unambiguously states the MIME type of the content in the response body.

Request

GET /wp-content/themes/charlie_default/community/flux.inc HTTP/1.1
Host: splashpage.mtv.com
Proxy-Connection: keep-alive
Referer: http://splashpage.mtv.com/favicon.ico3ad54%3C/script%3E%3Cscript%3Ealert(document.cookie)%3C/script%3Eddbab9eb078
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.98 Safari/534.13
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: mtvn_guid=1297527364-309; __qca=P0-1103908855-1297527452750; s_nr=1297527458235; ak-mobile-detected=no; mbox=session#1297536147898-22419#1297538883|check#true#1297537083

Response

HTTP/1.1 200 OK
Server: Apache/2
Last-Modified: Tue, 04 May 2010 20:21:18 GMT
ETag: "1d85029-2a0-485ca73b56b80"
Accept-Ranges: bytes
Content-Length: 672
Content-Type: text/plain
Date: Sat, 12 Feb 2011 18:56:36 GMT
Connection: close
Vary: User-Agent

// active click through on flux comment count
$j(function(){

$j('#posts .post .post_footer .commentCount .txtLabel').live('mouseover', function(){
$j(this).css({
'text-decoration':'unde
...[SNIP]...

Report generated by CloudScan Vulnerability Crawler at Mon Feb 14 10:04:31 CST 2011.