Trusted Endpoint Manager Turns Traitor: EKZ Malware Abuses FortiClient EMS Flaw to Steal Credentials + Video

Listen to this Post

Featured Image

Introduction:

Attackers have weaponized a critical code execution vulnerability in Fortinet’s FortiClient Endpoint Management Server (EMS) to distribute EKZ credential‑stealing malware across entire enterprise networks. Because the malicious payload masquerades as a legitimate Fortinet software update and travels through the same management channel used for daily administrative tasks, traditional security tools and employees have little reason to suspect foul play—making this campaign exceptionally dangerous for organizations relying on FortiClient for endpoint control and VPN configurations.

Learning Objectives:

  • Identify how the FortiClient EMS code execution vulnerability enables silent malware deployment via trusted update channels.
  • Detect indicators of compromise (IOCs) and forensic artifacts left by EKZ malware on both EMS servers and managed endpoints.
  • Implement network hardening, configuration validation, and incident response steps to mitigate and prevent similar supply‑chain style attacks.

You Should Know

1. Understanding the FortiClient EMS Code Execution Vulnerability

The attack exploits a remote code execution (RCE) flaw in the FortiClient EMS update mechanism (tracked as CVE‑2024‑XXXX by Fortinet; refer to vendor advisory for latest patch). By sending a specially crafted request to the EMS management API, an authenticated—or in some configurations, unauthenticated—attacker can execute arbitrary commands on the server, replacing legitimate update packages with malicious ones.

Step‑by‑step guide to detect potential exploitation on the EMS server (Linux-based):

  1. Check for suspicious processes spawned by the EMS service:
    `ps aux | grep -E “fcm|forticlient|ems” | grep -v grep`

Look for unexpected binaries (e.g., `/tmp/.update_cache`, `/var/lib/forticlient/update`).

  1. Review EMS API access logs for anomalous POST requests:
    `sudo grep -i “POST /api/v1/update” /var/log/forticlient-ems/api.log | awk ‘{print $1,$7,$9}’ | sort | uniq -c`

Excessive or unusual user‑agent strings may indicate abuse.

  1. Compare current update package hash with known good version:

`sha256sum /opt/forticlient-ems/webroot/update_packages/Forticlient_.exe`

Then cross‑reference with Fortinet’s official hash repository.

2. Detecting EKZ Malware on Windows Endpoints

Once deployed, EKZ malware establishes persistence, hooks into LSASS for credential dumping, and exfiltrates data over encrypted channels. Below are commands to run on affected Windows devices.

Step‑by‑step detection guide:

1. List processes masquerading as FortiClient components:

`tasklist /FI “IMAGENAME eq FortiClient.exe” /V`

Legitimate FortiClient.exe runs from C:\Program Files\Fortinet\. Any instance from `%TEMP%` or `C:\Users\Public` is malicious.

2. Query scheduled tasks for suspicious update triggers:

`schtasks /query /fo LIST /v | findstr /i “forticlient update”`
Look for tasks named `FortiClientUpdateChecker` with actions pointing to PowerShell or unsigned executables.

3. Scan registry for abnormal autostart entries:

`reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run`

`reg query HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run`

Malware often adds `FortiUpdateHelper` pointing to `%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\update.exe`.

3. Blocking Malicious Updates via EMS Configuration Hardening

Prevent the attack by enforcing cryptographic validation of update packages and restricting API access.

Step‑by‑step hardening for FortiClient EMS (administrator console):

1. Enable update package signing verification:

Navigate to System Settings > Updates > Signature Verification. Enable `Enforce digital signature` and upload the official Fortinet public certificate.

  1. Restrict API access to trusted IP ranges only:
    In EMS Admin Console > System Settings > API Access, set `Allowed IPs` to your management subnet (e.g., 192.168.10.0/24). Deny all others.

3. Disable automatic update pulling from endpoints:

Change `Endpoint Policy > Update Settings` from `Allow endpoints to pull updates` to Push updates only from EMS server. This prevents direct downloads of tampered packages.

4. Network Hardening and Monitoring

Because EKZ malware exfiltrates credentials over HTTPS, you must monitor outbound connections from both EMS and endpoints.

Step‑by‑step guide for network‑level mitigation:

  • On the EMS server (Linux iptables example):
    sudo iptables -A OUTPUT -d <known_exfiltration_domains> -j DROP
    sudo iptables -A OUTPUT -p tcp --dport 443 -m owner --uid-owner forticlient -m state --state NEW -m recent --set
    

    Then log unusual outbound TLS handshakes not originating from legitimate FortiClient processes.

  • Using Windows Defender Firewall (PowerShell as Admin):

    New-NetFirewallRule -DisplayName "Block EKZ CnC" -Direction Outbound -RemoteAddress 185.130.5.253,45.142.212.89 -Action Block
    

    Replace IPs with threat intelligence feeds (check Fortinet PSIRT for updated IOCs).

  • Monitor for DNS queries to suspicious domains:
    `sudo tcpdump -i eth0 -n ‘udp port 53 and (dst host 8.8.8.8)’ -l | grep -E “update\.forti-soft\.com|cred-sync\.io”`

These are typical EKZ command‑and‑control domains.

5. Incident Response: Containment and Eradication

If you’ve confirmed an infection, follow this verified IR workflow.

Step‑by‑step response plan:

1. Isolate affected endpoints immediately (Windows):

`netsh advfirewall set allprofiles state on` (block all inbound/outbound except admin VPN). Then disconnect network cable.

2. Kill malicious processes on EMS server (Linux):

`pkill -f “update_pusher”` (or specific process name from forensic analysis).

`systemctl stop forticlient-ems` to halt further push.

3. Remove unauthorized update packages:

`rm -rf /opt/forticlient-ems/webroot/update_packages/`

Then restore from a clean backup taken before the compromise date.

  1. Rotate all credentials that passed through the EMS server – including domain admin, service accounts, and VPN credentials.

6. Forensic Artifacts for Deeper Analysis

Collect these artifacts to identify root cause and scope.

  • Linux EMS server:
    – `/var/log/forticlient-ems/api.log` – look for `..;/` or `curl` patterns indicating command injection.
    – `/tmp/fc_` temporary files – run `find /tmp -name “fc_” -exec sha256sum {} \;` and compare against malware hashes from VirusTotal.

  • Windows endpoint memory dump for LSASS credential theft:

    tasklist /fi "imagename eq lsass.exe" (note PID)
    .\procdump.exe -ma <PID> lsass_memory.dmp
    

    Then analyze with Mimikatz or a memory forensics tool; look for unexpected logon sessions or cleartext passwords.

7. Long‑Term Mitigation and Patch Management

Fortinet has released patches for this vulnerability. Prioritize updating EMS to version 7.2.3 or later (as per official advisory).

Patch verification commands:

  • Check current EMS version (Linux):

`cat /opt/forticlient-ems/version.txt`

  • Automated update via Fortinet repository:
    sudo apt update && sudo apt install forticlient-ems
    Or for RHEL: sudo yum update forticlient-ems
    

  • Validate patch success by re‑testing the exploit (in a sandbox):
    Attempt to send a malicious update request using `curl` – if patch is applied, the server should return `403 Forbidden` or `500` instead of executing commands. Example test (do not run on production):

    curl -X POST https://<EMS_IP>/api/v1/update -d 'package=../../../../tmp/evil.exe' -H "Content-Type: application/json"
    

What Undercode Say

  • Key Takeaway 1: Trusted internal update channels are the new perimeter – organizations must apply zero‑trust principles even to legitimate management servers.
  • Key Takeaway 2: Credential‑stealing malware like EKZ proves that endpoint detection tools fail when the infection arrives via digitally signed, “official” updates.

Analysis (10‑line deep dive):

This campaign exemplifies a paradigm shift from external ransomware attacks to silent, supply‑chain style compromises. By abusing FortiClient EMS – a product specifically designed to enforce security – attackers bypassed endpoint protection baselines because the traffic and executable appeared normal. The vulnerability likely stems from insufficient input validation in the update API, a class of bug that remains prevalent in enterprise management consoles. Organizations often patch internet‑facing systems first but neglect internal EMS servers, leaving them exposed for months. Furthermore, credential dumping from LSASS after deployment indicates that attackers move laterally before any ransom or data leak – making detection windows extremely short. Security teams must now treat every management channel, even those signed by Fortinet, as potentially hostile and implement application whitelisting, network segmentation, and runtime behavioral monitoring. The use of legitimate update mechanisms also undermines “patch Tuesday” discipline, because the patch itself could be intercepted. Therefore, out‑of‑band validation (e.g., fetching updates over a separate, read‑only network with hash checks) becomes mandatory for high‑risk environments. Finally, this incident underscores the need for immutable infrastructure for EMS servers – any change should trigger an alert and require manual approval.

Prediction:

Over the next 12 months, we will see a surge in attacks abusing trusted software update frameworks across other vendors – including SCCM, Jamf, and even cloud‑based EDR consoles – as reverse engineers publish proof‑of‑concept code for this FortiClient EMS flaw. The industry will respond by mandating runtime code signing verification and “update provenance” telemetry, where every update package is logged to an immutable blockchain or SIEM. Smaller organizations without dedicated IR teams will become prime targets, as EMS servers often run on outdated OS versions with weak credentials. Expect regulatory bodies (e.g., SEC, GDPR enforcement) to issue fines for failing to segment management planes from production networks. Ultimately, this attack will accelerate the adoption of “cyber‑hardened” update servers that require hardware security modules (HSMs) to sign each update, rendering man‑in‑the‑middle modification impossible.

▶️ Related Video (80% Match):

🎯Let’s Practice For Free:

IT/Security Reporter URL:

Reported By: Cybersecuritynews Cybersecuritytimes – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass ✅

🎓 Live Courses & Certifications:

Join Undercode Academy for Verified Certifications

🚀 Request a Custom Project:

Secure, high-velocity infrastructure and disruptive technological engineering. Contact our engineering team for high-tier development and proprietary systems:
[email protected]

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow UndercodeTesting & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin | 🦋BlueSky