Skip to content

YARA · ditekSHen detection

DITEKSHEN_INDICATOR_RTF_EXPLOIT_CVE_2017_8759_1

detects CVE-2017-8759 weaponized RTF documents.

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

What this rule detects

detects CVE-2017-8759 weaponized RTF documents.

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

YARA-X says: warning[duplicate_pattern_value]: duplicate pattern value

Summary generated from the rule's metadata and condition.

Rule source

indicator-rtf-exploit-cve-2017-8759-1.yarBSD 2-Clause License
rule DITEKSHEN_INDICATOR_RTF_EXPLOIT_CVE_2017_8759_1 : CVE_2017_8759 FILE
{
	meta:
		description = "detects CVE-2017-8759 weaponized RTF documents."
		author = "ditekSHen"
		id = "8f873145-b909-5185-9f85-07c820d1f38e"
		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#L215-L238"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "595dc0153a2349fbd4f92dd544a3dfd05715059dd639653e7c7e6ac80624360e"
		score = 75
		quality = 75
		tags = "CVE-2017-8759, FILE"

	strings:
		$clsid1 = { 00 03 00 00 00 00 00 00 c0 00 00 00 00 00 00 46 }
		$clsid2 = { 00 03 00 00 00 00 00 00 C0 00 00 00 00 00 00 46 }
		$clsid3 = "0003000000000000c000000000000046" ascii nocase
		$clsid4 = "4f4c45324c696e6b" ascii nocase
		$clsid5 = "OLE2Link" ascii nocase
		$ole1 = { d0 cf 11 e0 a1 b1 1a e1 }
		$ole2 = "d0cf11e0a1b11ae1" ascii nocase
		$ole3 = "64306366313165306131623131616531" ascii
		$ole4 = "640a300a630a660a310a310a650a300a610a310a620a310a310a610a650a31"
		$s1 = "wsdl=http" wide
		$s2 = "METAFILEPICT" ascii
		$s3 = "INCLUDEPICTURE \"http" ascii
		$s4 = "!This program cannot be run in DOS mode" ascii

	condition:
		uint32( 0 ) == 0x74725c7b and 1 of ( $clsid* ) and 1 of ( $ole* ) and 2 of ( $s* )
}

Strings (13 patterns)

IdentifierTypeValueModifiers
$clsid1hex{ 00 03 00 00 00 00 00 00 c0 00 00 00 00 00 00 46 }
$clsid2hex{ 00 03 00 00 00 00 00 00 C0 00 00 00 00 00 00 46 }
$clsid3text"0003000000000000c000000000000046"ascii nocase
$clsid4text"4f4c45324c696e6b"ascii nocase
$clsid5text"OLE2Link"ascii nocase
$ole1hex{ d0 cf 11 e0 a1 b1 1a e1 }
$ole2text"d0cf11e0a1b11ae1"ascii nocase
$ole3text"64306366313165306131623131616531"ascii
$ole4text"640a300a630a660a310a310a650a300a610a310a620a310a310a610a650a31"
$s1text"wsdl=http"wide
$s2text"METAFILEPICT"ascii
$s3text"INCLUDEPICTURE \"http"ascii
$s4text"!This program cannot be run in DOS mode"ascii

Condition

uint32( 0 ) == 0x74725c7b and 1 of ( $clsid* ) and 1 of ( $ole* ) and 2 of ( $s* )

In plain words (Heuristic)

  • The file must start with “{\rt” — an RTF document.
  • At least 1 patterns in ( $clsid* ) must match.
  • At least 1 patterns in ( $ole* ) must match.
  • At least 2 patterns in ( $s* ) 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: 8f873145-b909-5185-9f85-07c820d1f38e

Tags:CVE_2017_8759FILE