Skip to content

YARA · ditekSHen detection

DITEKSHEN_INDICATOR_RTF_LNK_Shell_Explorer_Execution

detects RTF files with Shell.Explorer.1 OLE objects with embedded LNK files referencing an executable.

Suspicious / huntingditekSHen detectionBSD 2-Clause LicenseCompiles with YARA-X
Author
ditekSHen
Date
2020-11-06
Modified
2024-09-06
Score / Quality
75 / 75

What this rule detects

detects RTF files with Shell.Explorer.1 OLE objects with embedded LNK files referencing an executable.

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

Summary generated from the rule's metadata and condition.

Rule source

indicator-rtf-lnk-shell-explorer-execution.yarBSD 2-Clause License
rule DITEKSHEN_INDICATOR_RTF_LNK_Shell_Explorer_Execution : FILE
{
	meta:
		description = "detects RTF files with Shell.Explorer.1 OLE objects with embedded LNK files referencing an executable."
		author = "ditekSHen"
		id = "2cac4dd8-086a-5220-a658-94cedd9cf7c3"
		date = "2020-11-06"
		modified = "2024-09-06"
		reference = "https://github.com/ditekshen/detection"
		source_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/indicator_office.yar#L503-L517"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "4c11a37425e260692e11dc8fca317611106245d1590081a7038036ad568702f8"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$clsid = "c32ab2eac130cf11a7eb0000c05bae0b" ascii nocase
		$lnk_header = "4c00000001140200" ascii nocase
		$http_url = "6800740074007000" ascii nocase
		$file_url = "660069006c0065003a" ascii nocase

	condition:
		uint32( 0 ) == 0x74725c7b and filesize < 1500KB and $clsid and $lnk_header and ( $http_url or $file_url )
}

Strings (4 patterns)

IdentifierTypeValueModifiers
$clsidtext"c32ab2eac130cf11a7eb0000c05bae0b"ascii nocase
$lnk_headertext"4c00000001140200"ascii nocase
$http_urltext"6800740074007000"ascii nocase
$file_urltext"660069006c0065003a"ascii nocase

Condition

uint32( 0 ) == 0x74725c7b and filesize < 1500KB and $clsid and $lnk_header and ( $http_url or $file_url )

In plain words (Heuristic)

  • The file must start with “{\rt” — an RTF document.
  • The file must be smaller than 1500KB (a cheap guard that skips large files).
  • Pattern $clsid must be present.
  • Pattern $lnk_header must be present.
  • Pattern $http_url must be present.
  • Pattern $file_url 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: ditekSHen

Source repository: ditekSHen detection @ e76c93dcde

Licence: BSD 2-Clause License (repository licence)

Copyright notice: Copyright 2021 by ditekSHen (https://github.com/ditekshen/detection).

Original rule

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

Rule id: 2cac4dd8-086a-5220-a658-94cedd9cf7c3

Tags:FILE