Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Darkriver_Encodedurl

Detects encoding URL inside docx documents

GenericSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X
Author
Sekoia.io
Date
2023-10-10
Modified
2024-12-19
Score / Quality
75 / 80

What this rule detects

Detects encoding URL inside docx documents

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

Summary generated from the rule's metadata and condition.

Rule source

darkriver-encodedurl.yarDetection Rule License 1.1
rule SEKOIA_Darkriver_Encodedurl : FILE
{
	meta:
		description = "Detects encoding URL inside docx documents"
		author = "Sekoia.io"
		id = "60f1676f-dade-4376-9980-f510dff52ae5"
		date = "2023-10-10"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/darkriver_encodedurl.yar#L1-L21"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		hash = "5c9551388213f54c4b54cd42ccb034d8d9173a4bbfcf8b666e0db8df929762e7"
		hash = "13de9f39b1ad232e704b5e0b5051800fcd844e9f661185ace8287a23e9b3868e"
		hash = "3b05e89ff2338472cc493d59bae450338effd29f0ed7d46fb999709e63cf2472"
		logic_hash = "9477ec39cc1d4cfad676d071748e7e1918a3996b342663cb0a01658846bbf9f5"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$s1 = "mhtml:http"
		$s2 = "&_ts="
		$header = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>"

	condition:
		filesize < 500KB and any of ( $s* ) and $header at 0
}

Strings (3 patterns)

IdentifierTypeValueModifiers
$s1text"&#109;&#104;&#116;&#109;&#108;&#58;&#104;&#116;&#116;&#112;"
$s2text"&#38;&#95;&#116;&#115;&#61;"
$headertext"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>"

Condition

filesize < 500KB and any of ( $s* ) and $header at 0

In plain words (Heuristic)

  • The file must be smaller than 500KB (a cheap guard that skips large files).
  • At least one pattern in ( $s* ) must match.
  • Pattern $header must be found at offset 0.

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).

  • 5c9551388213f54c4b54cd42ccb034d8d9173a4bbfcf8b666e0db8df929762e7
  • 13de9f39b1ad232e704b5e0b5051800fcd844e9f661185ace8287a23e9b3868e
  • 3b05e89ff2338472cc493d59bae450338effd29f0ed7d46fb999709e63cf2472

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: 60f1676f-dade-4376-9980-f510dff52ae5

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE