Skip to content

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_WEBSHELL_G_APT_Backdoorwebshell_SLAYSTYLE_2

Detects webshell used by APT group UNC5221 (China Nexus)

WebshellSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compiles with YARA-X
Author
Google Threat Intelligence Group (GTIG) (modified by Florian Roth)
Date
2025-09-25
Modified
2026-05-15
Score / Quality
75 / 85

What this rule detects

Detects webshell used by APT group UNC5221 (China Nexus)

It defines 5 patterns (5 text, 0 hex, 0 regex).

Summary generated from the rule's metadata and condition.

Rule source

webshell-g-apt-backdoorwebshell-slaystyle-2.yarDetection Rule License 1.1
rule SIGNATURE_BASE_WEBSHELL_G_APT_Backdoorwebshell_SLAYSTYLE_2 : FILE
{
	meta:
		description = "Detects webshell used by APT group UNC5221 (China Nexus)"
		author = "Google Threat Intelligence Group (GTIG) (modified by Florian Roth)"
		id = "5ab6791b-5043-5fa1-b73e-caba9e059eaa"
		date = "2025-09-25"
		modified = "2026-05-15"
		reference = "https://cloud.google.com/blog/topics/threat-intelligence/brickstorm-espionage-campaign"
		source_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/apt_cn_brickstorm_sep25.yar#L119-L135"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		logic_hash = "d2d1003f77a2066b48df1c27feab79c0a1951ebb62c3198de8366bcfee42e30a"
		score = 75
		quality = 85
		tags = "FILE"

	strings:
		$str1 = "request.getParameter"
		$str2 = "/bin/sh"
		$str3 = "java.io.InputStream"
		$str4 = "Runtime.getRuntime().exec("
		$str5 = "2>&1"

	condition:
		( uint16( 0 ) != 0x5A4D and uint32( 0 ) != 0x464C457F ) and filesize < 7KB and all of them and @str4 > @str2
}

Strings (5 patterns)

IdentifierTypeValueModifiers
$str1text"request.getParameter"
$str2text"/bin/sh"
$str3text"java.io.InputStream"
$str4text"Runtime.getRuntime().exec("
$str5text"2>&1"

Condition

( uint16( 0 ) != 0x5A4D and uint32( 0 ) != 0x464C457F ) and filesize < 7KB and all of them and @str4 > @str2

In plain words (Heuristic)

  • The file must be smaller than 7KB (a cheap guard that skips large files).
  • All patterns in the rule 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

References

Licence & attribution

Author: Google Threat Intelligence Group (GTIG) (modified by Florian Roth)

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

Licence: Detection Rule License 1.1 (repository licence)

Original rule

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

Rule id: 5ab6791b-5043-5fa1-b73e-caba9e059eaa

Tags:FILE