YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_Egregor
Detects Egregor ransomware variants
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-11-01
- Score / Quality
- 75 / 75
What this rule detects
Detects Egregor ransomware variants
Associated malware family: Egregor.
Targets: Windows PE.
It defines 19 patterns (19 text, 0 hex, 0 regex). YARA modules used: pe.
YARA-X says: warning[deprecated_field]: field `number_of_sections` 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"
rule DITEKSHEN_MALWARE_Win_Egregor : FILE
{
meta:
= "Detects Egregor ransomware variants"
= "ditekSHen"
= "2e24d4ec-39c2-5148-80a1-04f96bc8b477"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L2397-L2434"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "d39a7bf89a7574f7dfe56db78c8cdbbee97782f829805d4ee87fd9f1635154cd"
= 75
= 75
= "FILE"
= "MALWARE.Win.Ransomware.Egregor"
strings:
$s1 = "C:\\Logmein\\{888-8888-9999}\\Logmein.log" fullword wide
$p1 = "--deinstall" fullword wide
$p2 = "--del" fullword wide
$p3 = "--exit" fullword wide
$p4 = "--kill" fullword wide
$p5 = "--loud" fullword wide
$p6 = "--nooperation" fullword wide
$p7 = "--nop" fullword wide
$p8 = "--skip" fullword wide
$p9 = "--useless" fullword wide
$p10 = "--yourmommy" fullword wide
$p11 = "-passegregor" ascii wide
$p12 = "-peguard" ascii wide
$p13 = "--nomimikatz" ascii wide
$p14 = "--multiproc" ascii wide
$p15 = "--killrdp" ascii wide
$p16 = "--nonet" ascii wide
$p17 = "--norename" ascii wide
$p18 = "--greetings" ascii wide
condition:
( uint16( 0 ) == 0x5a4d and pe.is_dll ( ) and ( ( all of ( $s* ) and 1 of ( $p* ) ) or ( 2 of them and filesize < 1000KB and for any i in ( 0 .. pe.number_of_sections ) : ( ( pe.sections [ i ] . name == ".00cfg" ) ) ) ) ) or 8 of ( $p* )
}
Strings (19 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $s1 | text | "C:\\Logmein\\{888-8888-9999}\\Logmein.log" | fullword wide |
| $p1 | text | "--deinstall" | fullword wide |
| $p2 | text | "--del" | fullword wide |
| $p3 | text | "--exit" | fullword wide |
| $p4 | text | "--kill" | fullword wide |
| $p5 | text | "--loud" | fullword wide |
| $p6 | text | "--nooperation" | fullword wide |
| $p7 | text | "--nop" | fullword wide |
| $p8 | text | "--skip" | fullword wide |
| $p9 | text | "--useless" | fullword wide |
| $p10 | text | "--yourmommy" | fullword wide |
| $p11 | text | "-passegregor" | ascii wide |
| $p12 | text | "-peguard" | ascii wide |
| $p13 | text | "--nomimikatz" | ascii wide |
| $p14 | text | "--multiproc" | ascii wide |
| $p15 | text | "--killrdp" | ascii wide |
| $p16 | text | "--nonet" | ascii wide |
| $p17 | text | "--norename" | ascii wide |
| $p18 | text | "--greetings" | ascii wide |
Condition
( uint16( 0 ) == 0x5a4d and pe.is_dll ( ) and ( ( all of ( $s* ) and 1 of ( $p* ) ) or ( 2 of them and filesize < 1000KB and for any i in ( 0 .. pe.number_of_sections ) : ( ( pe.sections [ i ] . name == ".00cfg" ) ) ) ) ) or 8 of ( $p* )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- The file must be smaller than 1000KB (a cheap guard that skips large files).
- All patterns in ( $s* ) must match.
- At least 1 patterns in ( $p* ) must match.
- At least 2 patterns in the rule must match.
- At least 8 patterns in ( $p* ) must match.
- A for-loop checks a property over several matches or items.
- Uses the pe module.
- Checks PE sections (names, count or properties).
- Requires a DLL.
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: ditekSHen
Source repository: ditekSHen detection @ e76c93dcde
Licence: BSD 2-Clause License (repository licence)
Copyright notice: Copyright 2021 by ditekSHen (https://github.com/ditekshen/detection).
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: 2e24d4ec-39c2-5148-80a1-04f96bc8b477
Metadata
| clamav_sig | MALWARE.Win.Ransomware.Egregor |
|---|
Tags:FILE
Related rules
- ARKBIRD_SOLG_Ran_Egregor_Oct_2020_1Metadata onlyMalwareArkbird SOLG (DailyIOC)· Arkbird_SOLG· 2020-10-29
- ARKBIRD_SOLG_Ran_Egregor_Sept_2020_1Metadata onlyMalwareArkbird SOLG (DailyIOC)· Arkbird_SOLG· 2020-10-07
- MalwareditekSHen detection· ditekSHen· 2034-02-17
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06