Skip to content

YARA · Trellix Advanced Research Center

TRELLIX_ARC_APT_Stolen_Certificates

Rule to detect samples digitally signed from these stolen certificates

APT / threat actorPwnlnxTrellix Advanced Research CenterApache License 2.0Compiles with YARA-X (with warnings)
Author
Marc Rivero | McAfee ATR Team
Date
2020-04-17
Modified
2020-08-14
Score / Quality
75 / 70

What this rule detects

Rule to detect samples digitally signed from these stolen certificates

Associated malware family: Pwnlnx.

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.

apt-stolen-certificates.yarApache License 2.0
import "pe"

rule TRELLIX_ARC_APT_Stolen_Certificates : BACKDOOR FILE
{
	meta:
		description = "Rule to detect samples digitally signed from these stolen certificates"
		author = "Marc Rivero | McAfee ATR Team"
		id = "57051977-780c-5c8e-bc66-0f1d8b3bbd93"
		date = "2020-04-17"
		modified = "2020-08-14"
		reference = "https://www.blackberry.com/content/dam/blackberry-com/asset/enterprise/pdf/direct/report-bb-decade-of-the-rats.pdf"
		source_url = "https://github.com/advanced-threat-research/Yara-Rules//blob/1919562a59f190bda60c982424f6a24c542ee3e0/APT/APT_decade_of_RATs.yar#L196-L221"
		license_url = "https://github.com/advanced-threat-research/Yara-Rules//blob/1919562a59f190bda60c982424f6a24c542ee3e0/LICENSE"
		hash = "ce3424524fd1f482a0339a3f92e440532cff97c104769837fa6ae52869013558"
		logic_hash = "9b700e4889349d0203bdd4e00035ee9c9aba5025ccc57eef915b2c78996f8160"
		score = 75
		quality = 70
		tags = "BACKDOOR, FILE"
		rule_version = "v1"
		malware_type = "backdoor"
		malware_family = "Backdoor:W32/Pwnlnx"
		actor_type = "Cybercrime"
		actor_group = "Unknown"

	condition:
		uint16( 0 ) == 0x5a4d and for any i in ( 0 .. pe.number_of_signatures ) : ( pe.signatures [ i ] . subject contains "/C=KR/ST=Seoul/L=Gangnam-gu/O=LivePlex Corp/CN=LivePlex Corp" and pe.signatures [ i ] . serial == "3f:55:42:e2:e7:1d:8d:b3:57:04:1c:9d:d4:5b:95:0a" or pe.signatures [ i ] . subject contains "/C=KR/ST=Seoul/L=Gangnam-gu/O=LivePlex Corp/CN=LivePlex Corp" and pe.signatures [ i ] . serial == "3f:55:42:e2:e7:1d:8d:b3:57:04:1c:9d:d4:5b:95:0a" or pe.signatures [ i ] . subject contains "/C=KR/ST=Seoul/L=Gangnam-gu/O=LivePlex Corp/CN=LivePlex Corp" or pe.signatures [ i ] . serial == "3f:55:42:e2:e7:1d:8d:b3:57:04:1c:9d:d4:5b:95:0a" )
}

Condition

uint16( 0 ) == 0x5a4d and for any i in ( 0 .. pe.number_of_signatures ) : ( pe.signatures [ i ] . subject contains "/C=KR/ST=Seoul/L=Gangnam-gu/O=LivePlex Corp/CN=LivePlex Corp" and pe.signatures [ i ] . serial == "3f:55:42:e2:e7:1d:8d:b3:57:04:1c:9d:d4:5b:95:0a" or pe.signatures [ i ] . subject contains "/C=KR/ST=Seoul/L=Gangnam-gu/O=LivePlex Corp/CN=LivePlex Corp" and pe.signatures [ i ] . serial == "3f:55:42:e2:e7:1d:8d:b3:57:04:1c:9d:d4:5b:95:0a" or pe.signatures [ i ] . subject contains "/C=KR/ST=Seoul/L=Gangnam-gu/O=LivePlex Corp/CN=LivePlex Corp" or pe.signatures [ i ] . serial == "3f:55:42:e2:e7:1d:8d:b3:57:04:1c:9d:d4:5b:95:0a" )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • 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

Sample hashes

Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).

  • ce3424524fd1f482a0339a3f92e440532cff97c104769837fa6ae52869013558

Licence & attribution

Author: Marc Rivero | McAfee ATR Team

Source repository: Trellix Advanced Research Center @ 1919562a59

Licence: Apache License 2.0 (repository licence)

Original rule

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

Rule id: 57051977-780c-5c8e-bc66-0f1d8b3bbd93

Metadata

rule_versionv1
malware_typebackdoor
malware_familyBackdoor:W32/Pwnlnx
actor_typeCybercrime
actor_groupUnknown

Tags:BACKDOORFILE

More Pwnlnx rules