This detection identifies adversaries deploying obfuscated web shells with deceptive filenames to establish persistent backdoor access on Azure-hosted web servers. A proactive hunt is essential because these disguised files often evade standard signature-based controls, allowing attackers to execute arbitrary commands and pivot through the environment undetected.
rule webshell_SimAttacker_Vrsion_1_0_0_priv8_4_My_friend {
meta:
description = "Web Shell - file SimAttacker - Vrsion 1.0.0 - priv8 4 My friend.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 = "089ff24d978aeff2b4b2869f0c7d38a3"
id = "393e738a-b4c2-5630-a55f-c3caee4ff75e"
strings:
$s2 = "echo \"<a href='?id=fm&fchmod=$dir$file'><span style='text-decoration: none'><fo"
$s3 = "fputs ($fp ,\"\\n*********************************************\\nWelcome T0 Sim"
condition:
1 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 detection rule, including targeted filters and exclusions:
Scenario: DevOps Deployment via CI/CD Pipeline
My friend.php (containing metadata like “SimAttacker - Vrsion 1.0.0”) to the web root directory during nightly builds. The file name and content structure mimic the signature of a malicious shell uploaded by an attacker.svc-jenkins-deploy, github-actions-runner) within the deployment window (e.g., 02:00–04:00 UTC). Add a rule to ignore events where the source IP belongs to the internal CI/CD subnet.Scenario: Automated Backup and Archiving Job
My friend.php with the specific version string “SimAttacker - Vrsion 1.0.0” into a temporary staging folder before moving it to long-term storage.C:\BackupStaging\ or /var/tmp/archive). Filter by process name, excluding known backup agents like vss.exe, commvault-agent, or rsync.Scenario: Third-Party Plugin Installation by Admin