WannaCry_Ransomware_Dropper
YARA-2017-12870
Critical
general
Active
WannaCry Ransomware Dropper
WannaCry_Ransomware_Dropper.yar
Valid Syntax
import "pe"
rule WannaCry_Ransomware_Dropper
{
meta:
description = "WannaCry Ransomware Dropper"
reference = "https://www.cylance.com/en_us/blog/threat-spotlight-inside-the-wannacry-attack.html"
date = "2017-05-12"
strings:
$s1 = "cmd.exe /c \"%s\"" fullword ascii
$s2 = "tasksche.exe" fullword ascii
$s3 = "icacls . /grant Everyone:F /T /C /Q" fullword ascii
$s4 = "Global\\MsWinZonesCacheCounterMutexA" fullword ascii
condition:
uint16(0) == 0x5a4d and
filesize < 4MB and
all of them
}
rule WannaCry_SMB_Exploit
{
meta:
description = "WannaCry SMB Exploit"
reference = "https://www.cylance.com/en_us/blog/threat-spotlight-inside-the-wannacry-attack.html"
date = "2017-05-12"
strings:
$s1 = { 53 4D 42 72 00 00 00 00 18 53 C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FE 00 00 40 00 00 62 00 02 50 43 20 4E 45 54 57 4F 52 4B 20 50 52 4F 47 52 41 4D 20 31 2E 30 00 02 4C 41 4E 4D 41 4E 31 2E 30 00 02 57 69 6E 64 6F 77 73 20 66 6F 72 20 57 6F 72 6B 67 72 6F 75 70 73 20 33 2E 31 61 00 02 4C 4D 31 2E 32 58 30 30 32 00 02 4C 41 4E 4D 41 4E 32 2E 31 00 02 4E 54 20 4C 4D 20 30 2E 31 32 00 00 00 00 00 00 00 88 FF 53 4D 42 73 00 00 00 00 18 07 C0 }
condition:
uint16(0) == 0x5a4d and
filesize < 4MB and
all of them and
pe.imports("ws2_32.dll", "connect") and
pe.imports("ws2_32.dll", "send") and
pe.imports("ws2_32.dll", "recv") and
pe.imports("ws2_32.dll", "socket") and
pe.imports("ws2_32.dll", "closesocket")
}
Rule Metadata
description
WannaCry Ransomware Dropper
reference
https://www.cylance.com/en_us/blog/threat-spotlight-inside-the-wannacry-attack.html
date
2017-05-12
String Definitions
{"name":"$s1","value":"\"cmd.exe \/c \\\"%s\\\"\" fullword ascii"}
{"name":"$s2","value":"\"tasksche.exe\" fullword ascii"}
{"name":"$s3","value":"\"icacls . \/grant Everyone:F \/T \/C \/Q\" fullword ascii"}
{"name":"$s4","value":"\"Global\\\\MsWinZonesCacheCounterMutexA\" fullword ascii"}
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 WannaCry_Ransomware_Dropper.yar /path/to/suspicious/file # Scan a directory recursively yara -r WannaCry_Ransomware_Dropper.yar /path/to/directory/ # Scan with metadata output yara -m WannaCry_Ransomware_Dropper.yar target_file # Scan process memory (Linux) yara WannaCry_Ransomware_Dropper.yar /proc/[pid]/exe
Integration Examples
Python (yara-python)
import yara
rules = yara.compile(filepath='WannaCry_Ransomware_Dropper.yar')
matches = rules.match('/path/to/file')
ClamAV Integration
clamscan --yara-rules=WannaCry_Ransomware_Dropper.yar /path/to/scan
Rule Information
YARA ID
YARA-2017-12870
Author
Unknown
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