This detection identifies adversaries deploying a malicious web shell named co.php to establish persistent access and execute commands on compromised web servers. SOC teams should proactively hunt for this artifact in Azure Sentinel because web shells often serve as an initial foothold for lateral movement and data exfiltration, requiring immediate investigation before attackers can fully entrench their presence.
rule webshell_PHP_co {
meta:
description = "Web Shell - file co.php"
license = "Detection Rule License 1.1 https://github.com/Neo23x0/signature-base/blob/master/LICENSE"
author = "Florian Roth (Nextron Systems)"
date = "2014/01/28"
score = 70
hash = "62199f5ac721a0cb9b28f465a513874c"
id = "393e738a-b4c2-5630-a55f-c3caee4ff75e"
strings:
$s0 = "cGX6R9q733WvRRjISKHOp9neT7wa6ZAD8uthmVJV" fullword
$s11 = "6Mk36lz/HOkFfoXX87MpPhZzBQH6OaYukNg1OE1j" fullword
condition:
all of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 2 string patterns in its detection logic.
Here are 3-5 specific false positive scenarios for the Web Shell - file co.php detection rule, tailored for an enterprise environment:
Scenario: Legitimate CMS Plugin Installation or Update
contact-form-co or checkout-co). The installation process automatically creates a file named co.php in the /wp-content/plugins/ or /modules/ directory.*/wp-content/plugins/*/co.php, */joomla/components/com_*/*/co.php.Scenario: Scheduled Backup or Reporting Job
cron on Linux or Task Scheduler on Windows) generates a temporary report file named co.php to aggregate daily transaction data before archiving it. This is often part of an internal analytics pipeline where “co” stands for “consolidated output.”User = svc-backup-agent AND Time is between 02:00 and 04:00 UTC.Scenario: Deployment Pipeline Artifact
co.php in the /tmp/deploy-staging/ directory during the build phase before moving it to production