← Back to SOC feed Coverage →

obfuscated php webshell

yara HIGH signature-base
florian-rothwebshell
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at signature-base →
Retrieved: 2026-08-04T11:00:00Z · Confidence: medium

Hunt Hypothesis

This detection identifies adversaries who deploy obfuscated PHP webshells to establish persistent access and execute commands within web-facing applications. Proactive hunting for this behavior in Azure Sentinel is critical because obfuscation techniques often evade standard signature-based defenses, requiring deep inspection of file integrity and runtime execution patterns to uncover hidden backdoors before they are leveraged for lateral movement or data exfiltration.

YARA Rule

rule WEBSHELL_PHP_Unknown_1
{
    meta:
        description = "obfuscated php webshell"
        license = "Detection Rule License 1.1 https://github.com/Neo23x0/signature-base/blob/master/LICENSE"
        author = "Arnim Rupp (https://github.com/ruppde)"
        reference = "Internal Research"
        score = 75
        hash = "12ce6c7167b33cc4e8bdec29fb1cfc44ac9487d1"
        hash = "cf4abbd568ce0c0dfce1f2e4af669ad2"
        date = "2021/01/07"
        modified = "2023-04-05"

        id = "93d01a4c-4c18-55d2-b682-68a1f6460889"
    strings:
        $sp0 = /^<\?php \$[a-z]{3,30} = '/ wide ascii
        $sp1 = "=explode(chr(" wide ascii
        $sp2 = "; if (!function_exists('" wide ascii
        $sp3 = " = NULL; for(" wide ascii

    condition:
        filesize <300KB and all of ($sp*)
}

Deployment Notes

This YARA rule can be deployed in the following contexts:

This rule contains 4 string patterns in its detection logic.

References

False Positive Guidance

Here are 5 specific false positive scenarios for the Obfuscated PHP Webshell detection rule, including suggested filters and exclusions tailored for an enterprise environment:


Original source: https://github.com/Neo23x0/signature-base/blob/main/yara/gen_webshells.yar