Skip to content

YARA · Costin Raiu yararules

CRAIU_Apt_ZZ_Orangeworm_Kwampirs_Installer

Kwampirs installer xor keys and Unicode string length routine

APT / threat actorKwampirsCostin Raiu yararulesGNU General Public License v3.0Compiles with YARA-X
Author
FBI / cywatch@fbi.gov
Date
2020-01-14
Modified
2020-03-31
Score / Quality
75 / 85

What this rule detects

Kwampirs installer xor keys and Unicode string length routine

Associated malware family: Kwampirs.

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

apt-zz-orangeworm-kwampirs-installer.yarGNU General Public License v3.0
rule CRAIU_Apt_ZZ_Orangeworm_Kwampirs_Installer : FILE
{
	meta:
		description = "Kwampirs installer xor keys and Unicode string length routine"
		author = "FBI / cywatch@fbi.gov"
		id = "8c80d0d5-8c65-5cef-ad86-b38f4d671bec"
		date = "2020-01-14"
		modified = "2020-03-31"
		reference = "https://assets.documentcloud.org/documents/6821582/FLASH-CP-000118-MW-Downgraded-Version.pdf"
		source_url = "https://github.com/craiu/yararules/blob/23cf0ca22021fa3684e180a18416b9ae1b695243/files/apt_zz_orangeworm.yara#L109-L127"
		license_url = "https://github.com/craiu/yararules/blob/23cf0ca22021fa3684e180a18416b9ae1b695243/LICENSE"
		logic_hash = "ac9c3ba7188cbbe736ff81b41086fdc874ac24ae83d3cec390907f8edd0a0ce5"
		score = 75
		quality = 85
		tags = "FILE"
		yara_version = "3.7.0"

	strings:
		$string_key = { 6C 35 E3 31 1B 23 F9 C9 65 EB F3 07 93 33 F2 A3 }
		$resource_key = { 28 99 B6 17 63 33 EE 22 97 97 55 B5 7A C4 E1 A4 }
		$strlenW = { 33 C0 85 C9 74 17 80 3C 41 00 75 07 80 7C 41 01 00 74 0A 3D 00 94 35 77 73 03 40 EB E9 C3}

	condition:
		(( uint16( 0 ) == 0x5a4d ) and ( 2 of them ) )
}

Strings (3 patterns)

IdentifierTypeValueModifiers
$string_keyhex{ 6C 35 E3 31 1B 23 F9 C9 65 EB F3 07 93 33 F2 A3 }
$resource_keyhex{ 28 99 B6 17 63 33 EE 22 97 97 55 B5 7A C4 E1 A4 }
$strlenWhex{ 33 C0 85 C9 74 17 80 3C 41 00 75 07 80 7C 41 01 00 74 0A 3D 00 94 35 77 73 03 40 EB E9 C3}

Condition

(( uint16( 0 ) == 0x5a4d ) and ( 2 of them ) )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • At least 2 patterns in the rule 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: FBI / cywatch@fbi.gov

Source repository: Costin Raiu yararules @ 23cf0ca220

Licence: GNU General Public License v3.0 (repository licence)

Original rule

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

Rule id: 8c80d0d5-8c65-5cef-ad86-b38f4d671bec

Metadata

yara_version3.7.0

Tags:FILE

More Kwampirs rules