Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Infinitylock

Detects InfinityLock ransomware

MalwareInfinitylockditekSHen 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

Detects InfinityLock ransomware

Associated malware family: Infinitylock.

Targets: Windows PE.

It defines 11 patterns (11 text, 0 hex, 0 regex).

Summary generated from the rule's metadata and condition.

Rule source

malware-win-infinitylock.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Infinitylock : FILE
{
	meta:
		description = "Detects InfinityLock ransomware"
		author = "ditekSHen"
		id = "7a66cc19-c635-580b-abc2-b58bd48673bd"
		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#L5705-L5723"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "634759f1c2d48becebc9c87e146e898524071738f74b7001b112dc793bcb581c"
		score = 75
		quality = 73
		tags = "FILE"

	strings:
		$s1 = "_Encrypted$" fullword ascii
		$s2 = "PublicKeyToken=" fullword ascii nocase
		$s3 = "GenerateHWID" fullword ascii
		$s4 = "CreateKey" fullword ascii
		$d1 = "ProgrammFiles" fullword ascii
		$d2 = "OneDrive" fullword ascii
		$d3 = "ProgrammsX86" fullword ascii
		$d4 = "UserDirs" fullword ascii
		$d5 = "B_Drive" fullword ascii
		$pdb1 = "F:\\DESKTOP!\\ChkDsk\\ChkDsk\\obj\\" ascii
		$pdb2 = "\\ChkDsk\\obj\\Debug\\PremiereCrack.pdb" ascii

	condition:
		uint16( 0 ) == 0x5a4d and ( ( all of ( $s* ) and 1 of ( $d* ) ) or ( 4 of ( $d* ) and 2 of ( $s* ) ) or ( any of ( $pdb* ) and 1 of ( $s* ) and 1 of ( $d* ) ) )
}

Strings (11 patterns)

IdentifierTypeValueModifiers
$s1text"_Encrypted$"fullword ascii
$s2text"PublicKeyToken="fullword ascii nocase
$s3text"GenerateHWID"fullword ascii
$s4text"CreateKey"fullword ascii
$d1text"ProgrammFiles"fullword ascii
$d2text"OneDrive"fullword ascii
$d3text"ProgrammsX86"fullword ascii
$d4text"UserDirs"fullword ascii
$d5text"B_Drive"fullword ascii
$pdb1text"F:\\DESKTOP!\\ChkDsk\\ChkDsk\\obj\\"ascii
$pdb2text"\\ChkDsk\\obj\\Debug\\PremiereCrack.pdb"ascii

Condition

uint16( 0 ) == 0x5a4d and ( ( all of ( $s* ) and 1 of ( $d* ) ) or ( 4 of ( $d* ) and 2 of ( $s* ) ) or ( any of ( $pdb* ) and 1 of ( $s* ) and 1 of ( $d* ) ) )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • All patterns in ( $s* ) must match.
  • At least one pattern in ( $pdb* ) must match.
  • At least 1 patterns in ( $d* ) must match.
  • At least 4 patterns in ( $d* ) must match.
  • At least 2 patterns in ( $s* ) must match.
  • At least 1 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: 7a66cc19-c635-580b-abc2-b58bd48673bd

Tags:FILE