This hypothesis detects the execution of cgis4.exe, a process often associated with legacy CGI applications that may indicate an adversary leveraging known binaries to establish persistence or execute initial payloads within web server environments. A SOC team should proactively hunt for this activity in Azure Sentinel to identify potential low-and-slow threats where attackers utilize trusted system processes to evade standard detection mechanisms and gain a foothold before escalating their operations.
rule cgis4_cgis4 {
meta:
description = "Auto-generated rule on file cgis4.exe"
author = "yarGen Yara Rule Generator by Florian Roth"
hash = "d658dad1cd759d7f7d67da010e47ca23"
strings:
$s0 = ")PuMB_syJ"
$s1 = "&,fARW>yR"
$s2 = "m3hm3t_rullaz"
$s3 = "7Projectc1"
$s4 = "Ten-GGl\""
$s5 = "/Moziqlxa"
condition:
all of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 6 string patterns in its detection logic.
Here are 5 specific false positive scenarios for the cgis4.exe detection rule in an enterprise environment, including suggested filters and exclusions:
Scenario: Microsoft Exchange Server IIS Worker Process
cgis4.exe is often a legitimate CGI executable spawned by the Internet Information Services (IIS) worker process to handle specific client access requests or Outlook Web App (OWA) functionality. It frequently runs under the identity of the local system or the Exchange service account.w3wp.exe and the file path contains \Microsoft\Exchange Server\v15\Bin\. Additionally, filter by user context to allow execution when running as NT SERVICE\MsExchangeTransport or Local System.Scenario: Scheduled Antivirus Real-Time Scanning
cgis4.exe) during scheduled real-time scanning cycles or on-demand scans triggered by the management console. This is common when the AV engine interacts with web-based reporting modules./scan or --report-mode. Furthermore, exclude events where the parent process is the known antivirus service (e.g., MsMpEng.exe for Defender or rtvscand64.exe for Symantec).Scenario: Legacy Reporting Dashboard Execution