Skip to content

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_WEBSHELL_G_APT_Backdoorwebshell_SLAYSTYLE_1

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 / 83

What this rule detects

Detects webshell used by APT group UNC5221 (China Nexus)

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

Summary generated from the rule's metadata and condition.

Rule source

webshell-g-apt-backdoorwebshell-slaystyle-1.yarDetection Rule License 1.1
rule SIGNATURE_BASE_WEBSHELL_G_APT_Backdoorwebshell_SLAYSTYLE_1 : FILE
{
	meta:
		description = "Detects webshell used by APT group UNC5221 (China Nexus)"
		author = "Google Threat Intelligence Group (GTIG) (modified by Florian Roth)"
		id = "6d3dfb91-a14b-5420-b17b-c6d65c94fc53"
		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#L98-L117"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		logic_hash = "7a56238218e60a69049f5d9c756df4fb6f0de772fbc437a14c5db7192f971be6"
		score = 75
		quality = 83
		tags = "FILE"

	strings:
		$str1_alt = "=request.getParameter(\""
		$str2 = "=new String(java.util.Base64.getDecoder().decode(" ascii wide nocase
		$str21_alt = "={\"/bin/sh\",\"-c\"," ascii
		$str3 = "= Runtime.getRuntime().exec(" ascii
		$str4 = "java.io.InputStream" ascii
		$str5 = "java.util.Base64.getEncoder().encodeToString(org.apache.commons.io.IOUtils.toByteArray(" ascii

	condition:
		filesize < 5MB and all of them
}

Strings (6 patterns)

IdentifierTypeValueModifiers
$str1_alttext"=request.getParameter(\""
$str2text"=new String(java.util.Base64.getDecoder().decode("ascii wide nocase
$str21_alttext"={\"/bin/sh\",\"-c\","ascii
$str3text"= Runtime.getRuntime().exec("ascii
$str4text"java.io.InputStream"ascii
$str5text"java.util.Base64.getEncoder().encodeToString(org.apache.commons.io.IOUtils.toByteArray("ascii

Condition

filesize < 5MB and all of them

In plain words (Heuristic)

  • The file must be smaller than 5MB (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: 6d3dfb91-a14b-5420-b17b-c6d65c94fc53

Tags:FILE