[metadata]
creation_date = "2020/09/02"
maturity = "production"
updated_date = "2020/11/03"

[rule]
author = ["Elastic"]
description = """
Identifies scrobj.dll loaded into unusual Microsoft processes. This usually means a malicious scriptlet is being
executed in the target process.
"""
from = "now-9m"
index = ["logs-endpoint.events.*", "winlogbeat-*"]
language = "eql"
license = "Elastic License"
name = "Windows Suspicious Script Object Execution"
risk_score = 21
rule_id = "4ed678a9-3a4f-41fb-9fea-f85a6e0a0dff"
severity = "medium"
tags = ["Elastic", "Host", "Windows", "Threat Detection", "Defense Evasion"]
type = "eql"

query = '''
/* add winlogbeat-* when process.code_signature.* fields are populated */

sequence by process.entity_id with maxspan=2m
  [process where event.type in ("start", "process_started") and
     /* uncomment once in winlogbeat */
     /* process.code_signature.subject_name == "Microsoft Corporation" and process.code_signature.trusted == true and */
     not (process.name : "cscript.exe" or
          process.name : "iexplore.exe" or
          process.name : "MicrosoftEdge.exe" or
          process.name : "msiexec.exe" or
          process.name : "smartscreen.exe" or
          process.name : "taskhostw.exe" or
          process.name : "w3wp.exe" or
          process.name : "wscript.exe")]
  [library where event.type == "start" and file.name : "scrobj.dll"]
'''


[[rule.threat]]
framework = "MITRE ATT&CK"

[rule.threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"

