YARA · ditekSHen detection
DITEKSHEN_INDICATOR_RTF_Embedded_Excel_Sheetmacroenabled
Detects RTF documents embedding an Excel sheet with macros enabled. Observed in exploit followed by dropper behavior
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-09-06
- Score / Quality
- 75 / 75
What this rule detects
Detects RTF documents embedding an Excel sheet with macros enabled. Observed in exploit followed by dropper behavior
It defines 14 patterns (13 text, 1 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
rule DITEKSHEN_INDICATOR_RTF_Embedded_Excel_Sheetmacroenabled : FILE
{
meta:
= "Detects RTF documents embedding an Excel sheet with macros enabled. Observed in exploit followed by dropper behavior"
= "ditekSHen"
= "342d10b3-61d2-5fcb-8f4f-1fe45049257b"
= "2020-11-06"
= "2024-09-06"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/indicator_office.yar#L304-L328"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "cc3b52e549c2697c6e0a2fea365d193311d90d26854bd2fe321aa26c118975a0"
= 75
= 75
= "FILE"
strings:
$ex1 = "457863656c2e53686565744d6163726f456e61626c65642e" ascii nocase
$ex2 = "0002083200000000c000000000000046" ascii nocase
$ex3 = "Excel.SheetMacroEnabled." ascii
$ole1 = { d0 cf 11 e0 a1 b1 1a e1 }
$ole2 = "d0cf11e0a1b11ae1" ascii nocase
$ole3 = "64306366313165306131623131616531" ascii
$ole4 = "640a300a630a660a310a310a650a300a610a310a620a310a310a610a650a31"
$obj1 = "\\objhtml" ascii
$obj2 = "\\objdata" ascii
$obj3 = "\\objupdate" ascii
$obj4 = "\\objemb" ascii
$obj5 = "\\objautlink" ascii
$obj6 = "\\objlink" ascii
$obj7 = "\\mmath" ascii
condition:
uint32( 0 ) == 0x74725c7b and ( 1 of ( $ex* ) and 1 of ( $ole* ) and 2 of ( $obj* ) )
}
Strings (14 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $ex1 | text | "457863656c2e53686565744d6163726f456e61626c65642e" | ascii nocase |
| $ex2 | text | "0002083200000000c000000000000046" | ascii nocase |
| $ex3 | text | "Excel.SheetMacroEnabled." | ascii |
| $ole1 | hex | { d0 cf 11 e0 a1 b1 1a e1 } | |
| $ole2 | text | "d0cf11e0a1b11ae1" | ascii nocase |
| $ole3 | text | "64306366313165306131623131616531" | ascii |
| $ole4 | text | "640a300a630a660a310a310a650a300a610a310a620a310a310a610a650a31" | |
| $obj1 | text | "\\objhtml" | ascii |
| $obj2 | text | "\\objdata" | ascii |
| $obj3 | text | "\\objupdate" | ascii |
| $obj4 | text | "\\objemb" | ascii |
| $obj5 | text | "\\objautlink" | ascii |
| $obj6 | text | "\\objlink" | ascii |
| $obj7 | text | "\\mmath" | ascii |
Condition
uint32( 0 ) == 0x74725c7b and ( 1 of ( $ex* ) and 1 of ( $ole* ) and 2 of ( $obj* ) )In plain words (Heuristic)
- The file must start with “{\rt” — an RTF document.
- At least 1 patterns in ( $ex* ) must match.
- At least 1 patterns in ( $ole* ) must match.
- At least 2 patterns in ( $obj* ) 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.
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).
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: 342d10b3-61d2-5fcb-8f4f-1fe45049257b
Tags:FILE
Related rules
- Suspicious / huntingditekSHen detection· ditekSHen· 2023-08-22
- Suspicious / huntingditekSHen detection· ditekSHen· 2021-01-21
- Suspicious / huntingditekSHen detection· ditekSHen· 2021-01-21
- Suspicious / huntingditekSHen detection· ditekSHen· 2021-01-21
- Suspicious / huntingditekSHen detection· ditekSHen· 2021-01-21
- Suspicious / huntingditekSHen detection· ditekSHen· 2021-01-21
- Suspicious / huntingditekSHen detection· ditekSHen· 2021-01-21
- Suspicious / huntingditekSHen detection· ditekSHen· 2021-01-21