Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Loader_Win_Purecrypter

Detect the PureCrypter loader

MalwareSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X
Author
Sekoia.io
Date
2022-09-22
Modified
2024-12-19
Score / Quality
75 / 80

What this rule detects

Detect the PureCrypter loader

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

loader-win-purecrypter.yarDetection Rule License 1.1
rule SEKOIA_Loader_Win_Purecrypter : FILE
{
	meta:
		description = "Detect the PureCrypter loader"
		author = "Sekoia.io"
		id = "500b4d9e-55f8-41d1-ad4f-d587bbeb4507"
		date = "2022-09-22"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/loader_win_purecrypter.yar#L1-L16"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "5d0d733a4f8447d2d51656a20640fc9482581e19ba1d53fed7d98e85bb748763"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$hex01 = /http:\/\/[^\s]{5,90}_[A-Z][a-z]{7}\.(bmp|jpg|png)/ wide
		$hex02 = "WrapNonExceptionThrows" ascii

	condition:
		uint16( 0 ) == 0x5A4D and ( $hex02 in ( @hex01 .. @hex01 + 1000 ) or $hex01 in ( @hex02 .. @hex02 + 1000 ) )
}

Strings (2 patterns)

IdentifierTypeValueModifiers
$hex01regex/http:\/\/[^\s]{5,90}_[A-Z][a-z]{7}\.(bmp|jpg|png)/wide
$hex02text"WrapNonExceptionThrows"ascii

Condition

uint16( 0 ) == 0x5A4D and ( $hex02 in ( @hex01 .. @hex01 + 1000 ) or $hex01 in ( @hex02 .. @hex02 + 1000 ) )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • Pattern $hex02 must be found within the range @hex01 .. @hex01 + 1000.
  • Pattern $hex01 must be found within the range @hex02 .. @hex02 + 1000.

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: Sekoia.io

Source repository: SEKOIA.IO Community @ a438a5901a

Licence: Detection Rule License 1.1 (repository licence)

Original rule

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

Rule id: 500b4d9e-55f8-41d1-ad4f-d587bbeb4507

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE