YARA · SEKOIA.IO Community
SEKOIA_Wiper_Win_Dnwipe
Detect the dnWipe malware
- Author
- Sekoia.io
- Date
- 2022-11-21
- Modified
- 2024-12-19
- Score / Quality
- 75 / 80
What this rule detects
Detect the dnWipe malware
Associated malware family: Dnwipe.
Targets: Windows PE.
It defines 3 patterns (3 text, 0 hex, 0 regex). YARA modules used: pe, hash.
YARA-X says: warning[deprecated_field]: field `number_of_resources` is deprecated
Summary generated from the rule's metadata and condition.
Rule source
Includes the imports needed to compile it on its own.
import "pe"
import "hash"
rule SEKOIA_Wiper_Win_Dnwipe : FILE
{
meta:
= "Detect the dnWipe malware"
= "Sekoia.io"
= "522fdaa5-8fe6-4e37-aaf8-13e3a7787d21"
= "2022-11-21"
= "2024-12-19"
= "https://github.com/SEKOIA-IO/Community"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/wiper_win_dnwipe.yar#L4-L26"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "634ca80a168c9d98ce87a3a1a451769bddb7ae27e28b3682693b34ccce2c7ad4"
= 75
= 80
= "FILE"
= "1.0"
= "TLP:CLEAR"
strings:
$ = "dnWIPE"
$ = "dnWIPE" wide
$ = "C:\\Users\\Admin1\\source\\repos\\dnWIPE\\dnWIPE\\obj\\Debug\\dnWIPE.pdb"
condition:
uint16( 0 ) == 0x5A4D and all of them and filesize < 50KB or for any i in ( 0 .. pe.number_of_resources -1 ) : ( hash.sha256 ( pe.resources [ i ] . offset , pe.resources [ i ] . length ) == "93290ef6447b0a16b92e50a1652ac3eb8f1237cc5f8005e080750fb58c19d230" )
}
Strings (3 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $ | text | "dnWIPE" | |
| $ | text | "dnWIPE" | wide |
| $ | text | "C:\\Users\\Admin1\\source\\repos\\dnWIPE\\dnWIPE\\obj\\Debug\\dnWIPE.pdb" |
Condition
uint16( 0 ) == 0x5A4D and all of them and filesize < 50KB or for any i in ( 0 .. pe.number_of_resources -1 ) : ( hash.sha256 ( pe.resources [ i ] . offset , pe.resources [ i ] . length ) == "93290ef6447b0a16b92e50a1652ac3eb8f1237cc5f8005e080750fb58c19d230" )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- The file must be smaller than 50KB (a cheap guard that skips large files).
- All patterns in the rule must match.
- A for-loop checks a property over several matches or items.
- Uses the pe module.
- Uses the hash module.
- Compares a hash of the file or a part of it.
Test this rule in your browser
Drop a file to scan it with this rule using YARA-X compiled to WebAssembly. Nothing is uploaded.
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: 522fdaa5-8fe6-4e37-aaf8-13e3a7787d21
Metadata
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Tags:FILE
Related rules
- MalwareMalpedia signator rules· Felix Bilstein - yara-signator at cocacoding dot com· 2026-05-04
- 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