Rapid7 Vulnerability & Exploit Database

FortiNet FortiClient Endpoint Management Server FCTID SQLi to RCE

Back to Search

FortiNet FortiClient Endpoint Management Server FCTID SQLi to RCE

Disclosed
04/21/2024
Created
04/19/2024

Description

An SQLi injection vulnerability exists in FortiNet FortiClient EMS (Endpoint Management Server). FortiClient EMS serves as an endpoint management solution tailored for enterprises, offering a centralized platform for overseeing enrolled endpoints. The SQLi is vulnerability is due to user controller strings which can be sent directly into database queries. FcmDaemon.exe is the main service responsible for communicating with enrolled clients. By default it listens on port 8013 and communicates with FCTDas.exe which is responsible for translating requests and sending them to the database. In the message header of a specific request sent between the two services, the FCTUID parameter is vulnerable SQLi. The SQLi can used to enable the xp_cmdshell which can then be used to obtain unauthenticated remote code execution in the context of NT AUTHORITY\SYSTEM Affected versions of FortiClient EMS include: 7.2.0 through 7.2.2 7.0.1 through 7.0.10 Upgrading to either 7.2.3, 7.0.11 or above is recommended by FortiNet. It should be noted that in order to be vulnerable, at least one endpoint needs to be enrolled / managed by FortiClient EMS for the necessary vulnerable services to be available.

Author(s)

  • Zach Hanley
  • James Horseman
  • jheysel-r7
  • Spencer McIntyre

Platform

Windows

Architectures

cmd

Development

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/windows/http/forticlient_ems_fctid_sqli
msf exploit(forticlient_ems_fctid_sqli) > show targets
    ...targets...
msf exploit(forticlient_ems_fctid_sqli) > set TARGET < target-id >
msf exploit(forticlient_ems_fctid_sqli) > show options
    ...show and set options...
msf exploit(forticlient_ems_fctid_sqli) > exploit

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security

;