Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Suncrypt

Detects SunCrypt ransomware

MalwareSuncryptditekSHen 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 SunCrypt ransomware

Associated malware family: Suncrypt.

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

malware-win-suncrypt.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Suncrypt : FILE
{
	meta:
		description = "Detects SunCrypt ransomware"
		author = "ditekSHen"
		id = "1a28fcbf-1fc0-5f18-ae71-2e813ed0f958"
		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#L4494-L4532"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "abde9bbf2577304ff059972a38e803ba17de7a1f0346efe880a710f2ad79db37"
		score = 75
		quality = 73
		tags = "FILE"

	strings:
		$s1 = "-noshares" fullword wide
		$s2 = "-nomutex" fullword wide
		$s3 = "-noreport" fullword wide
		$s4 = "-noservices" fullword wide
		$s5 = "$Recycle.bin" fullword wide
		$s6 = "YOUR_FILES_ARE_ENCRYPTED.HTML" fullword wide
		$s7 = "\\\\?\\%c:" fullword wide
		$s8 = "locker.exe" fullword ascii
		$s9 = "DllRegisterServer" fullword ascii
		$g1 = "main.EncFile" fullword ascii nocase
		$g2 = "main.detectName" fullword ascii nocase
		$g3 = "main.detectIP" fullword ascii nocase
		$g4 = "main.detectDebugProc" fullword ascii nocase
		$g5 = "main.Bypass" ascii nocase
		$g6 = "main.allocateMemory" fullword ascii nocase
		$g7 = "main.killAV" fullword ascii nocase
		$g8 = "main.disableShadowCopy" fullword ascii nocase
		$g9 = "main.(*windowsDrivesModel).LoadDrives" fullword ascii nocase
		$g10 = "main.IsFriends" fullword ascii nocase
		$g11 = "main.walkMsg" fullword ascii nocase
		$g12 = "main.makeSecretMessage" fullword ascii nocase
		$g13 = "main.stealFiles" fullword ascii nocase
		$g14 = "main.newKey" fullword ascii nocase
		$g15 = "main.openBrowser" fullword ascii nocase
		$g16 = "main.killProc" fullword ascii nocase
		$g17 = "main.selfRemove" fullword ascii nocase
		$m1 = "<h2>\\x20Offline\\x20HowTo\\x20</h2>\\x0a\\x09\\x09\\x09\\x09<p>Copy\\x20&\\x20Paste\\x20this\\x20message\\x20to" ascii
		$m2 = "\\x20restore\\x20your\\x20files." ascii
		$m3 = "\\x20your\\x20documents\\x20and\\x20files\\x20encrypted" ascii
		$m4 = "\\x20lose\\x20all\\x20of\\x20your\\x20data\\x20and\\x20files." ascii
		$m5 = ",'/#/client/','<h2>\\x20Whats\\x20Happen" ascii

	condition:
		uint16( 0 ) == 0x5a4d and ( 5 of ( $s* ) or 6 of ( $g* ) or 3 of ( $m* ) )
}

Strings (31 patterns)

IdentifierTypeValueModifiers
$s1text"-noshares"fullword wide
$s2text"-nomutex"fullword wide
$s3text"-noreport"fullword wide
$s4text"-noservices"fullword wide
$s5text"$Recycle.bin"fullword wide
$s6text"YOUR_FILES_ARE_ENCRYPTED.HTML"fullword wide
$s7text"\\\\?\\%c:"fullword wide
$s8text"locker.exe"fullword ascii
$s9text"DllRegisterServer"fullword ascii
$g1text"main.EncFile"fullword ascii nocase
$g2text"main.detectName"fullword ascii nocase
$g3text"main.detectIP"fullword ascii nocase
$g4text"main.detectDebugProc"fullword ascii nocase
$g5text"main.Bypass"ascii nocase
$g6text"main.allocateMemory"fullword ascii nocase
$g7text"main.killAV"fullword ascii nocase
$g8text"main.disableShadowCopy"fullword ascii nocase
$g9text"main.(*windowsDrivesModel).LoadDrives"fullword ascii nocase
$g10text"main.IsFriends"fullword ascii nocase
$g11text"main.walkMsg"fullword ascii nocase
$g12text"main.makeSecretMessage"fullword ascii nocase
$g13text"main.stealFiles"fullword ascii nocase
$g14text"main.newKey"fullword ascii nocase
$g15text"main.openBrowser"fullword ascii nocase
$g16text"main.killProc"fullword ascii nocase
$g17text"main.selfRemove"fullword ascii nocase
$m1text"<h2>\\x20Offline\\x20HowTo\\x20</h2>\\x0a\\x09\\x09\\x09\\x09<p>Copy\\x20&\\x20Paste\\x20this\\x20message\\x20to"ascii
$m2text"\\x20restore\\x20your\\x20files."ascii
$m3text"\\x20your\\x20documents\\x20and\\x20files\\x20encrypted"ascii
$m4text"\\x20lose\\x20all\\x20of\\x20your\\x20data\\x20and\\x20files."ascii
$m5text",'/#/client/','<h2>\\x20Whats\\x20Happen"ascii

Condition

uint16( 0 ) == 0x5a4d and ( 5 of ( $s* ) or 6 of ( $g* ) or 3 of ( $m* ) )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • At least 5 patterns in ( $s* ) must match.
  • At least 6 patterns in ( $g* ) must match.
  • At least 3 patterns in ( $m* ) 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: 1a28fcbf-1fc0-5f18-ae71-2e813ed0f958

Tags:FILE

More Suncrypt rules