EXPL_Office_TemplateInjection_Aug19
Description
Detects possible template injections in Office documents, particularly those that load content from external sources
Query · yara
strings:
$x1 = /attachedTemplate" Target="http[s]?:\/\/[^"]{4,60}/ ascii
$fp1 = ".sharepoint.com" // this could cause false negatives if the malicious template is hosted on sharepoint
$fp2 = ".office.com" // this could cause false negatives if the malicious template is hosted on office.com
condition:
filesize < 20MB
and $x1
and not 1 of ($fp*)
}