Skip to content

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_Brooxml_Hunting

Detects Microsoft OOXML files with prepended data/manipulated header

Suspicious / huntingSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compiles with YARA-X
Author
Proofpoint
Date
2024-11-27
Modified
2025-06-02
Score / Quality
70 / 85

What this rule detects

Detects Microsoft OOXML files with prepended data/manipulated header

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

brooxml-hunting.yarDetection Rule License 1.1
rule SIGNATURE_BASE_Brooxml_Hunting : HUNTING FILE
{
	meta:
		description = "Detects Microsoft OOXML files with prepended data/manipulated header"
		author = "Proofpoint"
		id = "1ffea1c7-9f97-5bb1-93d7-ce914765416f"
		date = "2024-11-27"
		modified = "2025-06-02"
		reference = "https://x.com/threatinsight/status/1861817946508763480"
		source_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/gen_brooxml_dec24.yar#L2-L39"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		logic_hash = "8a8d934fe9286c9d1c83a2a0676bb8a5f2501116b96cca32dc27136ecfb9325b"
		score = 70
		quality = 85
		tags = "HUNTING, FILE"
		category = "hunting"

	strings:
		$pk_ooxml_magic = {50 4b 03 04 [22] 13 00 [2] 5b 43 6f 6e 74 65 6e 74 5f 54 79 70 65 73 5d 2e 78 6d 6c}
		$pk_0102 = {50 4b 01 02}
		$pk_0304 = {50 4b 03 04}
		$pk_0506 = {50 4b 05 06}
		$pk_0708 = {50 4b 07 08}
		$word = "word/"
		$ole = {d0 cf 11 e0}
		$tef = {78 9f 3e 22}

	condition:
		$pk_ooxml_magic in ( 4 .. 16384 ) and $pk_0506 in ( 16384 .. filesize ) and #pk_0506 == 1 and #pk_0102 > 2 and #pk_0304 > 2 and $word and not ( $pk_0102 at 0 ) and not ( $pk_0304 at 0 ) and not ( $pk_0506 at 0 ) and not ( $pk_0708 at 0 ) and not ( $ole at 0 ) and not ( uint16( 0 ) == 0x5a4d ) and not ( $tef at 0 )
}

Strings (8 patterns)

IdentifierTypeValueModifiers
$pk_ooxml_magichex{50 4b 03 04 [22] 13 00 [2] 5b 43 6f 6e 74 65 6e 74 5f 54 79 70 65 73 5d 2e 78 6d 6c}
$pk_0102hex{50 4b 01 02}
$pk_0304hex{50 4b 03 04}
$pk_0506hex{50 4b 05 06}
$pk_0708hex{50 4b 07 08}
$wordtext"word/"
$olehex{d0 cf 11 e0}
$tefhex{78 9f 3e 22}

Condition

$pk_ooxml_magic in ( 4 .. 16384 ) and $pk_0506 in ( 16384 .. filesize ) and #pk_0506 == 1 and #pk_0102 > 2 and #pk_0304 > 2 and $word and not ( $pk_0102 at 0 ) and not ( $pk_0304 at 0 ) and not ( $pk_0506 at 0 ) and not ( $pk_0708 at 0 ) and not ( $ole at 0 ) and not ( uint16( 0 ) == 0x5a4d ) and not ( $tef at 0 )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • Pattern $pk_0506 must occur == 1 times.
  • Pattern $pk_0102 must occur > 2 times.
  • Pattern $pk_0304 must occur > 2 times.
  • Pattern $pk_0102 must be found at offset 0.
  • Pattern $pk_0304 must be found at offset 0.
  • Pattern $pk_0506 must be found at offset 0.
  • Pattern $pk_0708 must be found at offset 0.
  • Pattern $ole must be found at offset 0.
  • Pattern $tef must be found at offset 0.
  • Pattern $pk_ooxml_magic must be found within the range 4 .. 16384.
  • Pattern $pk_0506 must be found within the range 16384 .. filesize.
  • Pattern $word must be present.

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: Proofpoint

Source repository: Signature Base (Florian Roth / Nextron) @ 94a1c48d7a

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: 1ffea1c7-9f97-5bb1-93d7-ce914765416f

Metadata

categoryhunting

Tags:HUNTINGFILE