This detection identifies adversary behavior where a malicious PHP web shell named “phpspy2010.php” is deployed to establish a persistent foothold and enable remote command execution on web servers. A proactive hunt for this artifact in Azure Sentinel is critical because web shells often serve as the initial entry point for lateral movement, data exfiltration, and privilege escalation attacks that may evade standard signature-based defenses.
rule webshell_phpspy2010 {
meta:
description = "Web Shell - file phpspy2010.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 = "14ae0e4f5349924a5047fed9f3b105c5"
id = "393e738a-b4c2-5630-a55f-c3caee4ff75e"
strings:
$s3 = "eval(gzinflate(base64_decode("
$s5 = "//angel" fullword
$s8 = "$admin['cookiedomain'] = '';" fullword
condition:
all of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 3 string patterns in its detection logic.
Here are 4 specific false positive scenarios for the Web Shell - file phpspy2010.php detection rule, including suggested filters and exclusions tailored for an enterprise environment:
Scenario: Automated Backup Script Execution
phpspy2010.php within the /var/www/html/temp directory to handle log rotation and snapshot verification.path: /var/www/html/temp/*) where the file owner is the service account (owner: veeam_svc) and the process creating the file is known (e.g., process_name: veeam-backup-agent).Scenario: Legacy Application Deployment via CI/CD Pipeline
phpspy2010.php as a standard component of its release artifact, which is uploaded to the /opt/app/legacy-modules directory by the build agent.source_ip: 10.20.50.x) AND the destination path matches /opt/app/legacy-modules.Scenario: Scheduled Diagnostic Tool by System Administrators