Skip to content

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_MAL_Sharpshooter_Excel4

Detects Excel documents weaponized with Sharpshooter

MalwareSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compiles with YARA-X
Author
John Lambert, Florian Roth
Date
2020-03-27
Modified
2023-12-05
Score / Quality
70 / 85

What this rule detects

Detects Excel documents weaponized with Sharpshooter

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

Summary generated from the rule's metadata and condition.

Rule source

mal-sharpshooter-excel4.yarDetection Rule License 1.1
rule SIGNATURE_BASE_MAL_Sharpshooter_Excel4 : FILE
{
	meta:
		description = "Detects Excel documents weaponized with Sharpshooter"
		author = "John Lambert, Florian Roth"
		id = "a79e3afe-e8f9-5e56-a131-bb1b346df471"
		date = "2020-03-27"
		modified = "2023-12-05"
		reference = "https://docs.microsoft.com/en-us/openspecs/office_file_formats/ms-xls/00b5dd7d-51ca-4938-b7b7-483fe0e5933b"
		source_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/gen_Excel4Macro_Sharpshooter.yar#L1-L25"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		hash = "ccef64586d25ffcb2b28affc1f64319b936175c4911e7841a0e28ee6d6d4a02d"
		logic_hash = "4aec8bb7ec8ce7ebd8228416133ea7eec995864aeec78c11548387d832b5fa65"
		score = 70
		quality = 85
		tags = "FILE"

	strings:
		$header_docf = { D0 CF 11 E0 }
		$s1 = "Excel 4.0 Macros"
		$f1 = "CreateThread" ascii fullword
		$f2 = "WriteProcessMemory" ascii fullword
		$f3 = "Kernel32" ascii fullword
		$concat = { 00 41 6f 00 08 1e ?? 00 41 6f 00 08 1e ?? 00 41 6f 00 08}

	condition:
		filesize < 1000KB and $header_docf at 0 and #concat > 10 and $s1 and 2 of ( $f* )
}

Strings (6 patterns)

IdentifierTypeValueModifiers
$header_docfhex{ D0 CF 11 E0 }
$s1text"Excel 4.0 Macros"
$f1text"CreateThread"ascii fullword
$f2text"WriteProcessMemory"ascii fullword
$f3text"Kernel32"ascii fullword
$concathex{ 00 41 6f 00 08 1e ?? 00 41 6f 00 08 1e ?? 00 41 6f 00 08}

Condition

filesize < 1000KB and $header_docf at 0 and #concat > 10 and $s1 and 2 of ( $f* )

In plain words (Heuristic)

  • The file must be smaller than 1000KB (a cheap guard that skips large files).
  • At least 2 patterns in ( $f* ) must match.
  • Pattern $concat must occur > 10 times.
  • Pattern $header_docf must be found at offset 0.
  • Pattern $s1 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

Sample hashes

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

  • ccef64586d25ffcb2b28affc1f64319b936175c4911e7841a0e28ee6d6d4a02d

Licence & attribution

Author: John Lambert, Florian Roth

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: a79e3afe-e8f9-5e56-a131-bb1b346df471

Tags:FILE