YARA · Signature Base (Florian Roth / Nextron)
SIGNATURE_BASE_APT_WEBSHELL_HAFNIUM_Chopper_Webshell
Detects Chopper WebShell Injection Variant (not only Hafnium related)
APT / threat actorSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compiles with YARA-X
- Author
- Markus Neis,Swisscom
- Date
- 2021-03-05
- Modified
- 2023-12-05
- Score / Quality
- 75 / 85
What this rule detects
Detects Chopper WebShell Injection Variant (not only Hafnium related)
It defines 4 patterns (4 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
apt-webshell-hafnium-chopper-webshell.yarDetection Rule License 1.1
rule SIGNATURE_BASE_APT_WEBSHELL_HAFNIUM_Chopper_Webshell : APT HAFNIUM WEBSHELL FILE
{
meta:
= "Detects Chopper WebShell Injection Variant (not only Hafnium related)"
= "Markus Neis,Swisscom"
= "25dcf166-4aea-5680-b161-c5fc8d74b987"
= "2021-03-05"
= "2023-12-05"
= "https://www.volexity.com/blog/2021/03/02/active-exploitation-of-microsoft-exchange-zero-day-vulnerabilities/"
= "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/apt_hafnium.yar#L50-L65"
= "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
= "c185a8da2a18fa59a8eeb36dbd95ba12c9c61717efc5f2d19d2d5b27ee243f2b"
= 75
= 85
= "APT, HAFNIUM, WEBSHELL, FILE"
strings:
$x1 = "runat=\"server\">" nocase
$s1 = "<script language=\"JScript\" runat=\"server\">function Page_Load(){eval(Request" nocase
$s2 = "protected void Page_Load(object sender, EventArgs e){System.IO.StreamWriter sw = new System.IO.StreamWriter(Request.Form[\"p\"] , false, Encoding.Default);sw.Write(Request.Form[\"f\"]);"
$s3 = "<script language=\"JScript\" runat=\"server\"> function Page_Load(){eval (Request[\"" nocase
condition:
filesize < 10KB and $x1 and 1 of ( $s* )
}
Strings (4 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $x1 | text | "runat=\"server\">" | nocase |
| $s1 | text | "<script language=\"JScript\" runat=\"server\">function Page_Load(){eval(Request" | nocase |
| $s2 | text | "protected void Page_Load(object sender, EventArgs e){System.IO.StreamWriter sw = new System.IO.StreamWriter(Request.Form[\"p\"] , false, Encoding.Default);sw.W … | |
| $s3 | text | "<script language=\"JScript\" runat=\"server\"> function Page_Load(){eval (Request[\"" | nocase |
Condition
filesize < 10KB and $x1 and 1 of ( $s* )In plain words (Heuristic)
- The file must be smaller than 10KB (a cheap guard that skips large files).
- At least 1 patterns in ( $s* ) must match.
- Pattern $x1 must be present.
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.
Licence & attribution
Author: Markus Neis,Swisscom
Source repository: Signature Base (Florian Roth / Nextron) @ 94a1c48d7a
Licence: Detection Rule License 1.1 (repository licence)
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: 25dcf166-4aea-5680-b161-c5fc8d74b987
Related rules
- APT / threat actorSignature Base (Florian Roth / Nextron)· Markus Neis,Swisscom· 2021-03-05
- APT / threat actorSignature Base (Florian Roth / Nextron)· S2WLAB_TALON_JACK2· 2021-07-09
- APT / threat actorSignature Base (Florian Roth / Nextron)· Markus Neis, Swisscom· 2020-06-18
- APT / threat actorSignature Base (Florian Roth / Nextron)· S2WLAB_TALON_JACK2· 2021-05-20