YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_Virlock
Detects VirLock ransomware
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-11-01
- Score / Quality
- 75 / 75
What this rule detects
Detects VirLock ransomware
Associated malware family: Virlock.
Targets: Windows PE.
It defines 11 patterns (10 text, 0 hex, 1 regex).
Summary generated from the rule's metadata and condition.
Rule source
malware-win-virlock.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Virlock : FILE
{
meta:
= "Detects VirLock ransomware"
= "ditekSHen"
= "dbf46963-3e74-54a0-8f7d-b24436c3ea2c"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L8606-L8624"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "8d516a0d771d7134c0f917f010b3973ed53b4ee7e4a2cf0bb5daecf9867b0081"
= 75
= 75
= "FILE"
strings:
$x1 = "BThere are two ways to pay a fine:" fullword wide
$x2 = "^Es gibt zwei M" fullword wide
$x3 = "glichkeiten, eine Strafe zahlen." fullword wide
$x4 = /usertile\d+\.bmp/ fullword wide
$s1 = "WinSock 2.0" fullword ascii
$s2 = "Running" fullword ascii
$s3 = "echo WScript.Sleep(50)>%TEMP%/file.vbs" fullword ascii
$s4 = "cscript %TEMP%/file.vbs" fullword ascii
$s5 = "del /F /Q file.js" fullword ascii
$s6 = "del /F /Q %1" fullword ascii
$s7 = "del /F /Q %0" fullword ascii
condition:
( uint16( 0 ) == 0x5a4d and ( ( 2 of ( $x* ) and 2 of ( $s* ) ) or ( 5 of ( $s* ) and 1 of ( $x* ) ) ) ) or ( 8 of them )
}
Strings (11 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $x1 | text | "BThere are two ways to pay a fine:" | fullword wide |
| $x2 | text | "^Es gibt zwei M" | fullword wide |
| $x3 | text | "glichkeiten, eine Strafe zahlen." | fullword wide |
| $x4 | regex | /usertile\d+\.bmp/ | fullword wide |
| $s1 | text | "WinSock 2.0" | fullword ascii |
| $s2 | text | "Running" | fullword ascii |
| $s3 | text | "echo WScript.Sleep(50)>%TEMP%/file.vbs" | fullword ascii |
| $s4 | text | "cscript %TEMP%/file.vbs" | fullword ascii |
| $s5 | text | "del /F /Q file.js" | fullword ascii |
| $s6 | text | "del /F /Q %1" | fullword ascii |
| $s7 | text | "del /F /Q %0" | fullword ascii |
Condition
( uint16( 0 ) == 0x5a4d and ( ( 2 of ( $x* ) and 2 of ( $s* ) ) or ( 5 of ( $s* ) and 1 of ( $x* ) ) ) ) or ( 8 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 2 patterns in ( $s* ) must match.
- At least 5 patterns in ( $s* ) must match.
- At least 1 patterns in ( $x* ) must match.
- At least 8 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: dbf46963-3e74-54a0-8f7d-b24436c3ea2c
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