Skip to content

YARA · ditekSHen detection

DITEKSHEN_INDICATOR_DOC_Phishingpatterns

Detects OLE, RTF, PDF and OOXML (decompressed) documents with common phishing strings

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 OLE, RTF, PDF and OOXML (decompressed) documents with common phishing strings

Targets: PDF.

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

Summary generated from the rule's metadata and condition.

Rule source

indicator-doc-phishingpatterns.yarBSD 2-Clause License
rule DITEKSHEN_INDICATOR_DOC_Phishingpatterns : FILE
{
	meta:
		description = "Detects OLE, RTF, PDF and OOXML (decompressed) documents with common phishing strings"
		author = "ditekSHen"
		id = "67372eb5-ed07-5062-a12e-9ad8c7070f0f"
		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#L862-L883"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "50b6566cb18512f887c07576391eb492101f7534da3460d5f7740ee6f4cf707d"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$s1 = "PERFORM THE FOLLOWING STEPS TO PERFORM DECRYPTION" ascii nocase
		$s2 = "Enable Editing" ascii nocase
		$s3 = "Enable Content" ascii nocase
		$s4 = "WHY I CANNOT OPEN THIS DOCUMENT?" ascii nocase
		$s5 = "You are using iOS or Android, please use Desktop PC" ascii nocase
		$s6 = "You are trying to view this document using Online Viewer" ascii nocase
		$s7 = "This document was edited in a different version of" ascii nocase
		$s8 = "document are locked and will not" ascii nocase
		$s9 = "until the \"Enable\" button is pressed" ascii nocase
		$s10 = "This document created in online version of Microsoft Office" ascii nocase
		$s11 = "This document created in previous version of Microsoft Office" ascii nocase
		$s12 = "This document protected by Microsoft Office" ascii nocase
		$s13 = "This document encrypted by" ascii nocase
		$s14 = "document created in earlier version of microsoft office" ascii nocase

	condition:
		( uint16( 0 ) == 0xcfd0 or uint32( 0 ) == 0x74725c7b or uint32( 0 ) == 0x46445025 or uint32( 0 ) == 0x6d783f3c ) and 2 of them
}

Strings (14 patterns)

IdentifierTypeValueModifiers
$s1text"PERFORM THE FOLLOWING STEPS TO PERFORM DECRYPTION"ascii nocase
$s2text"Enable Editing"ascii nocase
$s3text"Enable Content"ascii nocase
$s4text"WHY I CANNOT OPEN THIS DOCUMENT?"ascii nocase
$s5text"You are using iOS or Android, please use Desktop PC"ascii nocase
$s6text"You are trying to view this document using Online Viewer"ascii nocase
$s7text"This document was edited in a different version of"ascii nocase
$s8text"document are locked and will not"ascii nocase
$s9text"until the \"Enable\" button is pressed"ascii nocase
$s10text"This document created in online version of Microsoft Office"ascii nocase
$s11text"This document created in previous version of Microsoft Office"ascii nocase
$s12text"This document protected by Microsoft Office"ascii nocase
$s13text"This document encrypted by"ascii nocase
$s14text"document created in earlier version of microsoft office"ascii nocase

Condition

( uint16( 0 ) == 0xcfd0 or uint32( 0 ) == 0x74725c7b or uint32( 0 ) == 0x46445025 or uint32( 0 ) == 0x6d783f3c ) and 2 of them

In plain words (Heuristic)

  • The file must start with “%PDF”.
  • The file must start with “{\rt” — an RTF document.
  • At least 2 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: 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: 67372eb5-ed07-5062-a12e-9ad8c7070f0f

Tags:FILE