YARA · ditekSHen detection
DITEKSHEN_INDICATOR_RTF_EXPLOIT_CVE_2017_0199_1
Detects RTF documents potentially exploiting CVE-2017-0199
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-09-06
- Score / Quality
- 75 / 75
What this rule detects
Detects RTF documents potentially exploiting CVE-2017-0199
It defines 16 patterns (9 text, 7 hex, 0 regex).
YARA-X says: warning[text_as_hex]: hex pattern could be written as text literal
Summary generated from the rule's metadata and condition.
Rule source
rule DITEKSHEN_INDICATOR_RTF_EXPLOIT_CVE_2017_0199_1 : CVE_2017_0199 FILE
{
meta:
= "Detects RTF documents potentially exploiting CVE-2017-0199"
= "ditekSHen"
= "74b3702a-7b4d-58be-ad2c-c2b1cf0ebc50"
= "2020-11-06"
= "2024-09-06"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/indicator_office.yar#L1-L69"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "06b75267f00b775a6c1cd7a2022a9cfa0ea2c976f969c2c066be51449f197f58"
= 75
= 75
= "CVE-2017-0199, FILE"
strings:
$urlmoniker3 = { 45 0a 30 0a 43 0a 39 0a 45 0a 41 0a 37 0a 39 0a
46 0a 39 0a 42 0a 41 0a 43 0a 45 0a 31 0a 31 0a
38 0a 43 0a 38 0a 32 0a 30 0a 30 0a 41 0a 41 0a
30 0a 30 0a 34 0a 42 0a 41 0a 39 0a 30 0a 42 }
$urlmoniker4 = { 45 0d 0a 30 0d 0a 43 0d 0a 39 0d 0a 45 0d 0a 41
0d 0a 37 0d 0a 39 0d 0a 46 0d 0a 39 0d 0a 42 0d
0a 41 0d 0a 43 0d 0a 45 0d 0a 31 0d 0a 31 0d 0a
38 0d 0a 43 0d 0a 38 0d 0a 32 0d 0a 30 0d 0a 30
0d 0a 41 0d 0a 41 0d 0a 30 0d 0a 30 0d 0a 34 0d
0a 42 0d 0a 41 0d 0a 39 0d 0a 30 0d 0a 42 }
$urlmoniker6 = { 65 0a 30 0a 63 0a 39 0a 65 0a 61 0a 37 0a 39 0a
66 0a 39 0a 62 0a 61 0a 63 0a 65 0a 31 0a 31 0a
38 0a 63 0a 38 0a 32 0a 30 0a 30 0a 61 0a 61 0a
30 0a 30 0a 34 0a 62 0a 61 0a 39 0a 30 0a 62 }
$urlmoniker7 = { 65 0d 0a 30 0d 0a 63 0d 0a 39 0d 0a 65 0d 0a 61
0d 0a 37 0d 0a 39 0d 0a 66 0d 0a 39 0d 0a 62 0d
0a 61 0d 0a 63 0d 0a 65 0d 0a 31 0d 0a 31 0d 0a
38 0d 0a 63 0d 0a 38 0d 0a 32 0d 0a 30 0d 0a 30
0d 0a 61 0d 0a 61 0d 0a 30 0d 0a 30 0d 0a 34 0d
0a 62 0d 0a 61 0d 0a 39 0d 0a 30 0d 0a 62 }
$ole1 = { d0 cf 11 e0 a1 b1 1a e1 }
$ole2 = "d0cf11e0a1b11ae1" ascii nocase
$ole3 = "64306366313165306131623131616531" ascii
$ole4 = "640a300a630a660a310a310a650a300a610a310a620a310a310a610a650a31" ascii nocase
$ole5 = { 64 0a 30 0a 63 0a 66 0a 31 0a 31 0a 65 0a 30 }
$ole6 = { 64 0d 0a 30 0d 0a 63 0d 0a 66 0d 0a 31 0d 0a 31 0d 0a 65 0d 0a 30 }
$obj1 = "\\objhtml" ascii
$obj2 = "\\objdata" ascii
$obj3 = "\\objupdate" ascii
$obj4 = "\\objemb" ascii
$obj5 = "\\objautlink" ascii
$obj6 = "\\objlink" ascii
condition:
uint32( 0 ) == 0x74725c7b and 1 of ( $urlmoniker* ) and 1 of ( $ole* ) and 1 of ( $obj* )
}
Strings (16 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $urlmoniker3 | hex | { 45 0a 30 0a 43 0a 39 0a 45 0a 41 0a 37 0a 39 0a 46 0a 39 0a 42 0a 41 0a 43 0a 45 0a 31 0a 31 0a 38 0a 43 0 … | |
| $urlmoniker4 | hex | { 45 0d 0a 30 0d 0a 43 0d 0a 39 0d 0a 45 0d 0a 41 0d 0a 37 0d 0a 39 0d 0a 46 0d 0a 39 0d 0a 42 0d 0a 41 0d 0a … | |
| $urlmoniker6 | hex | { 65 0a 30 0a 63 0a 39 0a 65 0a 61 0a 37 0a 39 0a 66 0a 39 0a 62 0a 61 0a 63 0a 65 0a 31 0a 31 0a 38 0a 63 0a … | |
| $urlmoniker7 | hex | { 65 0d 0a 30 0d 0a 63 0d 0a 39 0d 0a 65 0d 0a 61 0d 0a 37 0d 0a 39 0d 0a 66 0d 0a 39 0d 0a 62 0d 0a 61 0d 0a … | |
| $ole1 | hex | { d0 cf 11 e0 a1 b1 1a e1 } | |
| $ole2 | text | "d0cf11e0a1b11ae1" | ascii nocase |
| $ole3 | text | "64306366313165306131623131616531" | ascii |
| $ole4 | text | "640a300a630a660a310a310a650a300a610a310a620a310a310a610a650a31" | ascii nocase |
| $ole5 | hex | { 64 0a 30 0a 63 0a 66 0a 31 0a 31 0a 65 0a 30 } | |
| $ole6 | hex | { 64 0d 0a 30 0d 0a 63 0d 0a 66 0d 0a 31 0d 0a 31 0d 0a 65 0d 0a 30 } | |
| $obj1 | text | "\\objhtml" | ascii |
| $obj2 | text | "\\objdata" | ascii |
| $obj3 | text | "\\objupdate" | ascii |
| $obj4 | text | "\\objemb" | ascii |
| $obj5 | text | "\\objautlink" | ascii |
| $obj6 | text | "\\objlink" | ascii |
Condition
uint32( 0 ) == 0x74725c7b and 1 of ( $urlmoniker* ) and 1 of ( $ole* ) and 1 of ( $obj* )In plain words (Heuristic)
- The file must start with “{\rt” — an RTF document.
- At least 1 patterns in ( $urlmoniker* ) must match.
- At least 1 patterns in ( $ole* ) must match.
- At least 1 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: 74b3702a-7b4d-58be-ad2c-c2b1cf0ebc50
Tags:CVE_2017_0199FILE
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