what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Java.com Cross Site Scripting

Java.com Cross Site Scripting
Posted Apr 1, 2015
Authored by Yann CAM

Java.com suffered from multiple cross site scripting vulnerabilities.

tags | exploit, java, vulnerability, xss
SHA-256 | f43f2c501c3edc319bb1b75fa7176fd0ea09edceb2d1d23e7062ae9c772ff818

Java.com Cross Site Scripting

Change Mirror Download
######################################################################
# Exploit Title: Java.com RXSS and DOM-XSS
# Date: 01/04/2015
# Author: Yann CAM @ Synetis - ASafety
# Vendor or Software Link: www.java.com
# Version: /
# Category: Reflected Cross Site Scripting and DOM based XSS
# Google dork:
# Tested on: Java.com main domain
######################################################################

Java description :
======================================================================

As of 2015, Java is one of the most popular programming languages in use, particularly for client-server web applications, with a reported 9 million developers.
Java was originally developed by James Gosling at Sun Microsystems (which has since been acquired by Oracle Corporation) and released in 1995 as a core component
of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++, but it has fewer low-level facilities than either of them.
Java.com is the main website to acquire Java JRE or JDK software.


RXSS Vulnerability description - PoC n°1 :
======================================================================
A reflected XSS is available in the java.com main domain.
Through this vulnerability, an attacker could tamper with page rendering, redirect victims to fake Java portals, or capture Java's users credentials such cookies.
It's also possible to forge a fake Java's page with this XSS to provide a backdoored version of softwares to users.
This reflected XSS is on GET "n" variable and is not properly sanitized before being used to his page.

Tested on Firefox 32.0.

PoC:

https://www.java.com/fr/download/faq/index_general.xml?n=20">2</a><script>alert(/Yann CAM @ASafety - www.synetis.com/);</script>

All language template pages (/fr/ and others) are impacted.


DOM-XSS Vulnerability description - PoC n°2 :
======================================================================

A reflected DOM-XSS is available in the java.com main domain.
Through this vulnerability, an attacker could tamper with page rendering, redirect victims to fake Java portals, or capture Java's users credentials such cookies.
It's also possible to forge a fake Java's page with this XSS to provide a backdoored version of softwares to users.
This reflected XSS is based on the interpretation of the URL in the page.

Java.com online documentation provide a "printer icon" to access to the same documentation page but specially designed for printing.
This mechanism is provided by the GET param added to the url "?printFriendly=true".

http://java.com/fr/download/help/uninstall_needolder.xml?printFriendly=true

The page include his own URL (without GET param nor anchor) in the header. This is done by the JS code in the HTML source :

<script type='text/javascript'>document.write(document.location.href.split('?')[0]);</script>

Through this JS code, it's possible to inject Javascript into the page before the "?" char.
To add some javascript before this char without breaking the filename "uninstall_needolder.xml", it's possible to use the "%0a%0d" (\r\n) vector :

uninstall_needolder.xml%0a%0d<script>alert(/Yann_CAM_@ASafety_www.synetis.com/);</script>?printFriendly=true

Tested on Internet Explorer 6.0 (modern browsers not affected).

PoC:

http://java.com/fr/download/help/uninstall_needolder.xml%0a%0d<script>alert(/Yann_CAM_@ASafety_www.synetis.com/);</script>?printFriendly=true


Screenshots :
======================================================================

- http://www.asafety.fr/data/20141025-java.com_DOMXSS-01.png
- http://www.asafety.fr/data/20141025-java.com_DOMXSS-02.png
- http://www.asafety.fr/data/20141025-java.com_DOMXSS-03.png
- http://www.asafety.fr/data/20141025-java.com_Reflected_XSS-01.png
- http://www.asafety.fr/data/20141025-java.com_Reflected_XSS-02.png


Solution:
======================================================================

Fixed by Oracle/Java Security Team.


Additional resources :
======================================================================

- http://www.java.com/
- http://www.oracle.com/
- http://www.oracle.com/technetwork/topics/security/cpujan2015-1972971.html
- http://www.asafety.fr/actualites-news/contribution-java-com-dom-xss-reflected-xss
- http://www.synetis.com


Report timeline :
======================================================================

2014-10-25 : Oracle/Java Team alerted with details and PoC.
2014-10-27 : Oracle/Java response and confirm vulnerabilities.
2014-12-23 : Vulnerabilities seems to be fixed.
2015-04-01 : Public advisory

Credits :
======================================================================

88888888
88 888 88 88
888 88 88
788 Z88 88 88.888888 8888888 888888 88 8888888.
888888. 88 88 888 Z88 88 88 88 88 88 88
8888888 88 88 88 88 88 88 88 88 888
888 88 88 88 88 88888888888 88 88 888888
88 88 88 8. 88 88 88 88 88 888
888 ,88 8I88 88 88 88 88 88 88 .88 .88
?8888888888. 888 88 88 88888888 8888 88 =88888888
888. 88
88 www.synetis.com
8888 Consulting firm in management and information security

Yann CAM - Security Consultant @ Synetis | ASafety

--
SYNETIS | ASafety
CONTACT: www.synetis.com | www.asafety.fr

Login or Register to add favorites

File Archive:

July 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jul 1st
    27 Files
  • 2
    Jul 2nd
    10 Files
  • 3
    Jul 3rd
    35 Files
  • 4
    Jul 4th
    27 Files
  • 5
    Jul 5th
    18 Files
  • 6
    Jul 6th
    0 Files
  • 7
    Jul 7th
    0 Files
  • 8
    Jul 8th
    28 Files
  • 9
    Jul 9th
    44 Files
  • 10
    Jul 10th
    24 Files
  • 11
    Jul 11th
    25 Files
  • 12
    Jul 12th
    11 Files
  • 13
    Jul 13th
    0 Files
  • 14
    Jul 14th
    0 Files
  • 15
    Jul 15th
    28 Files
  • 16
    Jul 16th
    6 Files
  • 17
    Jul 17th
    34 Files
  • 18
    Jul 18th
    6 Files
  • 19
    Jul 19th
    34 Files
  • 20
    Jul 20th
    0 Files
  • 21
    Jul 21st
    0 Files
  • 22
    Jul 22nd
    19 Files
  • 23
    Jul 23rd
    17 Files
  • 24
    Jul 24th
    47 Files
  • 25
    Jul 25th
    31 Files
  • 26
    Jul 26th
    0 Files
  • 27
    Jul 27th
    0 Files
  • 28
    Jul 28th
    0 Files
  • 29
    Jul 29th
    0 Files
  • 30
    Jul 30th
    0 Files
  • 31
    Jul 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close