YARA · Trellix Advanced Research Center
TRELLIX_ARC_Ransom_Egregor
Detect Egregor ransomware
- Author
- Thomas Roccia | McAfee ATR team
- Date
- 2020-10-28
- Score / Quality
- 75 / 70
What this rule detects
Detect Egregor ransomware
Associated malware family: Ransom/Egregor.
Targets: Windows PE.
It defines 5 patterns (5 text, 0 hex, 0 regex). YARA modules used: pe, hash.
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 TRELLIX_ARC_Ransom_Egregor : RANSOMWARE FILE
{
meta:
= "Detect Egregor ransomware"
= "Thomas Roccia | McAfee ATR team"
= "b9f1a712-c168-5e0f-8b9e-cb03a6c43fc3"
= "2020-10-28"
= "2020-10-28"
= "https://bazaar.abuse.ch/sample/004a2dc3ec7b98fa7fe6ae9c23a8b051ec30bcfcd2bc387c440c07ff5180fe9a/"
= "https://github.com/advanced-threat-research/Yara-Rules//blob/1919562a59f190bda60c982424f6a24c542ee3e0/ransomware/RANSOM_egregor.yar#L4-L31"
= "https://github.com/advanced-threat-research/Yara-Rules//blob/1919562a59f190bda60c982424f6a24c542ee3e0/LICENSE"
= "5f9fcbdf7ad86583eb2bbcaa5741d88a"
= "8077c656eed0b1633da54f8d017d4eff122f2f4e486c4e1af6f6434ea33c0675"
= 75
= 70
= "RANSOMWARE, FILE"
= "v1"
= "ransomware"
= "Ransom/Egregor"
= "Cybercrime"
= "egregor"
strings:
$p1 = "ewdk.pdb" fullword ascii
$p2 = "testbuild.pdb" fullword ascii
$s1 = "M:\\" nocase ascii
$s2 = "1z1M9U9" fullword wide
$s3 = "C:\\Logmein\\{888-8888-9999}\\Logmein.log" fullword wide
condition:
uint16( 0 ) == 0x5a4d and filesize < 2000KB and hash.sha256 ( pe.rich_signature.clear_data ) == "b030ed1a7ca222a0923a59f321be7e55b8d0fc24c1134df1ba775bcf0994c79c" or ( pe.sections [ 4 ] . name == ".gfids" and pe.sections [ 5 ] . name == ".00cfg" ) and ( any of ( $p* ) or 2 of ( $s* ) )
}
Strings (5 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $p1 | text | "ewdk.pdb" | fullword ascii |
| $p2 | text | "testbuild.pdb" | fullword ascii |
| $s1 | text | "M:\\" | nocase ascii |
| $s2 | text | "1z1M9U9" | fullword wide |
| $s3 | text | "C:\\Logmein\\{888-8888-9999}\\Logmein.log" | fullword wide |
Condition
uint16( 0 ) == 0x5a4d and filesize < 2000KB and hash.sha256 ( pe.rich_signature.clear_data ) == "b030ed1a7ca222a0923a59f321be7e55b8d0fc24c1134df1ba775bcf0994c79c" or ( pe.sections [ 4 ] . name == ".gfids" and pe.sections [ 5 ] . name == ".00cfg" ) and ( any of ( $p* ) or 2 of ( $s* ) )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- The file must be smaller than 2000KB (a cheap guard that skips large files).
- At least one pattern in ( $p* ) must match.
- At least 2 patterns in ( $s* ) must match.
- Uses the hash module.
- Uses the pe module.
- Compares a hash of the file or a part of it.
- Checks PE sections (names, count or properties).
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
Sample hashes
Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).
- 5f9fcbdf7ad86583eb2bbcaa5741d88a
Licence & attribution
Author: Thomas Roccia | McAfee ATR team
Source repository: Trellix Advanced Research Center @ 1919562a59
Licence: Apache License 2.0 (repository licence)
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: b9f1a712-c168-5e0f-8b9e-cb03a6c43fc3
Metadata
| rule_version | v1 |
|---|---|
| malware_type | ransomware |
| malware_family | Ransom/Egregor |
| actor_type | Cybercrime |
| actor_group | egregor |
Tags:RANSOMWAREFILE
Related rules
- MalwareTrellix Advanced Research Center· Marc Rivero | McAfee ATR Team· 2026-09-01
- MalwareTrellix Advanced Research Center· Marc Rivero | McAfee ATR Team· 2026-09-01
- MalwareTrellix Advanced Research Center· McAfee ATR team· 2026-09-01
- MalwareTrellix Advanced Research Center· Trellix ATR· 2022-01-06
- MalwareTrellix Advanced Research Center· Christiaan @ ATR· 2021-07-19
- MalwareTrellix Advanced Research Center· Marc Rivero | McAfee ATR Team· 2020-03-17
- MalwareTrellix Advanced Research Center· Marc Rivero | McAfee ATR Team· 2020-02-23
- MalwareTrellix Advanced Research Center· Marc Rivero | McAfee ATR Team· 2020-04-06