YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_Lockfile
Detects LockFile ransomware
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-11-01
- Score / Quality
- 75 / 71
What this rule detects
Detects LockFile ransomware
Associated malware family: Lockfile.
Targets: Windows PE.
It defines 9 patterns (9 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
malware-win-lockfile.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Lockfile : FILE
{
meta:
= "Detects LockFile ransomware"
= "ditekSHen"
= "762ac376-43ff-56d2-b279-2879ce6d8542"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L7998-L8014"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "28c8aa8931d599e5a1860fe2ed0b8172e709dad1a48a319858a907fa775af293"
= 75
= 71
= "FILE"
strings:
$x1 = "LOCKFILE" fullword ascii
$x2 = "25a01bb859125507013a2fe9737d3c33" fullword ascii
$s1 = "</key>" fullword ascii
$s2 = "<computername>%s</computername>" fullword ascii
$s3 = "<blocknum>%d</blocknum>" fullword ascii
$s4 = "%s\\%s-%s-%d%s" fullword ascii
$s5 = ">RAC=OQD:S>P@:AO?R:EEOS:ARDD=N?EENSB" ascii wide
$m1 = "<title>LOCKFILE</title>" ascii wide nocase
$m2 = "<hta:application id=LOCKFILE applicationName=LOCKFILE" ascii wide nocase
condition:
uint16( 0 ) == 0x5a4d and ( all of ( $x* ) or all of ( $s* ) or ( 1 of ( $x* ) and ( 2 of ( $s* ) or 1 of ( $m* ) ) ) or ( 1 of ( $m* ) and ( 1 of ( $x* ) or 2 of ( $s* ) ) ) )
}
Strings (9 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $x1 | text | "LOCKFILE" | fullword ascii |
| $x2 | text | "25a01bb859125507013a2fe9737d3c33" | fullword ascii |
| $s1 | text | "</key>" | fullword ascii |
| $s2 | text | "<computername>%s</computername>" | fullword ascii |
| $s3 | text | "<blocknum>%d</blocknum>" | fullword ascii |
| $s4 | text | "%s\\%s-%s-%d%s" | fullword ascii |
| $s5 | text | ">RAC=OQD:S>P@:AO?R:EEOS:ARDD=N?EENSB" | ascii wide |
| $m1 | text | "<title>LOCKFILE</title>" | ascii wide nocase |
| $m2 | text | "<hta:application id=LOCKFILE applicationName=LOCKFILE" | ascii wide nocase |
Condition
uint16( 0 ) == 0x5a4d and ( all of ( $x* ) or all of ( $s* ) or ( 1 of ( $x* ) and ( 2 of ( $s* ) or 1 of ( $m* ) ) ) or ( 1 of ( $m* ) and ( 1 of ( $x* ) or 2 of ( $s* ) ) ) )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 2 patterns in ( $s* ) must match.
- At least 1 patterns in ( $m* ) 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: 762ac376-43ff-56d2-b279-2879ce6d8542
Tags:FILE
Related rules
- MalwareMalpedia signator rules· Felix Bilstein - yara-signator at cocacoding dot com· 2026-05-04
- ARKBIRD_SOLG_MAL_Loader_Lockfile_Aug_2021_1Metadata onlyMalwareArkbird SOLG (DailyIOC)· Arkbird_SOLG· 2021-08-28
- 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