Back to Intelligence

Critical Alert: FortiGate Firewalls Targeted in Credential Theft Campaign

SA
Security Arsenal Team
March 10, 2026
5 min read

Critical Alert: FortiGate Firewalls Targeted in Credential Theft Campaign

Your firewall is the first line of defense, but for a growing number of organizations, it has become the Achilles' heel. Security researchers are tracking a concerning surge in cyberattacks specifically targeting FortiGate Next-Generation Firewall (NGFW) appliances. In this campaign, threat actors are not just trying to break through the firewall; they are weaponizing the device itself to gain a deeper, more persistent foothold inside victim networks.

Unlike opportunistic scanning, this activity appears focused. The objective is clear: exploit the perimeter barrier to extract the "keys to the kingdom"—service account credentials and detailed network topology maps—enabling lateral movement that is notoriously difficult to detect.

The Attack Vector: Turning the Gateway into a Trap

The mechanics of this campaign are twofold, relying on either technical exploitation or operational hygiene failures.

1. Vulnerability Exploitation: Attackers are actively leveraging recently disclosed security vulnerabilities in FortiOS. While specific CVEs vary by the exact moment of exploitation, the pattern involves unauthenticated remote code execution or authentication bypass flaws. By sending specially crafted packets to the management interface or VPN portals, attackers gain a shell on the device without valid credentials.

2. Credential Stuffing and Weak Auths: Where exploits fail, brute force prevails. Threat actors are bombarding exposed administrative interfaces with default credentials, leaked passwords, or simple dictionary attacks. Once access is obtained, the campaign enters its most dangerous phase.

**The Endgame: Config Dumping

Access to the firewall CLI or API is just the beginning. The primary goal of these actors is to retrieve the device's full configuration file. To a network admin, a config file is a backup. To an attacker, it is a goldmine of intelligence.

  • Service Account Credentials: FortiGate configs often contain plaintext or easily reversible passwords for LDAP, RADIUS, and API integrations. These service accounts frequently have elevated privileges on the network, allowing attackers to bypass standard MFA requirements.
  • Network Topology: The configuration reveals internal IP schemes, VPN tunnel configurations, and security policies. This effectively gives the attacker a map of the internal network, showing them exactly where high-value assets reside and how the segmentation rules work.

Detection and Threat Hunting

Detecting this requires looking beyond standard traffic logs. You need to identify abnormal administrative behavior or configuration extraction attempts.

KQL Queries (Microsoft Sentinel / Defender)

Use the following KQL queries to hunt for suspicious configuration export activities or anomalous login patterns on your FortiGate devices.

Script / Code
// Hunt for configuration exports or backups performed by unusual admins
let AdminUsers = dynamic(["admin", "fortianalyzer", "security-admin"]);
DeviceEvents
| where DeviceVendor == "Fortinet"
| where ActionType contains "config" or ActionType contains "backup"
| where InitiatingProcessAccountName !in (AdminUsers)
| project Timestamp, DeviceName, InitiatingProcessAccountName, ActionType, RemoteIP
| order by Timestamp desc


// Hunt for successful admin logins followed immediately by CLI commands
// This may indicate a session hijacking or successful brute force
DeviceEvents
| where DeviceVendor == "Fortinet"
| where ActionType has "login"
| where AdditionalFields contains "status=success"
| join kind=inner (
    DeviceEvents
    | where DeviceVendor == "Fortinet"
    | where ActionType has "cli" 
) on DeviceId, bin(Timestamp, 1m)
| project Timestamp, DeviceName, RemoteIP, InitiatingProcessAccountName, ActionType1 = ActionType, Command = AdditionalFields1
| distinct Timestamp, DeviceName, RemoteIP, Command

Bash Commands (For Linux-based Log Analysis)

If you are aggregating FortiGate syslog to a Linux server, use these bash snippets to quickly scan for indicators of compromise (IoC).

Script / Code
# Check for an unusually high number of failed admin logins from a single IP
zcat /var/log/fortigate/syslog* | grep "msg="FGT_LOG_EVENT_LOGIN_FAIL" | awk '{print $7}' | sort | uniq -c | sort -nr | head -10


# Identify configuration download actions (often indicates data theft)
grep -i "action=download" /var/log/fortigate/current-syslog.log | grep -i "system config"

Python Script (Config Analysis)

If you suspect a breach, use this Python script to scan a decrypted FortiGate configuration backup for exposed plaintext credentials.

Script / Code
import re
import sys

def scan_forti_config(file_path):
    sensitive_patterns = [
        r'set password "[^"]+"',
        r'set secret "[^"]+"',
        r'set ldap-password "[^"]+"',
        r'set radius-server-key "[^"]+"'
    ]
    
    try:
        with open(file_path, 'r', encoding='utf-8', errors='ignore') as f:
            content = f.readlines()
            
        print(f"Scanning {file_path} for potential plaintext secrets...")
        for line_num, line in enumerate(content, 1):
            for pattern in sensitive_patterns:
                if re.search(pattern, line):
                    print(f"[!] Potential Secret found at Line {line_num}: {line.strip()}")
                    
    except FileNotFoundError:
        print(f"Error: File {file_path} not found.")

if __name__ == "__main__":
    if len(sys.argv) != 2:
        print("Usage: python scan_config.py <path_to_config_file>")
    else:
        scan_forti_config(sys.argv[1])

Mitigation Strategies

To defend against this campaign, organizations must assume that their firewall is a high-value target and treat it as such.

  1. Patch Immediately: Review the latest Fortinet PSIC Advisories. If you cannot upgrade to the latest major release immediately, apply the specific patches for critical remote code execution (RCE) vulnerabilities.

  2. Implement Strict Access Controls: Ensure management interfaces (HTTPS/SSH) are not exposed to the public internet. Use VPN jump hosts or dedicated bastion hosts with strict IP allow-lists for administrative access.

  3. Enforce MFA: Multi-Factor Authentication is non-negotiable for administrative access. Disable local administrator authentication in favor of RADIUS or TACACS+ integrated with your MFA provider.

  4. Audit Service Accounts: Review the service accounts stored in your firewall configuration. Ensure they follow the principle of least privilege and rotate their credentials immediately if you suspect exposure.

  5. Disable Unnecessary Features: If you are not using SSL VPN or specific management APIs on certain interfaces, disable them. Reducing the attack surface limits the entry points available to threat actors.

Related Resources

Security Arsenal Incident Response Services AlertMonitor Platform Book a SOC Assessment incident-response Intel Hub

incident-responseransomwareforensicsfortigatecredential-theftthreat-huntingvulnerability-managementnetwork-security

Is your security operations ready?

Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.