Document Title: =============== FortiManager (Series) - (Bookmark) Persistent Vulnerability References (Source): ==================== http://www.vulnerability-lab.com/get_content.php?id=1685 Fortinet PSIRT ID: 1624461 Release Notes 1: http://docs.fortinet.com/uploaded/files/2499/fortios-5.0.12-release-notes.pdf Release Notes 2: http://docs.fortinet.com/uploaded/files/2861/fortios-v5.2.6-release-notes.pdf Release Notes 3: http://docs.fortinet.com/uploaded/files/3075/fortios-v5.4.1-release-notes.pdf Release Date: ============= 2016-08-04 Vulnerability Laboratory ID (VL-ID): ==================================== 1685 Common Vulnerability Scoring System: ==================================== 3.8 Product & Service Introduction: =============================== FortiManager appliances allow you to centrally manage any number of Fortinet devices, from several to thousands, including FortiGateA(r), FortiWiFiaC/, FortiCarrieraC/, FortiMailaC/ and FortiAnalyzeraC/ appliances and virtual appliances, as well as FortiClientaC/ endpoint security agents. You can further simplify control and management of large deployments by grouping devices and agents into administrative domains (ADOMs). The FortiManager family of management appliances provides centralized policy-based provisioning, device configuration, and update management for FortiGate, FortiWiFi, and FortiMail appliances, and FortiClient end-point security agents, plus end-to-end network monitoring and device control. FortiManager delivers a lower TCO for Fortinet implementations by minimizing both initial deployment costs and ongoing operating expenses. Control administrative access and simplify policy deployment using role-based administration to define user privileges for specific management domains and functions, and aggregating collections of Fortinet appliances and agents into independent management domains. In addition, by locally hosting security content updates for managed devices and agents, FortiManager appliances minimize Web filtering rating request response time and maximize network protection. (Copy of the Vendor Homepage: http://www.avfirewalls.com/FortiManager-Series.asp ) Abstract Advisory Information: ============================== The Vulnerability Laboratory Core Research Team discovered a persistent web validation vulnerability in the official Fotinet FortiManager appliance product series. The issue affects the web-application of the appliance series and is present in the following fortimanager models - 200D, 300D, 1000D, 3900E, 4000E, Virtual Appliances Version and FortiMoM-VM. The Fortimanager legacy models 100, 100C, 400A, 400B, 400C, 1000C, 3000C and 4000D are affected as well by the vulnerability. Persistent Web Vulnerability Disclosure Timeline: ================================== 2016-01-25: Researcher Notification & Coordination (Benjamin Kunz Mejri - Evolution Security GmbH) 2016-01-26: Vendor Notification (FortiGuard Security Team) 2016-02-15: Vendor Response/Feedback (FortiGuard Security Team) 2016-04-08: Vendor Fix/Patch (Fortinet Developer Team) 2016-05-22: Vendor Fix/Patch (Fortinet Developer Team) 2016-07-13: Security Bulletin (FortiGuard Security Team) [Acknowledgements] 2016-08-04: Public Disclosure (Vulnerability Laboratory) Discovery Status: ================= Published Affected Product(s): ==================== Fortinet Product: FortiManager - Appliance (Web-Application) 200D, 300D, 1000D, 3900E, 4000E, Virtual Appliances Versio Fortinet Product: FortiManager - Appliance (Web-Application) Legacy - 100, 100C, 400A, 400B, 400C, 1000C, 3000C & 4000 Exploitation Technique: ======================= Remote Severity Level: =============== Medium Technical Details & Description: ================================ A persistent and non-persistent input validation web vulnerability has been discovered in the official Fotinet FortiManager appliance product series. The vulnerability allows privileged guest user accounts and restricted user accounts to inject own malicious script codes on the application-side or client-side of the fortimanager appliance web-application series. The vulnerability is located in the `name and description` input fields of the vulnerable `Policy & Objects - Security Profiles - SSL VPN Portal` module. The request method to inject is POST to GET and the attack vector is located on the application-side of the appliance web-application. Remote attackers are able to inject own malicious script codes to the name and description input fields. After processing to add, the code bypasses the regular web filter of the appliance web-application and executes finally in the pre-defined bookmarks listing module above with the basic input. The vulnerability can be exploited by guest appliance user accounts with restricted access. The vulnerability first executes with client-side attack vector and becomes persistent with the save procedure by return. The security risk of the application-side and client-side web vulnerability is estimated as medium with a cvss (common vulnerability scoring system) count of 3.8. Exploitation of the application-side web vulnerability requires a low privileged guest web-application user account and low user interaction. Successful exploitation of the vulnerability results in persistent phishing, session hijacking, persistent external redirect to malicious sources and application-side manipulation of affected or connected web module context. Request Method(s): [+] POST Vulnerable Module(s): [+] Policy & Objects - Security Profiles - SSL VPN Portal Vulnerable Parameter(s): [+] name [+] description Affected Module(s): [+] Predefined Bookmarks - [Create] Listing Affected Serie(s): FortiManager [+] FortiManager 200D [+] FortiManager 300D [+] FortiManager 1000D [+] FortiManager 3900E [+] FortiManager-4000E [+] FortiManager Virtual Appliances [+] FortiMoM-VM FortiManager Legacy Models [+] FortiManager 100 [+] FortiManager 100C [+] FortiManager 400A [+] FortiManager 400B [+] FortiManager 400C [+] FortiManager 1000C [+] FortiManager 3000C [+] FortiManager 4000D Proof of Concept (PoC): ======================= The persistent input validation web vulnerability can be exploited by low privileged guest web-application user accounts with low user interaction. For security demonstration or to reproduce the vulnerability follow the provided information and steps below to continue. Manual steps to reproduce the vulnerability as guest user with restricted access privileges ... 1. Login to the fortimanager appliance web-application as guest user 2. Open the following section that is not restricted to guests mainly (http://fortimanager.localhost:8000/cgi-bin/module//sharedobjmanager/vpn/SOMVpnSSLPortalDialog) 3. Click Security Profiles > SSL VPN Portal 4. Now click the pre-defined Bookmarks button ahead to the listing 5. Add your test payload to verify the issue in the Name and Description input field 6. Save the entry 7. The code executes in the Pre-Defined Bookmarks listing context in two locations 8. Save the entry by return again 9. Now you reopen the post to edit the pre-defined bookmarks 10. A second execution of the payload occurs in the edit form next to the category entry 11. Successful reproduce of the persistent vulnerability! PoC: Source #1 - Policy & Objects > Security Profiles > SSL VPN Portal > Predefined Bookmarks > [Create] Listing NameTypeLocationDescription Bookmarks "> <"<[PERSISTENT SCRIPT CODE EXECUTION!]"<"[PERSISTENT SCRIPT CODE EXECUTION!]"> "><"<[PERSISTENT SCRIPT CODE EXECUTION!]>"SSHbenjamin-km[PERSISTENT SCRIPT CODE EXECUTION!] PoC: Source #2 - Edit Form (Category)
<"<[PERSISTENT SCRIPT CODE EXECUTION!] sr"="" maxlength="35" style="position:static;background: url(/resource/images/tabOption.gif) center right no-repeat #FFF;">
Name<"<[PERSISTENT SCRIPT CODE EXECUTION!]" maxlength=35 > Type LocationRemote Port Listening Port Screen WidthScreen HeightLogon User PasswordKeyboard LayoutDescription <"<[PERSISTENT SCRIPT CODE EXECUTION!]>" maxlength=128>Full Screen ModeDisplay StatusSSO
Field NameValue
--- PoC Session Logs [GET] (Execution) --- Status: 200[OK] GET http://fortimanager.localhost:8000/cgi-bin/module//sharedobjmanager/vpn/x[PERSISTENT SCRIPT CODE EXECUTION!] Mime Type[text/html] Request Header: Host[fortimanager.localhost:8000] User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0] Accept[image/png,image/*;q=0.8,*/*;q=0.5] Accept-Language[de,en-US;q=0.7,en;q=0.3] Referer[http://fortimanager.localhost:8000/cgi-bin/module//sharedobjmanager/vpn/SOMVpnSSLPortalDialog?devGrpId=18446744073709551615&deviceId=18446744073709551615&vdom= root&adomId=3&vdomID=0&adomType=gms&cate=1054&prodId=0&key=web-access&roid=394] Cookie[remoteauth=1; forRevert=0; vmConfirm=1; tabPosition=; showSlave=1; add_dev_later=; auth_state=; CURRENT_SESSION=9X3lvcNst3VYkYtkLWMkgMagWkS+Qmdk38eDLl1jE+ZNJ7Dw /9EQlVtauZ98+4+nN5aOe5ixbZGoE/sIrlNbRQ==; MCP_VIEW_MODE=sectview; csrftoken=ea5a7a467e8cabdfe640cd475183d2a5] Connection[keep-alive] Response Header: Date[Tue, 26 Jan 2016 12:48:10 GMT] Server[Apache] X-Frame-Options[SAMEORIGIN] Vary[Accept-Encoding] Content-Encoding[gzip] x-ua-compatible[IE=Edge] Content-Length[457] Content-Type[text/html] - Status: 200[OK]GET http://fortimanager.localhost:8000/cgi-bin/module//sharedobjmanager/vpn/a[PERSISTENT SCRIPT CODE EXECUTION!] Mime Type[text/html] Request Header: Host[fortimanager.localhost:8000] User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0] Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8] Accept-Language[de,en-US;q=0.7,en;q=0.3] Referer[http://fortimanager.localhost:8000/cgi-bin/module//sharedobjmanager/vpn/SOMVpnSSLPortalDialog?devGrpId=18446744073709551615&deviceId=18446744073709551615& vdom=root&adomId=3&vdomID=0&adomType=gms&cate=1054&prodId=0&key=web-access&roid=394] Cookie[remoteauth=1; forRevert=0; vmConfirm=1; tabPosition=; showSlave=1; add_dev_later=; auth_state=; CURRENT_SESSION=9X3lvcNst3VYkYtkLWMkgMagWkS+Qmdk38eDLl1jE+ ZNJ7Dw/9EQlVtauZ98+4+nN5aOe5ixbZGoE/sIrlNbRQ==; MCP_VIEW_MODE=sectview; csrftoken=ea5a7a467e8cabdfe640cd475183d2a5] Connection[keep-alive] Response Header: Date[Tue, 26 Jan 2016 12:48:10 GMT] Server[Apache] X-Frame-Options[SAMEORIGIN] Vary[Accept-Encoding] Content-Encoding[gzip] x-ua-compatible[IE=Edge] Content-Type[text/html] Reference(s): http://fortimanager.localhost:8000/ http://fortimanager.localhost:8000/cgi-bin/ http://fortimanager.localhost:8000/cgi-bin/module/ http://fortimanager.localhost:8000/cgi-bin/module//sharedobjmanager/ http://fortimanager.localhost:8000/cgi-bin/module//sharedobjmanager/vpn/ http://fortimanager.localhost:8000/cgi-bin/module//sharedobjmanager/vpn/SOMVpnSSLPortalDialog Solution - Fix & Patch: ======================= Updates are available for customers in the fortinet customer area or via automated appliance update. 5.2.6 5.4.1 5.0.12 (FMG) 5.0.13 (FAZ) Security Risk: ============== The security risk of the persistent input validation web vulnerability in the fortimanager web-application is estimated as medium. (CVSS 3.8) Credits & Authors: ================== Vulnerability Laboratory [Research Team] - Benjamin Kunz Mejri (research@vulnerability-lab.com) [www.vulnerability-lab.com] Disclaimer & Information: ========================= The information provided in this advisory is provided as it is without any warranty. Vulnerability Lab disclaims all warranties, either expressed or implied, including the warranties of merchantability and capability for a particular purpose. Vulnerability-Lab or its suppliers are not liable in any case of damage, including direct, indirect, incidental, consequential loss of business profits or special damages, even if Vulnerability-Lab or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply. We do not approve or encourage anybody to break any vendor licenses, policies, deface websites, hack into databases or trade with fraud/stolen material. Domains: www.vulnerability-lab.com - www.vuln-lab.com - www.evolution-sec.com Contact: admin@vulnerability-lab.com - research@vulnerability-lab.com - admin@evolution-sec.com Section: magazine.vulnerability-db.com - vulnerability-lab.com/contact.php - evolution-sec.com/contact Social: twitter.com/#!/vuln_lab - facebook.com/VulnerabilityLab - youtube.com/user/vulnerability0lab Feeds: vulnerability-lab.com/rss/rss.php - vulnerability-lab.com/rss/rss_upcoming.php - vulnerability-lab.com/rss/rss_news.php Programs: vulnerability-lab.com/submit.php - vulnerability-lab.com/list-of-bug-bounty-programs.php - vulnerability-lab.com/register/ Any modified copy or reproduction, including partially usages, of this file requires authorization from Vulnerability Laboratory. Permission to electronically redistribute this alert in its unmodified form is granted. All other rights, including the use of other media, are reserved by Vulnerability-Lab Research Team or its suppliers. All pictures, texts, advisories, source code, videos and other information on this website is trademark of vulnerability-lab team & the specific authors or managers. To record, list (feed), modify, use or edit our material contact (admin@vulnerability-lab.com or research@vulnerability-lab.com) to get a permission. Copyright A(c) 2016 | Vulnerability Laboratory - [Evolution Security GmbH]aC/ -- VULNERABILITY LABORATORY - RESEARCH TEAM SERVICE: www.vulnerability-lab.com