Skip to content

Commit b896ce9

Browse files
committed
Create susp_office_template_injection.yar
1 parent 24d6654 commit b896ce9

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
rule EXPL_Office_TemplateInjection_Aug19 {
2+
meta:
3+
old_rule_name = "EXPL_Office_TemplateInjection"
4+
description = "Detects possible template injections in Office documents, particularly those that load content from external sources"
5+
author = "Florian Roth"
6+
reference = "https://attack.mitre.org/techniques/T1221/"
7+
date = "2019-08-22"
8+
modified = "2025-03-20"
9+
score = 75
10+
hash = "f2bdf3716b39d29a9c6c3b7b3355e935594b8d8e9149a784a59dc2381fa1628a"
11+
strings:
12+
$x1 = /attachedTemplate" Target="http[s]?:\/\/[^"]{4,60}/ ascii
13+
14+
$fp1 = ".sharepoint.com" // this could cause false negatives if the malicious template is hosted on sharepoint
15+
$fp2 = ".office.com" // this could cause false negatives if the malicious template is hosted on office.com
16+
condition:
17+
filesize < 20MB
18+
and $x1
19+
and not 1 of ($fp*)
20+
}

0 commit comments

Comments
 (0)