Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Apt_Buhtrap_Maldocx

Detect the malicious DOCX used by Buhtrap

APT / threat actorBuhtrapSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X (with warnings)
Author
Sekoia.io
Date
2022-02-25
Modified
2024-12-19
Score / Quality
75 / 80

What this rule detects

Detect the malicious DOCX used by Buhtrap

Associated malware family: Buhtrap.

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

YARA-X says: warning[duplicate_pattern_value]: duplicate pattern value

Summary generated from the rule's metadata and condition.

Rule source

apt-buhtrap-maldocx.yarDetection Rule License 1.1
rule SEKOIA_Apt_Buhtrap_Maldocx
{
	meta:
		description = "Detect the malicious DOCX used by Buhtrap"
		author = "Sekoia.io"
		id = "4aaba2f1-fafd-4e3f-8b18-7beda11464d1"
		date = "2022-02-25"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/apt_buhtrap_maldocx.yar#L1-L25"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "69968fa6836a71cd835f40c5168d197d3b5fc13b62791279f48a6bdeb4709bd5"
		score = 75
		quality = 80
		tags = ""
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$ = "<xm:macrosheet xmlns=" ascii fullword
		$ = "CALL(\"kernel32\",\"VirtualFree"
		$ = "CALL(\"kernel32\",\"CreateFileA"
		$ = "CALL(\"kernel32\",\"WriteFile"
		$ = "CALL(\"kernel32\",\"VirtualAlloc"
		$ = "CALL(\"kernel32\",\"WinExec"
		$ = "CALL(\"kernel32\",\"lstrcatA"
		$ = "CALL(\"kernel32\",\"CreateFileA"
		$ = "CALL(\"kernel32\",\"VirtualFree"
		$ = "CALL(\"kernel32\",\"ExpandEnvironmentStringsA"
		$ = "CALL(\"kernel32\",\"CloseHandle"

	condition:
		all of them
}

Strings (11 patterns)

IdentifierTypeValueModifiers
$text"<xm:macrosheet xmlns="ascii fullword
$text"CALL(\"kernel32\",\"VirtualFree"
$text"CALL(\"kernel32\",\"CreateFileA"
$text"CALL(\"kernel32\",\"WriteFile"
$text"CALL(\"kernel32\",\"VirtualAlloc"
$text"CALL(\"kernel32\",\"WinExec"
$text"CALL(\"kernel32\",\"lstrcatA"
$text"CALL(\"kernel32\",\"CreateFileA"
$text"CALL(\"kernel32\",\"VirtualFree"
$text"CALL(\"kernel32\",\"ExpandEnvironmentStringsA"
$text"CALL(\"kernel32\",\"CloseHandle"

Condition

all of them

In plain words (Heuristic)

  • All 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: 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: 4aaba2f1-fafd-4e3f-8b18-7beda11464d1

Metadata

version1.0
classificationTLP:CLEAR