YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_Babuk
Detects Babuk ransomware
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-11-01
- Score / Quality
- 75 / 75
What this rule detects
Detects Babuk ransomware
Associated malware family: Babuk.
Targets: Windows PE.
It defines 15 patterns (14 text, 0 hex, 1 regex).
Summary generated from the rule's metadata and condition.
Rule source
malware-win-babuk.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Babuk : FILE
{
meta:
= "Detects Babuk ransomware"
= "ditekSHen"
= "6bb7093f-bbef-5b43-b4f9-be72ae4ef319"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L3652-L3674"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "5ca5c5106747cf8f4ccd5df4ddbc78321fea3c8f533cb807a704d270eb956007"
= 75
= 75
= "FILE"
strings:
$s1 = "ecdh_pub_k.bin" wide
$s2 = "How To Restore Your Files.txt" wide
$s3 = /(babuk|babyk)\s(ransomware|locker)/ ascii nocase
$s4 = "/login.php?id=" ascii
$s5 = "http://babuk" ascii
$s6 = "bootsect.bak" fullword wide
$s7 = "Can't open file after killHolder" ascii
$s8 = "Can't OpenProcess" ascii
$s9 = "DoYouWantToHaveSexWithCuongDong" ascii
$arg1 = "-lanfirst" fullword ascii
$arg2 = "-lansecond" fullword ascii
$arg3 = "-nolan" fullword ascii
$arg4 = "shares" fullword wide
$arg5 = "paths" fullword wide
$arg6 = "gdebug" fullword wide
condition:
uint16( 0 ) == 0x5a4d and ( 3 of ( $s* ) or ( 3 of ( $arg* ) and 2 of ( $s* ) ) )
}
Strings (15 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $s1 | text | "ecdh_pub_k.bin" | wide |
| $s2 | text | "How To Restore Your Files.txt" | wide |
| $s3 | regex | /(babuk|babyk)\s(ransomware|locker)/ | ascii nocase |
| $s4 | text | "/login.php?id=" | ascii |
| $s5 | text | "http://babuk" | ascii |
| $s6 | text | "bootsect.bak" | fullword wide |
| $s7 | text | "Can't open file after killHolder" | ascii |
| $s8 | text | "Can't OpenProcess" | ascii |
| $s9 | text | "DoYouWantToHaveSexWithCuongDong" | ascii |
| $arg1 | text | "-lanfirst" | fullword ascii |
| $arg2 | text | "-lansecond" | fullword ascii |
| $arg3 | text | "-nolan" | fullword ascii |
| $arg4 | text | "shares" | fullword wide |
| $arg5 | text | "paths" | fullword wide |
| $arg6 | text | "gdebug" | fullword wide |
Condition
uint16( 0 ) == 0x5a4d and ( 3 of ( $s* ) or ( 3 of ( $arg* ) and 2 of ( $s* ) ) )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- At least 3 patterns in ( $s* ) must match.
- At least 3 patterns in ( $arg* ) must match.
- At least 2 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: 6bb7093f-bbef-5b43-b4f9-be72ae4ef319
Tags:FILE
Related rules
- MalwareMalpedia signator rules· Felix Bilstein - yara-signator at cocacoding dot com· 2026-05-04
- MalwareMalpedia signator rules· Felix Bilstein - yara-signator at cocacoding dot com· 2024-10-31
- MalwareTrellix Advanced Research Center· TS @ McAfee ATR· 2021-01-19
- MalwareTrellix Advanced Research Center· McAfee ATR· 2021-02-19
- ARKBIRD_SOLG_RAN_Piton_Nov_2021_1Metadata onlyMalwareArkbird SOLG (DailyIOC)· Arkbird_SOLG· 2021-11-03
- MalwareditekSHen detection· ditekSHen· 2034-02-17
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06