XSS, Reflected Cross Site Scripting, CWE-79, CAPEC-86, www.walmartstores.com
Report generated at Sat Sep 01 08:32:42 EDT 2012.International in scope and free for public use
XSS.Cx is a Crawler and Injection Reporting Tool
1. Cross-site scripting (reflected)
1.1. http://walmartstores.com/Search/ [fd parameter]
1.2. http://walmartstores.com/Search/ [q parameter]
1.3. http://walmartstores.com/Search/ [q parameter]
1.4. http://walmartstores.com/Search/ [t parameter]
1.5. http://walmartstores.com/Search/ [t parameter]
1.6. http://walmartstores.com/error.aspx [aspxerrorpath parameter]
1. Cross-site scripting (reflected)
There are 6 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 organization. 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 organization 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 organization 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:- Input should be validated as strictly as possible on arrival, given the kind of content which it is expected to contain. For example, personal names should consist of alphabetical and a small range of typographical characters, and be relatively short; a year of birth should consist of exactly four numerals; email addresses should match a well-defined regular expression. Input which fails the validation should be rejected, not sanitized.
- User input should be HTML-encoded at any point where it is copied into application responses. All HTML metacharacters, including < > " ' and =, should be replaced with the corresponding HTML entities (< > etc).
1.1. http://walmartstores.com/Search/ [fd parameter] next
Summary
Severity: | High |
Confidence: | Certain |
Host: | http://walmartstores.com |
Path: | /Search/ |
Issue detail
The value of the fd request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 25543%2522%253eThis proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
The application attempts to block certain characters that are often used in XSS attacks but this can be circumvented by double URL-encoding the required characters - for example, by submitting %253c instead of the < character.
Remediation detail
There is probably no need to perform a second URL-decode of the value of the fd request parameter as the web server will have already carried out one decode. In any case, the application should perform its input validation after any custom canonicalisation has been carried out.Request
GET /Search/?q=shareholder Host: walmartstores.com Proxy-Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7 Accept: text/html,application Referer: http://walmartstores.com Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,* Cookie: ihtfontsize=1; s_vi=[CS]v1|277E4A04 Content-Length: 10 |
Response
HTTP/1.1 200 OK Cache-Control: public, max-age=300 Content-Type: text/html; charset=utf-8 Expires: Thu, 29 Dec 2011 16:29:46 GMT Last-Modified: Thu, 29 Dec 2011 16:24:46 GMT Vary: * Server: Microsoft-IIS/7.0 X-AspNet-Version: 2.0.50727 X-Powered-By: ASP.NET Node: wweb1b Date: Thu, 29 Dec 2011 16:24:46 GMT Content-Length: 24363 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR <html xmlns="http://www.w3.org <head id="ctl00_hdMaster" ...[SNIP]... _cphContent_txtSearchTop' ...[SNIP]... |
1.2. http://walmartstores.com/Search/ [q parameter] previous next
Summary
Severity: | High |
Confidence: | Certain |
Host: | http://walmartstores.com |
Path: | /Search/ |
Issue detail
The value of the q request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload a6420\"%3balert(1)/This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
The application attempts to prevent termination of the quoted JavaScript string by placing a backslash character (\) before any quotation mark characters contained within the input. The purpose of this defence is to escape the quotation mark and prevent it from terminating the string. However, the application fails to escape any backslash characters that already appear within the input itself. This enables an attacker to supply their own backslash character before the quotation mark, which has the effect of escaping the backslash character added by the application, and so the quotation mark remains unescaped and succeeds in terminating the string. This technique is used in the attack demonstrated.
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. If it is unavoidable to echo user input into a quoted JavaScript string the the backslash character should be blocked, or escaped by replacing it with two backslashes.Request
GET /Search/?q=shareholder Host: walmartstores.com Proxy-Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7 Accept: text/html,application Referer: http://walmartstores.com Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,* Cookie: ihtfontsize=1; s_vi=[CS]v1|277E4A04 Content-Length: 10 |
Response
HTTP/1.1 200 OK Cache-Control: public, max-age=300 Content-Type: text/html; charset=utf-8 Expires: Thu, 29 Dec 2011 16:29:26 GMT Last-Modified: Thu, 29 Dec 2011 16:24:26 GMT Vary: * Server: Microsoft-IIS/7.0 X-AspNet-Version: 2.0.50727 X-Powered-By: ASP.NET Node: wweb1b Date: Thu, 29 Dec 2011 16:24:26 GMT Content-Length: 22453 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR <html xmlns="http://www.w3.org <head id="ctl00_hdMaster" ...[SNIP]... <!-- s.pageName = "Search"; s.prop7 = "shareholder meeting 2012 location phone contacta6420\\";alert(1)/ s.prop22 = "All Results"; s.prop10 = "Search"; s.prop17 = "walmartstores.com"; s.prop21 = g_customProp21; /************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/ var s_code=s.t( ...[SNIP]... |
1.3. http://walmartstores.com/Search/ [q parameter] previous next
Summary
Severity: | High |
Confidence: | Certain |
Host: | http://walmartstores.com |
Path: | /Search/ |
Issue detail
The value of the q request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload d248c%2522%253eThis proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
The application attempts to block certain characters that are often used in XSS attacks but this can be circumvented by double URL-encoding the required characters - for example, by submitting %253c instead of the < character.
Remediation detail
There is probably no need to perform a second URL-decode of the value of the q request parameter as the web server will have already carried out one decode. In any case, the application should perform its input validation after any custom canonicalisation has been carried out.Request
GET /Search/?q=shareholder Host: walmartstores.com Proxy-Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7 Accept: text/html,application Referer: http://walmartstores.com Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,* Cookie: ihtfontsize=1; s_vi=[CS]v1|277E4A04 Content-Length: 10 |
Response
HTTP/1.1 200 OK Cache-Control: public, max-age=300 Content-Type: text/html; charset=utf-8 Expires: Thu, 29 Dec 2011 16:29:20 GMT Last-Modified: Thu, 29 Dec 2011 16:24:20 GMT Vary: * Server: Microsoft-IIS/7.0 X-AspNet-Version: 2.0.50727 X-Powered-By: ASP.NET Node: wweb1b Date: Thu, 29 Dec 2011 16:24:19 GMT Content-Length: 22615 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR <html xmlns="http://www.w3.org <head id="ctl00_hdMaster" ...[SNIP]... <a href="javascript:void(0); ...[SNIP]... |
1.4. http://walmartstores.com/Search/ [t parameter] previous next
Summary
Severity: | High |
Confidence: | Certain |
Host: | http://walmartstores.com |
Path: | /Search/ |
Issue detail
The value of the t request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload fff80%2522%253eThis proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
The application attempts to block certain characters that are often used in XSS attacks but this can be circumvented by double URL-encoding the required characters - for example, by submitting %253c instead of the < character.
Remediation detail
There is probably no need to perform a second URL-decode of the value of the t request parameter as the web server will have already carried out one decode. In any case, the application should perform its input validation after any custom canonicalisation has been carried out.Request
GET /Search/?q=shareholder Host: walmartstores.com Proxy-Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7 Accept: text/html,application Referer: http://walmartstores.com Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,* Cookie: ihtfontsize=1; s_vi=[CS]v1|277E4A04 Content-Length: 10 |
Response
HTTP/1.1 200 OK Cache-Control: public, max-age=300 Content-Type: text/html; charset=utf-8 Expires: Thu, 29 Dec 2011 16:29:51 GMT Last-Modified: Thu, 29 Dec 2011 16:24:51 GMT Vary: * Server: Microsoft-IIS/7.0 X-AspNet-Version: 2.0.50727 X-Powered-By: ASP.NET Node: Web2b Date: Thu, 29 Dec 2011 16:24:51 GMT Content-Length: 24619 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR <html xmlns="http://www.w3.org <head id="ctl00_hdMaster" ...[SNIP]... k="$('#ctl00_cphContent ...[SNIP]... |
1.5. http://walmartstores.com/Search/ [t parameter] previous next
Summary
Severity: | High |
Confidence: | Certain |
Host: | http://walmartstores.com |
Path: | /Search/ |
Issue detail
The value of the t request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 8846e%2527%253balertThis proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
The application attempts to block certain characters that are often used in XSS attacks but this can be circumvented by double URL-encoding the required characters - for example, by submitting %253c instead of the < character.
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. There is probably no need to perform a second URL-decode of the value of the t request parameter as the web server will have already carried out one decode. In any case, the application should perform its input validation after any custom canonicalisation has been carried out.Request
GET /Search/?q=shareholder Host: walmartstores.com Proxy-Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7 Accept: text/html,application Referer: http://walmartstores.com Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,* Cookie: ihtfontsize=1; s_vi=[CS]v1|277E4A04 Content-Length: 10 |
Response
HTTP/1.1 200 OK Cache-Control: public, max-age=300 Content-Type: text/html; charset=utf-8 Expires: Thu, 29 Dec 2011 16:29:33 GMT Last-Modified: Thu, 29 Dec 2011 16:24:33 GMT Vary: * Server: Microsoft-IIS/7.0 X-AspNet-Version: 2.0.50727 X-Powered-By: ASP.NET Node: wweb1b Date: Thu, 29 Dec 2011 16:24:33 GMT Content-Length: 24365 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR <html xmlns="http://www.w3.org <head id="ctl00_hdMaster" ...[SNIP]... <script type="text/javascript"> var g_tab = 'a8846e';alert(1)/ var g_collection = 'all_collection'; </script> ...[SNIP]... |
1.6. http://walmartstores.com/error.aspx [aspxerrorpath parameter] previous
Summary
Severity: | High |
Confidence: | Certain |
Host: | http://walmartstores.com |
Path: | /error.aspx |
Issue detail
The value of the aspxerrorpath request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload bb3e4"%3balert(1)/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 /error.aspx?aspxerrorpath x-requested-with: XMLHttpRequest Accept-Language: en-us Referer: http://walmartstores.com Accept: application/json, text/javascript, */* Accept-Encoding: gzip, deflate User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0) Host: walmartstores.com Proxy-Connection: Keep-Alive Cookie: ihtfontsize=1; s_cc=true; s_sq=%5B%5BB%5D%5D; s_vi=[CS]v1|277E4CED Content-Length: 10 |
Response
HTTP/1.1 200 OK Cache-Control: private Content-Type: text/html; charset=utf-8 Server: Microsoft-IIS/7.0 X-UA-Compatible: IE=8 X-AspNet-Version: 2.0.50727 X-Powered-By: ASP.NET Node: wweb1b Date: Thu, 29 Dec 2011 17:19:43 GMT Content-Length: 10339 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR <html xmlns="http://www.w3.org <head id="ctl00_hdMaster" ...[SNIP]... <!-- s.pageName = ""; s.prop18 = "/Svc/Search.aspx s.prop17 = "walmartstores.com"; s.prop21 = g_customProp21; /************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/ var s_code=s.t();if(s_code ...[SNIP]... |
Report generated by HTI at Sat Sep 01 08:49:59 EDT 2012.