Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Getcrypt

GetCrypt ransomware payload

MalwareGetcryptditekSHen detectionBSD 2-Clause LicenseCompiles with YARA-X
Author
ditekSHen
Date
2020-11-06
Modified
2024-11-01
Score / Quality
75 / 73

What this rule detects

GetCrypt ransomware payload

Associated malware family: Getcrypt.

Targets: Windows PE.

It defines 16 patterns (15 text, 1 hex, 0 regex).

Summary generated from the rule's metadata and condition.

Rule source

malware-win-getcrypt.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Getcrypt : FILE
{
	meta:
		description = "GetCrypt ransomware payload"
		author = "ditekSHen"
		id = "fb6db807-372f-59e6-96c6-54dd4ece336d"
		date = "2020-11-06"
		modified = "2024-11-01"
		reference = "https://github.com/ditekshen/detection"
		source_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L789-L825"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "fd7ee98757c3ac1f2b2a4dd9041c78d33273d7a7d596c3d99c6b8d79988f29f1"
		score = 75
		quality = 73
		tags = "FILE"
		clamav_sig1 = "MALWARE_Win.Ransomware.GetCrypt-1"
		clamav_sig2 = "MALWARE_Win.Ransomware.GetCrypt-2"

	strings:
		$x1 = "delete shadows /all /quiet" wide
		$x2 = "C:\\Windows\\System32\\svchost.exe" fullword wide
		$x3 = "desk.bmp" fullword wide
		$x4 = ":\\Boot" fullword wide
		$x5 = "\\encrypted_key.bin" fullword wide
		$x6 = "vssadmin.exe" fullword wide
		$x7 = ":\\Recovery" fullword wide
		$s1 = "CryptEncrypt" fullword ascii
		$s2 = "NtWow64ReadVirtualMemory64" fullword ascii
		$s3 = "MPR.dll" fullword ascii
		$s4 = "%key%" fullword ascii
		$s5 = "CryptDestroyKey" fullword ascii
		$s6 = "ntdll.dll" fullword ascii
		$s7 = "WNetCancelConnection2W" fullword ascii
		$s8 = ".%c%c%c%c" fullword wide
		$s10 = { 43 72 79 70 74 49 6d 70 6f 72 74 4b 65 79 00 00
                 cb 00 43 72 79 70 74 45 6e 63 72 79 70 74 00 00
                 c1 00 43 72 79 70 74 41 63 71 75 69 72 65 43 6f
                 6e 74 65 78 74 41 00 00 c8 00 43 72 79 70 74 44
                 65 73 74 72 6f 79 4b 65 79 00 d2 00 43 72 79 70
                 74 47 65 6e 52 61 6e 64 6f 6d 00 00 c2 00 43 72
                 79 70 74 41 63 71 75 69 72 65 43 6f 6e 74 65 78
                 74 57 00 00 41 44 56 41 50 49 33 32 2e 64 6c 6c
                 00 00 b5 01 53 68 65 6c 6c 45 78 65 63 75 74 65
                 45 78 57 00 53 48 45 4c 4c 33 32 2e 64 6c 6c 00 }

	condition:
		uint16( 0 ) == 0x5a4d and ( 3 of ( $x* ) or 8 of ( $s* ) )
}

Strings (16 patterns)

IdentifierTypeValueModifiers
$x1text"delete shadows /all /quiet"wide
$x2text"C:\\Windows\\System32\\svchost.exe"fullword wide
$x3text"desk.bmp"fullword wide
$x4text":\\Boot"fullword wide
$x5text"\\encrypted_key.bin"fullword wide
$x6text"vssadmin.exe"fullword wide
$x7text":\\Recovery"fullword wide
$s1text"CryptEncrypt"fullword ascii
$s2text"NtWow64ReadVirtualMemory64"fullword ascii
$s3text"MPR.dll"fullword ascii
$s4text"%key%"fullword ascii
$s5text"CryptDestroyKey"fullword ascii
$s6text"ntdll.dll"fullword ascii
$s7text"WNetCancelConnection2W"fullword ascii
$s8text".%c%c%c%c"fullword wide
$s10hex{ 43 72 79 70 74 49 6d 70 6f 72 74 4b 65 79 00 00 cb 00 43 72 79 70 74 45 6e 63 72 79 70 74 00 00 c1 00 43 72 79 70 74 41 63 7 …

Condition

uint16( 0 ) == 0x5a4d and ( 3 of ( $x* ) or 8 of ( $s* ) )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • At least 3 patterns in ( $x* ) must match.
  • At least 8 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.

Open in editor

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).

Original rule

Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.

Rule id: fb6db807-372f-59e6-96c6-54dd4ece336d

Metadata

clamav_sig1MALWARE_Win.Ransomware.GetCrypt-1
clamav_sig2MALWARE_Win.Ransomware.GetCrypt-2

Tags:FILE