Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Egregor

Detects Egregor ransomware variants

MalwareEgregorditekSHen detectionBSD 2-Clause LicenseCompiles with YARA-X (with warnings)
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.

malware-win-egregor.yarBSD 2-Clause License
import "pe"

rule DITEKSHEN_MALWARE_Win_Egregor : FILE
{
	meta:
		description = "Detects Egregor ransomware variants"
		author = "ditekSHen"
		id = "2e24d4ec-39c2-5148-80a1-04f96bc8b477"
		date = "2020-11-06"
		modified = "2024-11-01"
		reference = "https://github.com/ditekshen/detection"
		source_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L2397-L2434"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "d39a7bf89a7574f7dfe56db78c8cdbbee97782f829805d4ee87fd9f1635154cd"
		score = 75
		quality = 75
		tags = "FILE"
		clamav_sig = "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)

IdentifierTypeValueModifiers
$s1text"C:\\Logmein\\{888-8888-9999}\\Logmein.log"fullword wide
$p1text"--deinstall"fullword wide
$p2text"--del"fullword wide
$p3text"--exit"fullword wide
$p4text"--kill"fullword wide
$p5text"--loud"fullword wide
$p6text"--nooperation"fullword wide
$p7text"--nop"fullword wide
$p8text"--skip"fullword wide
$p9text"--useless"fullword wide
$p10text"--yourmommy"fullword wide
$p11text"-passegregor"ascii wide
$p12text"-peguard"ascii wide
$p13text"--nomimikatz"ascii wide
$p14text"--multiproc"ascii wide
$p15text"--killrdp"ascii wide
$p16text"--nonet"ascii wide
$p17text"--norename"ascii wide
$p18text"--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.

Drop a file here or click to chooseScanned locally with YARA-X. Files up to 200 MB.

Open in editor

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).

Original rule

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_sigMALWARE.Win.Ransomware.Egregor

Tags:FILE

More Egregor rules