← Back to SOC feed Coverage →

Detects webshell used by APT group UNC5221 (China Nexus)

yara HIGH signature-base
aptflorian-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-02T23:00:00Z · Confidence: medium

Hunt Hypothesis

This detection rule identifies the deployment of a malicious webshell associated with the China Nexus (UNC5221) APT group to monitor for initial access and persistent command execution within web-facing applications. Proactive hunting in Azure Sentinel is critical because UNC5221 frequently targets government and defense sectors, where early identification of this specific webshell can prevent lateral movement and data exfiltration before the adversary establishes a deeper foothold.

YARA Rule

rule WEBSHELL_G_APT_BackdoorWebshell_SLAYSTYLE_2 {
   meta:
      description = "Detects webshell used by APT group UNC5221 (China Nexus)"
      author = "Google Threat Intelligence Group (GTIG) (modified by Florian Roth)"
      date = "2025-09-25"
      score = 75
      reference = "https://cloud.google.com/blog/topics/threat-intelligence/brickstorm-espionage-campaign"
      id = "5ab6791b-5043-5fa1-b73e-caba9e059eaa"
   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
}

Deployment Notes

This YARA rule can be deployed in the following contexts:

This rule contains 5 string patterns in its detection logic.

References

False Positive Guidance

Here are 4 specific false positive scenarios for the Detects webshell used by APT group UNC5221 (China Nexus) rule, along with suggested filters or exclusions tailored for a legitimate enterprise environment:

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