Locky_Ransomware
YARA-2016-0103
Critical
general
Active
Detects Locky Ransomware (matches also on Win32/Kuluoz)
Locky_Ransomware.yar
Valid Syntax
/*
This Yara ruleset is under the GNU-GPLv2 license (http://www.gnu.org/licenses/gpl-2.0.html) and open to any user or organization, as long as you use it under this license.
*/
/*
Yara Rule Set
Author: Florian Roth
Date: 2016-02-17
Identifier: Locky
*/
rule Locky_Ransomware : ransom {
meta:
description = "Detects Locky Ransomware (matches also on Win32/Kuluoz)"
author = "Florian Roth (with the help of binar.ly)"
reference = "https://goo.gl/qScSrE"
date = "2016-02-17"
hash = "5e945c1d27c9ad77a2b63ae10af46aee7d29a6a43605a9bfbf35cebbcff184d8"
strings:
$o1 = { 45 b8 99 f7 f9 0f af 45 b8 89 45 b8 } // address=0x4144a7
$o2 = { 2b 0a 0f af 4d f8 89 4d f8 c7 45 } // address=0x413863
condition:
all of ($o*)
}
rule Locky_Ransomware_2: ransom {
meta:
description = "Regla para detectar RANSOM.LOCKY"
author = "CCN-CERT"
version = "1.0"
strings:
$a1 = { 2E 00 6C 00 6F 00 63 00 6B 00 79 00 00 }
$a2 = { 00 5F 00 4C 00 6F 00 63 00 6B 00 79 00 }
$a3 = { 5F 00 72 00 65 00 63 00 6F 00 76 00 65 }
$a4 = { 00 72 00 5F 00 69 00 6E 00 73 00 74 00 }
$a5 = { 72 00 75 00 63 00 74 00 69 00 6F 00 6E }
$a6 = { 00 73 00 2E 00 74 00 78 00 74 00 00 }
$a7 = { 53 6F 66 74 77 61 72 65 5C 4C 6F 63 6B 79 00 }
condition:
all of them
}
Rule Metadata
description
Detects Locky Ransomware (matches also on Win32/Kuluoz)
author
Florian Roth (with the help of binar.ly)
reference
https://goo.gl/qScSrE
date
2016-02-17
hash
5e945c1d27c9ad77a2b63ae10af46aee7d29a6a43605a9bfbf35cebbcff184d8
Tags
ransom
String Definitions
{"name":"$o1","value":"{ 45 b8 99 f7 f9 0f af 45 b8 89 45 b8 } \/\/ address=0x4144a7"}
{"name":"$o2","value":"{ 2b 0a 0f af 4d f8 89 4d f8 c7 45 } \/\/ address=0x413863"}
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 Locky_Ransomware.yar /path/to/suspicious/file # Scan a directory recursively yara -r Locky_Ransomware.yar /path/to/directory/ # Scan with metadata output yara -m Locky_Ransomware.yar target_file # Scan process memory (Linux) yara Locky_Ransomware.yar /proc/[pid]/exe
Integration Examples
Python (yara-python)
import yara
rules = yara.compile(filepath='Locky_Ransomware.yar')
matches = rules.match('/path/to/file')
ClamAV Integration
clamscan --yara-rules=Locky_Ransomware.yar /path/to/scan
Rule Information
YARA ID
YARA-2016-0103
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