BabukRansomware
YARA-2021-0186
Critical
general
Active
YARA rule for Babuk Ransomware
BabukRansomware.yar
Valid Syntax
rule BabukRansomware {
meta:
description = "YARA rule for Babuk Ransomware"
reference = "http://chuongdong.com/reverse%20engineering/2021/01/03/BabukRansomware/"
author = "@cPeterr"
date = "2021-01-03"
rule_version = "v1"
malware_type = "ransomware"
tlp = "white"
strings:
$lanstr1 = "-lanfirst"
$lanstr2 = "-lansecond"
$lanstr3 = "-nolan"
$str1 = "BABUK LOCKER"
$str2 = ".__NIST_K571__" wide
$str3 = "How To Restore Your Files.txt" wide
$str4 = "ecdh_pub_k.bin" wide
condition:
all of ($str*) and all of ($lanstr*)
}
Rule Metadata
description
YARA rule for Babuk Ransomware
reference
http://chuongdong.com/reverse%20engineering/2021/01/03/BabukRansomware/
author
@cPeterr
date
2021-01-03
rule_version
v1
malware_type
ransomware
tlp
white
String Definitions
{"name":"$lanstr1","value":"\"-lanfirst\""}
{"name":"$lanstr2","value":"\"-lansecond\""}
{"name":"$lanstr3","value":"\"-nolan\""}
{"name":"$str1","value":"\"BABUK LOCKER\""}
{"name":"$str2","value":"\".__NIST_K571__\" wide"}
{"name":"$str3","value":"\"How To Restore Your Files.txt\" wide"}
{"name":"$str4","value":"\"ecdh_pub_k.bin\" wide"}
Threat Analysis
This YARA rule is designed to detect general threats.
Severity Level: Critical
The rule uses pattern matching to identify specific byte sequences, strings, or behavioral patterns associated with malicious activity.
Detection Capabilities
- File-based detection for executables and documents
- Memory scanning for running processes
- Network traffic analysis support
Command Line Usage
# Scan a single file yara BabukRansomware.yar /path/to/suspicious/file # Scan a directory recursively yara -r BabukRansomware.yar /path/to/directory/ # Scan with metadata output yara -m BabukRansomware.yar target_file # Scan process memory (Linux) yara BabukRansomware.yar /proc/[pid]/exe
Integration Examples
Python (yara-python)
import yara
rules = yara.compile(filepath='BabukRansomware.yar')
matches = rules.match('/path/to/file')
ClamAV Integration
clamscan --yara-rules=BabukRansomware.yar /path/to/scan
Rule Information
YARA ID
YARA-2021-0186
Author
Repository
Created
August 19, 2025
Last Updated
August 19, 2025
Last Imported
Never
Threat Intelligence
Risk Level
Critical
Category
general
Detection Confidence
Analysis Pending
False Positive Rate
Not Available
Last Seen in Wild
No Data
Related Rules
Export Options
Similar Rules in general
YARA-2023-0001
CRI
Detect_Mimic_Ransomware
Detect_Mimic_Ransomware
YARA-2023-0002
MED
SystemBC_malware
Detect_SystemBC
YARA-2023-0003
MED
detect_catB
detect_CatB_ransomware
YARA-2022-0001
MED
detect_Typhon_Stealer
detect_Typhon_Stealer
YARA-2023-0004
MED
Nosu_stealer
Detect_Nosu_stealer
YARA-2022-0002
MED
detect_Lumma_stealer
detect_Lumma_stealer
YARA-2022-0003
MED
detect_StrelaStealer
detect_StrelaStealer
YARA-2022-0004
MED
detect_silence_Downloader
detect_silence_Downloader