YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_Legionlocker
Detects LegionLocker ransomware
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-11-01
- Score / Quality
- 75 / 75
What this rule detects
Detects LegionLocker ransomware
Associated malware family: Legionlocker.
Targets: Windows PE.
It defines 11 patterns (11 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
malware-win-legionlocker.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Legionlocker : FILE
{
meta:
= "Detects LegionLocker ransomware"
= "ditekSHen"
= "4e5c50d0-808e-5adb-bce9-804ddf66ca61"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L5111-L5129"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "2da897b5603415f14fff134b3a94d77e6963da79e117d26ba16e6b04e45f4045"
= 75
= 75
= "FILE"
strings:
$m1 = "+Do not run task manager, powershell, cmd etc." ascii wide
$m2 = "3 hours your files will be deleted." ascii wide
$m3 = "files have been encrypted by Legion Locker" ascii wide
$s1 = "passwordBytes" fullword ascii
$s2 = "_start_enc_" ascii
$s3 = "_del_desktop_" ascii
$s4 = "Processhacker" wide
$s5 = "/k color 47 && del /f /s /q %userprofile%\\" wide
$s6 = "Submit code" fullword wide
$pdb1 = "\\obj\\Debug\\LegionLocker.pdb" ascii
$pdb2 = "\\obj\\Release\\LegionLocker.pdb" ascii
condition:
uint16( 0 ) == 0x5a4d and ( 1 of ( $m* ) or 1 of ( $pdb* ) or 4 of ( $s* ) )
}
Strings (11 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $m1 | text | "+Do not run task manager, powershell, cmd etc." | ascii wide |
| $m2 | text | "3 hours your files will be deleted." | ascii wide |
| $m3 | text | "files have been encrypted by Legion Locker" | ascii wide |
| $s1 | text | "passwordBytes" | fullword ascii |
| $s2 | text | "_start_enc_" | ascii |
| $s3 | text | "_del_desktop_" | ascii |
| $s4 | text | "Processhacker" | wide |
| $s5 | text | "/k color 47 && del /f /s /q %userprofile%\\" | wide |
| $s6 | text | "Submit code" | fullword wide |
| $pdb1 | text | "\\obj\\Debug\\LegionLocker.pdb" | ascii |
| $pdb2 | text | "\\obj\\Release\\LegionLocker.pdb" | ascii |
Condition
uint16( 0 ) == 0x5a4d and ( 1 of ( $m* ) or 1 of ( $pdb* ) or 4 of ( $s* ) )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- At least 1 patterns in ( $m* ) must match.
- At least 1 patterns in ( $pdb* ) must match.
- At least 4 patterns in ( $s* ) 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: 4e5c50d0-808e-5adb-bce9-804ddf66ca61
Tags:FILE
Related rules
- 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
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06