YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_Medusalocker
Detects MedusaLocker ransomware
- Author
- ditekshen
- Date
- 2020-11-06
- Modified
- 2024-11-01
- Score / Quality
- 75 / 73
What this rule detects
Detects MedusaLocker ransomware
Associated malware family: Medusalocker.
Targets: Windows PE.
It defines 20 patterns (18 text, 2 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
malware-win-medusalocker.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Medusalocker : FILE
{
meta:
= "Detects MedusaLocker ransomware"
= "ditekshen"
= "06b7645f-228d-5ec1-9b82-88caee447a5c"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L2506-L2537"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "0e2a0a9f12f550a5c6a11731710e0dc2c2e26d17f43d2385bf6e298518631771"
= 75
= 73
= "FILE"
= "MALWARE.Win.Ransomware.MedusaLocker"
strings:
$x1 = "\\MedusaLockerInfo\\MedusaLockerProject\\MedusaLocker\\Release\\MedusaLocker.pdb" ascii
$x2 = "SOFTWARE\\Medusa" wide
$x3 = "=?utf-8?B?0RFQctTF0YDQcNC60IXQvdC+IEludGVybmV0IED4cGxvseVyIDEz?=" ascii
$s1 = "Recovery_Instructions.mht" fullword wide
$s2 = "README_LOCK.TXT" fullword wide
$s3 = "C:\\Users\\Public\\Desktop" wide
$s4 = "[LOCKER] " wide
$s5 = "TmV3LUl0ZW0gJ2" ascii
$s6 = "<HEAD>=20" ascii
$s7 = "LIST OF ENCRYPTED FILES" ascii
$s8 = "KEY.FILE" ascii
$cmd1 = { 2f 00 63 00 20 00 64 00 65 00 6c 00 20 00 00 00 20 00 3e 00 3e 00 20 00 4e 00 55 00 4c 00 }
$cmd2 = "vssadmin.exe delete" wide nocase
$cmd3 = "bcdedit.exe /set {default}" wide
$cmd4 = "wbadmin delete systemstatebackup" wide nocase
$mut1 = "{8761ABBD-7F85-42EE-B272-A76179687C63}" fullword wide
$mut2 = "{3E5FC7F9-9A51-4367-9063-A120244FBEC7}" fullword wide
$mut3 = "{6EDD6D74-C007-4E75-B76A-E5740995E24C}" fullword wide
$ext1 = { 2e 00 52 00 65 00 61 00 64 00 49 00 6e 00 73 00
74 00 72 00 75 00 63 00 74 00 69 00 6f 00 6e 00
73 00 00 00 00 00 00 00 2e 00 6b 00 65 00 76 00
65 00 72 00 73 00 65 00 6e }
$ext2 = ".exe,.dll,.sys,.ini,.lnk,.rdp,.encrypted" fullword ascii
condition:
uint16( 0 ) == 0x5a4d and ( 2 of ( $x* ) or ( 1 of ( $x* ) and ( 4 of ( $s* ) or 1 of ( $mut* ) ) ) or 6 of ( $s* ) or ( 1 of ( $mut* ) and 2 of ( $cmd* ) ) or ( 1 of ( $ext* ) and 5 of them ) )
}
Strings (20 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $x1 | text | "\\MedusaLockerInfo\\MedusaLockerProject\\MedusaLocker\\Release\\MedusaLocker.pdb" | ascii |
| $x2 | text | "SOFTWARE\\Medusa" | wide |
| $x3 | text | "=?utf-8?B?0RFQctTF0YDQcNC60IXQvdC+IEludGVybmV0IED4cGxvseVyIDEz?=" | ascii |
| $s1 | text | "Recovery_Instructions.mht" | fullword wide |
| $s2 | text | "README_LOCK.TXT" | fullword wide |
| $s3 | text | "C:\\Users\\Public\\Desktop" | wide |
| $s4 | text | "[LOCKER] " | wide |
| $s5 | text | "TmV3LUl0ZW0gJ2" | ascii |
| $s6 | text | "<HEAD>=20" | ascii |
| $s7 | text | "LIST OF ENCRYPTED FILES" | ascii |
| $s8 | text | "KEY.FILE" | ascii |
| $cmd1 | hex | { 2f 00 63 00 20 00 64 00 65 00 6c 00 20 00 00 00 20 00 3e 00 3e 00 20 00 4e 00 55 00 4c 00 } | |
| $cmd2 | text | "vssadmin.exe delete" | wide nocase |
| $cmd3 | text | "bcdedit.exe /set {default}" | wide |
| $cmd4 | text | "wbadmin delete systemstatebackup" | wide nocase |
| $mut1 | text | "{8761ABBD-7F85-42EE-B272-A76179687C63}" | fullword wide |
| $mut2 | text | "{3E5FC7F9-9A51-4367-9063-A120244FBEC7}" | fullword wide |
| $mut3 | text | "{6EDD6D74-C007-4E75-B76A-E5740995E24C}" | fullword wide |
| $ext1 | hex | { 2e 00 52 00 65 00 61 00 64 00 49 00 6e 00 73 00 74 00 72 00 75 00 63 00 74 00 69 00 6f 00 6e 00 73 00 00 00 00 00 00 00 2 … | |
| $ext2 | text | ".exe,.dll,.sys,.ini,.lnk,.rdp,.encrypted" | fullword ascii |
Condition
uint16( 0 ) == 0x5a4d and ( 2 of ( $x* ) or ( 1 of ( $x* ) and ( 4 of ( $s* ) or 1 of ( $mut* ) ) ) or 6 of ( $s* ) or ( 1 of ( $mut* ) and 2 of ( $cmd* ) ) or ( 1 of ( $ext* ) and 5 of them ) )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- At least 2 patterns in ( $x* ) must match.
- At least 1 patterns in ( $x* ) must match.
- At least 4 patterns in ( $s* ) must match.
- At least 1 patterns in ( $mut* ) must match.
- At least 6 patterns in ( $s* ) must match.
- At least 2 patterns in ( $cmd* ) must match.
- At least 1 patterns in ( $ext* ) must match.
- At least 5 patterns in the rule must match.
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.
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: 06b7645f-228d-5ec1-9b82-88caee447a5c
Metadata
| clamav_sig | MALWARE.Win.Ransomware.MedusaLocker |
|---|
Tags:FILE
Related rules
- MalwareMalpedia signator rules· Felix Bilstein - yara-signator at cocacoding dot com· 2026-05-04
- ARKBIRD_SOLG_RAN_Medusalocker_Aug_2021_1Metadata onlyMalwareArkbird SOLG (DailyIOC)· Arkbird_SOLG· 2021-08-08
- ARKBIRD_SOLG_RAN_Medusalocker_July_2021_1Metadata onlyMalwareArkbird SOLG (DailyIOC)· Arkbird_SOLG· 2021-07-25
- 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