{"uuid": "9baa9351-dc32-4f7d-b01d-eeb3a51e50be", "vulnerability_lookup_origin": "1a89b78e-f703-45f3-bb86-59eb712668bd", "title": "(Vendor information) Missing authentication in fgfmsd", "description": "A missing authentication for critical function vulnerability [CWE-306] in FortiManager fgfmd daemon may allow a remote unauthenticated attacker to execute arbitrary code or commands via specially crafted requests.\n\nReports have shown this vulnerability to be exploited in the wild.\n\nPSIRT | FortiGuard Labs\n9\u201311 minutes\nSummary\n\nA missing authentication for critical function vulnerability [CWE-306] in FortiManager fgfmd daemon may allow a remote unauthenticated attacker to execute arbitrary code or commands via specially crafted requests.\n\nReports have shown this vulnerability to be exploited in the wild.\nVersion \tAffected \tSolution\nFortiManager 7.6 \t7.6.0 \tUpgrade to 7.6.1 or above\nFortiManager 7.4 \t7.4.0 through 7.4.4 \tUpgrade to 7.4.5 or above\nFortiManager 7.2 \t7.2.0 through 7.2.7 \tUpgrade to 7.2.8 or above\nFortiManager 7.0 \t7.0.0 through 7.0.12 \tUpgrade to 7.0.13 or above\nFortiManager 6.4 \t6.4.0 through 6.4.14 \tUpgrade to 6.4.15 or above\nFortiManager 6.2 \t6.2.0 through 6.2.12 \tUpgrade to 6.2.13 or above\nFortiManager Cloud 7.6 \tNot affected \tNot Applicable\nFortiManager Cloud 7.4 \t7.4.1 through 7.4.4 \tUpgrade to 7.4.5 or above\nFortiManager Cloud 7.2 \t7.2.1 through 7.2.7 \tUpgrade to 7.2.8 or above\nFortiManager Cloud 7.0 \t7.0.1 through 7.0.12 \tUpgrade to 7.0.13 or above\nFortiManager Cloud 6.4 \t6.4 all versions \tMigrate to a fixed release\n\nOld FortiAnalyzer models 1000E, 1000F, 2000E, 3000E, 3000F, 3000G, 3500E, 3500F, 3500G, 3700F, 3700G, 3900E with the following feature enabled (FortiManager on FortiAnalyzer):\n\nconfig system global\nset fmg-status enable\nend\n\nand at least one interface with fgfm service enabled are also impacted by this vulnerability.\n\nWorkarounds\n\nUpgrade to a fixed version or use one of the following workarounds, depending on the version you're running:\n\n1- For FortiManager versions 7.0.12 or above, 7.2.5 or above, 7.4.3 or above (but not 7.6.0), prevent unknown devices to attempt to register:\n\nconfig system global\n(global)# set fgfm-deny-unknown enable\n(global)# end\n\nWarning: With this setting enabled, be aware that if a FortiGate's SN is not in the device list, FortiManager will prevent it from connecting to register upon being deployed, even when a model device with PSK is matching.\n\nIf FAZ features are enabled on FMG, block the addition of unauthorized devices via syslog:\n\nconf system global\nset detect-unregistered-log-device disable\nend\n\nIf FortiGate Updates or Web Filtering are enabled, block the addition of unauthorized devices via FDS:\n\nconf fmupdate fds-setting\nset unreg-dev-option ignore\nend\n\n2- Alternatively, for FortiManager versions 7.2.0 and above, you may add local-in policies to whitelist the IP addresses of FortiGates that are allowed to connect.\n\nExample:\n\nconfig system local-in-policy\nedit 1\nset action accept\nset dport 541\nset src\nnext\nedit 2\nset dport 541\nnext\nend\n\n3- For 7.2.2 and above, 7.4.0 and above, 7.6.0 and above it is also possible to use a custom certificate which will mitigate the issue:\n\nconfig system global\nset fgfm-ca-cert\nset fgfm-cert-exclusive enable\n\nend\n\nAnd install that certificate on FortiGates. Only this CA will be valid, this can act as a workaround, providing the attacker cannot obtain a certificate signed by this CA via an alternate channel.\n\nNB: For FortiManager versions 6.2, 6.4, and 7.0.11 and below, please upgrade to one of the versions above and apply the above workarounds.\n\nIndicators of Compromise\n\nThe following are possible IoCs:\n\nLog entries\n\ntype=event,subtype=dvm,pri=information,desc=\"Device,manager,generic,information,log\",user=\"device,...\",msg=\"Unregistered device localhost add succeeded\" device=\"localhost\" adom=\"FortiManager\" session_id=0 operation=\"Add device\" performed_on=\"localhost\" changes=\"Unregistered device localhost add succeeded\"\n\ntype=event,subtype=dvm,pri=notice,desc=\"Device,Manager,dvm,log,at,notice,level\",user=\"System\",userfrom=\"\",msg=\"\" adom=\"root\" session_id=0 operation=\"Modify device\" performed_on=\"localhost\" changes=\"Edited device settings (SN FMG-VMTM23017412)\"\n\nIP addresses\n\n45.32.41.202\n104.238.141.143\n158.247.199.37\n45.32.63.2\n195.85.114.78 (Not observed by Fortinet, reported by Mandiant here)\n\nSerial Number\n\nFMG-VMTM23017412\n\nFiles\n\n/tmp/.tm\n/var/tmp/.tm\n\nNote that file IoCs may not appear in all cases.\n\nRisk\n\nThe identified actions of this attack in the wild have been to automate via a script the exfiltration of various files from the FortiManager which contained the IPs, credentials and configurations of the managed devices.\n\nAt this stage, we have not received reports of any low-level system installations of malware or backdoors on these compromised FortiManager systems. To the best of our knowledge, there have been no indicators of modified databases, or connections and modifications to the managed devices.\n\nRecovery\n\nA FortiManager configuration backup file would not contain any OS or system-level file\nchanges, as these files are not included in the archive. Therefore, taking a backup from a\ncompromised system and then restoring it on a fresh or re-initialized one, would not carry\nover and re-introduce such low-level changes. When taking this approach, be aware that the\ndata may have been tampered with. Careful review should be done to confirm configuration\naccuracy.\n\nThe methods below assume that the managed devices (FortiGates or other) contained in the\nbackup have not been tampered with and that their configurations are reliable. Event log\nactivity verification of the FortiGates should be reviewed starting from the date of the\nidentified IoCs, to determine if there were any unauthorized access or configuration changes.\nSince data may have been exfiltrated from the FortiManager database, we recommend that\nthe credentials, such as passwords and user-sensitive data, of all managed devices, be\nurgently changed.\n\nFor VM installations, recovery can be facilitated by keeping a copy of the compromised\nFortiManager in an isolated network with no Internet connection, as well as configuring it in\noffline mode and closed-network mode operation (see settings below). This system can be\nused to compare with the new one which will be set up in parallel.\n\nconfig system admin setting\nset offline_mode enable\nend\nconfig fmupdate publicnetwork\nset status disable\nend\n\nRecovery Methods\n\nOption 1 \u2013 Recommended Recovery Action\n\nThis method ensures that the FortiManager configuration was not tampered with. It will\nrequire database rebuilding or device configuration resynchronizations at the Device and\nPolicy Package ADOM levels.\n\n\u2022 Installing a fresh FortiManager VM or re-initializing a hardware model and\nadding/discovering the devices.\n\u2022 Installing a fresh FortiManager VM or re-initializing a hardware model, and restoring a\nbackup taken before the IoC detection.\n\nOption 2 \u2013 Alternative Recovery Action\n\nThis method provides a quick recovery, where partial or no database\nrebuilding/resynchronization is required. It requires that you manually verify accuracy of the\ncurrently running FortiManager configuration\n\n\u2022 Installing a fresh FortiManager VM or re-initializing a hardware model and\nrestoring/copying components or configuration sections from a compromised\nFortiManager.\n\u2022 Installing a fresh FortiManager VM or re-initializing a hardware model, and restoring a\nbackup from a compromised FortiManager.\n\nFor more info on data configuration and synchronization procedures: https://community.fortinet.com/t5/FortiManager/Technical-Tip-FortiManager-data-configuration-and/ta-p/351748\n\n\n\n- [https://www.fortiguard.com/psirt/FG-IR-24-423](https://www.fortiguard.com/psirt/FG-IR-24-423)", "description_format": "markdown", "vulnerability": "CVE-2024-47575", "creation_timestamp": "2024-10-25T07:11:40.672278+00:00", "timestamp": "2024-10-25T07:11:40.672278+00:00", "related_vulnerabilities": [], "meta": [{"tags": ["vulnerability:information=remediation"]}], "author": {"login": "adulau", "name": "Alexandre Dulaunoy", "uuid": "c933734a-9be8-4142-889e-26e95c752803"}}
