Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Tool_Pchunter_And_Related_Certificate

Detects PCHunter and associated binairies & drivers

Hack toolSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X (with warnings)
Author
Sekoia.io
Date
2022-09-07
Modified
2024-12-19
Score / Quality
75 / 80

What this rule detects

Detects PCHunter and associated binairies & drivers

Targets: Windows PE.

It has no patterns: the condition alone decides (modules, file properties or other rules). YARA modules used: pe.

YARA-X says: warning[deprecated_field]: field `number_of_signatures` is deprecated

Summary generated from the rule's metadata and condition.

Rule source

Includes the imports needed to compile it on its own.

tool-pchunter-and-related-certificate.yarDetection Rule License 1.1
import "pe"

rule SEKOIA_Tool_Pchunter_And_Related_Certificate : FILE
{
	meta:
		description = "Detects PCHunter and associated binairies & drivers"
		author = "Sekoia.io"
		id = "757c7738-4ee8-4b4e-bdda-0c5b0c010f40"
		date = "2022-09-07"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/tool_pchunter_and_related_certificate.yar#L3-L17"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "924a85b2eaec73b628e705b3bb2e464582a71c19317d2023b1422b1b8ad97a51"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	condition:
		uint16be( 0 ) == 0x4d5a and for any i in ( 0 .. pe.number_of_signatures ) : ( pe.signatures [ i ] . serial contains "05:51:bc:8c:6a:a2:ca:03:2b:c6:71:38:30:d8:49:a3" ) and filesize > 400KB and filesize < 20MB
}

Condition

uint16be( 0 ) == 0x4d5a and for any i in ( 0 .. pe.number_of_signatures ) : ( pe.signatures [ i ] . serial contains "05:51:bc:8c:6a:a2:ca:03:2b:c6:71:38:30:d8:49:a3" ) and filesize > 400KB and filesize < 20MB

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • The file must be smaller than 20MB (a cheap guard that skips large files).
  • The file must be larger than 400KB.
  • A for-loop checks a property over several matches or items.
  • Uses the pe module.
  • Checks the Authenticode signature.

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: 757c7738-4ee8-4b4e-bdda-0c5b0c010f40

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE