Skip to content

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_WEBSHELL_PHP_Unknown_1

obfuscated php webshell

WebshellSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compiles with YARA-X
Author
Arnim Rupp (https://github.com/ruppde)
Date
2021-01-07
Modified
2023-04-05
Score / Quality
75 / 85

What this rule detects

obfuscated php webshell

It defines 4 patterns (3 text, 0 hex, 1 regex).

Summary generated from the rule's metadata and condition.

Rule source

webshell-php-unknown-1.yarDetection Rule License 1.1
rule SIGNATURE_BASE_WEBSHELL_PHP_Unknown_1 : FILE
{
	meta:
		description = "obfuscated php webshell"
		author = "Arnim Rupp (https://github.com/ruppde)"
		id = "93d01a4c-4c18-55d2-b682-68a1f6460889"
		date = "2021-01-07"
		modified = "2023-04-05"
		reference = "Internal Research"
		source_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/gen_webshells.yar#L868-L890"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		hash = "12ce6c7167b33cc4e8bdec29fb1cfc44ac9487d1"
		hash = "cf4abbd568ce0c0dfce1f2e4af669ad2"
		logic_hash = "ce2d4c87c001a45febf7eac5474aa0d24ea73067f9154203ef5653bf77e7028f"
		score = 75
		quality = 85
		tags = "FILE"
		license = "Detection Rule License 1.1 https://github.com/Neo23x0/signature-base/blob/master/LICENSE"
		importance = 70

	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* )
}

Strings (4 patterns)

IdentifierTypeValueModifiers
$sp0regex/^<\?php \$[a-z]{3,30} = '/wide ascii
$sp1text"=explode(chr("wide ascii
$sp2text"; if (!function_exists('"wide ascii
$sp3text" = NULL; for("wide ascii

Condition

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

In plain words (Heuristic)

  • The file must be smaller than 300KB (a cheap guard that skips large files).
  • All patterns in ( $sp* ) must match.

Test this rule in your browser

Drop a file to scan it with this rule using YARA-X compiled to WebAssembly. Nothing is uploaded.

Drop a file here or click to chooseScanned locally with YARA-X. Files up to 200 MB.

Open in editor

Sample hashes

Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).

  • 12ce6c7167b33cc4e8bdec29fb1cfc44ac9487d1
  • cf4abbd568ce0c0dfce1f2e4af669ad2

Licence & attribution

Author: Arnim Rupp (https://github.com/ruppde)

Source repository: Signature Base (Florian Roth / Nextron) @ 94a1c48d7a

Licence: Detection Rule License 1.1 (stated in the rule's own meta)

“Detection Rule License 1.1 https://github.com/Neo23x0/signature-base/blob/master/LICENSE”

Original rule

Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.

Rule id: 93d01a4c-4c18-55d2-b682-68a1f6460889

Metadata

importance70

Tags:FILE