YARA · SEKOIA.IO Community
SEKOIA_Shell_Win_Danfuan
Detect the Danfuan malware
- Author
- Sekoia.io
- Date
- 2022-11-04
- Modified
- 2024-12-19
- Score / Quality
- 75 / 80
What this rule detects
Detect the Danfuan malware
It defines 3 patterns (3 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
shell-win-danfuan.yarDetection Rule License 1.1
rule SEKOIA_Shell_Win_Danfuan : FILE
{
meta:
= "Detect the Danfuan malware"
= "Sekoia.io"
= "d1cf9988-270b-4a22-bdd5-f40b625715a8"
= "2022-11-04"
= "2024-12-19"
= "https://github.com/SEKOIA-IO/Community"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/shell_win_danfuan.yar#L1-L18"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "96929ef478a8773022233a4092b3c157867aae6ee185568a6327d033c05a68f1"
= 75
= 80
= "FILE"
= "1.0"
= "TLP:CLEAR"
strings:
$ = "<%@ WebHandler Language=\"C#\" class=\"DynamicCodeCompiler\"%>"
$ = "CompilerResults compilerResults = compiler.CompileAssemblyFromSource(comPara, SourceText(txt))"
$ = "MethodInfo objMifo = objInstance.GetType().GetMethod("
condition:
filesize < 15KB and all of them
}
Strings (3 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $ | text | "<%@ WebHandler Language=\"C#\" class=\"DynamicCodeCompiler\"%>" | |
| $ | text | "CompilerResults compilerResults = compiler.CompileAssemblyFromSource(comPara, SourceText(txt))" | |
| $ | text | "MethodInfo objMifo = objInstance.GetType().GetMethod(" |
Condition
filesize < 15KB and all of themIn plain words (Heuristic)
- The file must be smaller than 15KB (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.
References
Licence & attribution
Author: Sekoia.io
Source repository: SEKOIA.IO Community @ a438a5901a
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: d1cf9988-270b-4a22-bdd5-f40b625715a8
Metadata
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Tags:FILE
Related rules
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-07-16
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-08-23
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-04-22
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-07-23
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-10-20
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-03-20
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-03-20
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-03-20