Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Loader_Win_Revil_Loader

Detect the REvil loader using DDL side loading. The detected ressource is a legitimate executable used to load the malicious .dll containing the ransomware

MalwareRevilSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X (with warnings)
Author
Sekoia.io
Date
2021-07-19
Modified
2024-12-19
Score / Quality
75 / 80

What this rule detects

Detect the REvil loader using DDL side loading. The detected ressource is a legitimate executable used to load the malicious .dll containing the ransomware

Associated malware family: Revil.

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.

loader-win-revil-loader.yarDetection Rule License 1.1
import "pe"
import "hash"

rule SEKOIA_Loader_Win_Revil_Loader
{
	meta:
		description = "Detect the REvil loader using DDL side loading. The detected ressource is a legitimate executable used to load the malicious .dll containing the ransomware"
		author = "Sekoia.io"
		id = "3c293e87-e2d7-475a-9536-8b991961fa11"
		date = "2021-07-19"
		modified = "2024-12-19"
		reference = "https://www.mcafee.com/blogs/other-blogs/mcafee-labs/revil-ransomware-uses-dll-sideloading"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/loader_win_revil_loader.yar#L4-L34"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		hash = "1fe9b489c25bb23b04d9996e8107671edee69bd6f6def2fe7ece38a0fb35f98e"
		hash = "50416e50797cf88a48d086e718c003e2d10c3847b1a251669d6f10f8d3546e03"
		hash = "66490c59cb9630b53fa3fa7125b5c9511afde38edab4459065938c1974229ca8"
		hash = "81d0c71f8b282076cd93fb6bb5bfd3932422d033109e2c92572fc49e4abc2471"
		hash = "aae6e388e774180bc3eb96dad5d5bfefd63d0eb7124d68b6991701936801f1c7"
		hash = "d55f983c994caa160ec63a59f6b4250fe67fb3e8c43a388aec60a4a6978e9f1e"
		hash = "dc6b0e8c1e9c113f0364e1c8370060dee3fcbe25b667ddeca7623a95cd21411f"
		hash = "df2d6ef0450660aaae62c429610b964949812df2da1c57646fc29aa51c3f031e"
		logic_hash = "15680c5e5d801d65e581869ad88d89863c8a51e3f94a3d2f37c02c5fd14df07f"
		score = 75
		quality = 80
		tags = ""
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$crypto = ".\\crypto\\" ascii
		$dropped_name1 = "MsMpEng.exe" wide
		$dropped_name2 = "mpsvc.dll" ascii

	condition:
		all of ( $dropped_name* ) and #crypto > 100 and for any i in ( 0 .. pe.number_of_resources -1 ) : ( hash.sha256 ( pe.resources [ i ] . offset , pe.resources [ i ] . length ) == "33bc14d231a4afaa18f06513766d5f69d8b88f1e697cd127d24fb4b72ad44c7a" )
}

Strings (3 patterns)

IdentifierTypeValueModifiers
$cryptotext".\\crypto\\"ascii
$dropped_name1text"MsMpEng.exe"wide
$dropped_name2text"mpsvc.dll"ascii

Condition

all of ( $dropped_name* ) and #crypto > 100 and for any i in ( 0 .. pe.number_of_resources -1 ) : ( hash.sha256 ( pe.resources [ i ] . offset , pe.resources [ i ] . length ) == "33bc14d231a4afaa18f06513766d5f69d8b88f1e697cd127d24fb4b72ad44c7a" )

In plain words (Heuristic)

  • All patterns in ( $dropped_name* ) must match.
  • Pattern $crypto must occur > 100 times.
  • 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.

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

Open in editor

References

Sample hashes

Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).

  • 1fe9b489c25bb23b04d9996e8107671edee69bd6f6def2fe7ece38a0fb35f98e
  • 50416e50797cf88a48d086e718c003e2d10c3847b1a251669d6f10f8d3546e03
  • 66490c59cb9630b53fa3fa7125b5c9511afde38edab4459065938c1974229ca8
  • 81d0c71f8b282076cd93fb6bb5bfd3932422d033109e2c92572fc49e4abc2471
  • aae6e388e774180bc3eb96dad5d5bfefd63d0eb7124d68b6991701936801f1c7
  • d55f983c994caa160ec63a59f6b4250fe67fb3e8c43a388aec60a4a6978e9f1e
  • dc6b0e8c1e9c113f0364e1c8370060dee3fcbe25b667ddeca7623a95cd21411f
  • df2d6ef0450660aaae62c429610b964949812df2da1c57646fc29aa51c3f031e

Licence & attribution

Author: Sekoia.io

Source repository: SEKOIA.IO Community @ a438a5901a

Licence: Detection Rule License 1.1 (repository licence)

Original rule

Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.

Rule id: 3c293e87-e2d7-475a-9536-8b991961fa11

Metadata

version1.0
classificationTLP:CLEAR

More Revil rules