YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_Locked
Detects Locked ransomware
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-11-01
- Score / Quality
- 75 / 73
What this rule detects
Detects Locked ransomware
Associated malware family: Locked.
Targets: Windows PE.
It defines 9 patterns (8 text, 0 hex, 1 regex).
Summary generated from the rule's metadata and condition.
Rule source
malware-win-locked.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Locked : FILE
{
meta:
= "Detects Locked ransomware"
= "ditekSHen"
= "ad2f91ab-9bbb-5d47-a5c3-5a38dbab2ebe"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L9098-L9114"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "b838b996946fb268c66bac68d5e326ff3049340dfb08f2e0a77492df49915d5a"
= 75
= 73
= "FILE"
strings:
$x1 = "http://xxxx.onion/xxxx-xxxx-xxxx-xxxx" ascii
$x2 = "http://pigetrzlperjreyr3fbytm27bljaq4eungv3gdq2tohnoyfrqu4bx5qd.onion" ascii
$x3 = "dHA6Ly94eHh4Lm9uaW9uL3h4eHgteHh4eC14eHh4LXh4eHg" ascii
$s1 = "choice /t 1 /d y /n >nul" ascii
$s2 = ".locked" fullword ascii
$s3 = "c:\\system volume information" fullword ascii
$s4 = "__$$RECOVERY_README$$__.html" fullword ascii
$s5 = "Trunc..." fullword ascii
$s6 = /C:\\windows\\temp\\[a-z0-9A-Z]{6}\.tmp/ fullword ascii
condition:
uint16( 0 ) == 0x5a4d and ( all of ( $x* ) or all of ( $s* ) or ( 1 of ( $x* ) and 4 of ( $s* ) ) or ( #s6 > 1 and 4 of them ) )
}
Strings (9 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $x1 | text | "http://xxxx.onion/xxxx-xxxx-xxxx-xxxx" | ascii |
| $x2 | text | "http://pigetrzlperjreyr3fbytm27bljaq4eungv3gdq2tohnoyfrqu4bx5qd.onion" | ascii |
| $x3 | text | "dHA6Ly94eHh4Lm9uaW9uL3h4eHgteHh4eC14eHh4LXh4eHg" | ascii |
| $s1 | text | "choice /t 1 /d y /n >nul" | ascii |
| $s2 | text | ".locked" | fullword ascii |
| $s3 | text | "c:\\system volume information" | fullword ascii |
| $s4 | text | "__$$RECOVERY_README$$__.html" | fullword ascii |
| $s5 | text | "Trunc..." | fullword ascii |
| $s6 | regex | /C:\\windows\\temp\\[a-z0-9A-Z]{6}\.tmp/ | fullword ascii |
Condition
uint16( 0 ) == 0x5a4d and ( all of ( $x* ) or all of ( $s* ) or ( 1 of ( $x* ) and 4 of ( $s* ) ) or ( #s6 > 1 and 4 of them ) )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- All patterns in ( $x* ) must match.
- All patterns in ( $s* ) must match.
- At least 1 patterns in ( $x* ) must match.
- At least 4 patterns in ( $s* ) must match.
- At least 4 patterns in the rule must match.
- Pattern $s6 must occur > 1 times.
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: ad2f91ab-9bbb-5d47-a5c3-5a38dbab2ebe
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