[metadata]
creation_date = "2020/08/17"
maturity = "production"
updated_date = "2020/11/03"

[rule]
author = ["Elastic"]
description = """
Detects the successful hijack of Microsoft Compatibility Appraiser scheduled task to establish persistence with an
integrity level of system.
"""
from = "now-9m"
index = ["winlogbeat-*", "logs-endpoint.events.*"]
language = "kuery"
license = "Elastic License"
name = "Persistence via TelemetryController Scheduled Task Hijack"
references = [
    "https://www.trustedsec.com/blog/abusing-windows-telemetry-for-persistence/?utm_content=131234033&utm_medium=social&utm_source=twitter&hss_channel=tw-403811306",
]
risk_score = 73
rule_id = "68921d85-d0dc-48b3-865f-43291ca2c4f2"
severity = "high"
tags = ["Elastic", "Host", "Windows", "Threat Detection", "Persistence"]
type = "query"

query = '''
event.category:process and event.type:(start or process_started) and
  process.parent.name:(CompatTelRunner.exe or compattelrunner.exe) and process.args:-cv* and
  not process.name:(conhost.exe or DeviceCensus.exe or devicecensus.exe or CompatTelRunner.exe or compattelrunner.exe or DismHost.exe or dismhost.exe or rundll32.exe or powershell.exe)
'''


[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1053"
name = "Scheduled Task/Job"
reference = "https://attack.mitre.org/techniques/T1053/"


[rule.threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"

