signature-base/yara/crime_wannacry.yar

107 lines
3.9 KiB
Plaintext
Raw Normal View History

2017-05-13 08:05:08 +00:00
/*
Yara Rule Set
Author: Florian Roth
Date: 2017-05-12
Identifier: WannaCry
Reference: https://goo.gl/HG2j5T
*/
/* Rule Set ----------------------------------------------------------------- */
rule WannaCry_Ransomware {
meta:
description = "Detects WannaCry Ransomware"
2017-05-13 17:27:58 +00:00
author = "Florian Roth (with the help of binar.ly)"
2017-05-13 08:05:08 +00:00
reference = "https://goo.gl/HG2j5T"
date = "2017-05-12"
hash1 = "ed01ebfbc9eb5bbea545af4d01bf5f1071661840480439c6e5babe8e080e41aa"
strings:
$x1 = "icacls . /grant Everyone:F /T /C /Q" fullword ascii
$x2 = "taskdl.exe" fullword ascii
2017-05-13 17:27:58 +00:00
$x3 = "tasksche.exe" fullword ascii
$x4 = "Global\\MsWinZonesCacheCounterMutexA" fullword ascii
$x5 = "WNcry@2ol7" fullword ascii
$x6 = "www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com" ascii
$x7 = "mssecsvc.exe" fullword ascii
$x8 = "C:\\%s\\qeriuwjhrf" fullword ascii
$x9 = "icacls . /grant Everyone:F /T /C /Q" fullword ascii
$s1 = "C:\\%s\\%s" fullword ascii
$s2 = "<!-- Windows 10 --> " fullword ascii
$s3 = "cmd.exe /c \"%s\"" fullword ascii
$s4 = "msg/m_portuguese.wnry" fullword ascii
2017-05-13 17:30:36 +00:00
$s5 = "\\\\192.168.56.20\\IPC$" fullword wide
$s6 = "\\\\172.16.99.5\\IPC$" fullword wide
2017-05-13 08:05:08 +00:00
2017-05-13 17:27:58 +00:00
$op1 = { 10 ac 72 0d 3d ff ff 1f ac 77 06 b8 01 00 00 00 }
$op2 = { 44 24 64 8a c6 44 24 65 0e c6 44 24 66 80 c6 44 }
$op3 = { 18 df 6c 24 14 dc 64 24 2c dc 6c 24 5c dc 15 88 }
2017-05-13 08:05:08 +00:00
condition:
2017-05-13 17:27:58 +00:00
uint16(0) == 0x5a4d and filesize < 10000KB and ( 1 of ($x*) and 1 of ($s*) or all of ($op*) )
2017-05-13 08:05:08 +00:00
}
2017-05-14 14:13:18 +00:00
rule WannaCry_Ransomware_Gen {
meta:
description = "Detects WannaCry Ransomware"
author = "Florian Roth (based on rule by US CERT)"
reference = "https://www.us-cert.gov/ncas/alerts/TA17-132A"
date = "2017-05-12"
hash1 = "9fe91d542952e145f2244572f314632d93eb1e8657621087b2ca7f7df2b0cb05"
hash2 = "8e5b5841a3fe81cade259ce2a678ccb4451725bba71f6662d0cc1f08148da8df"
hash3 = "4384bf4530fb2e35449a8e01c7e0ad94e3a25811ba94f7847c1e6612bbb45359"
strings:
$s1 = "__TREEID__PLACEHOLDER__" fullword ascii
$s2 = "__USERID__PLACEHOLDER__" fullword ascii
$s3 = "Windows for Workgroups 3.1a" fullword ascii
$s4 = "PC NETWORK PROGRAM 1.0" fullword ascii
$s5 = "LANMAN1.0" fullword ascii
condition:
uint16(0) == 0x5a4d and filesize < 5000KB and all of them
}
2017-05-13 08:05:08 +00:00
rule WannCry_m_vbs {
meta:
description = "Detects WannaCry Ransomware VBS"
author = "Florian Roth"
reference = "https://goo.gl/HG2j5T"
date = "2017-05-12"
hash1 = "51432d3196d9b78bdc9867a77d601caffd4adaa66dcac944a5ba0b3112bbea3b"
strings:
$x1 = ".TargetPath = \"C:\\@" ascii
$x2 = ".CreateShortcut(\"C:\\@" ascii
$s3 = " = WScript.CreateObject(\"WScript.Shell\")" ascii
condition:
( uint16(0) == 0x4553 and filesize < 1KB and all of them )
}
rule WannCry_BAT {
meta:
description = "Detects WannaCry Ransomware BATCH File"
author = "Florian Roth"
reference = "https://goo.gl/HG2j5T"
date = "2017-05-12"
hash1 = "f01b7f52e3cb64f01ddc248eb6ae871775ef7cb4297eba5d230d0345af9a5077"
strings:
$s1 = "@.exe\">> m.vbs" ascii
$s2 = "cscript.exe //nologo m.vbs" fullword ascii
$s3 = "echo SET ow = WScript.CreateObject(\"WScript.Shell\")> " ascii
$s4 = "echo om.Save>> m.vbs" fullword ascii
condition:
( uint16(0) == 0x6540 and filesize < 1KB and 1 of them )
}
rule WannaCry_RansomNote {
meta:
description = "Detects WannaCry Ransomware Note"
author = "Florian Roth"
reference = "https://goo.gl/HG2j5T"
date = "2017-05-12"
hash1 = "4a25d98c121bb3bd5b54e0b6a5348f7b09966bffeec30776e5a731813f05d49e"
strings:
$s1 = "A: Don't worry about decryption." fullword ascii
$s2 = "Q: What's wrong with my files?" fullword ascii
condition:
( uint16(0) == 0x3a51 and filesize < 2KB and all of them )
}