Suspicious Managed Code Hosting Process

Identifies a suspicious managed code hosting process which could indicate code injection or other form of suspicious code execution.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2020/08/21"
 3integration = ["endpoint", "windows"]
 4maturity = "production"
 5min_stack_comments = "New fields added: required_fields, related_integrations, setup"
 6min_stack_version = "8.3.0"
 7updated_date = "2023/06/22"
 8
 9[rule]
10author = ["Elastic"]
11description = """
12Identifies a suspicious managed code hosting process which could indicate code injection or other form of suspicious
13code execution.
14"""
15from = "now-9m"
16index = ["winlogbeat-*", "logs-endpoint.events.*", "logs-windows.*"]
17language = "eql"
18license = "Elastic License v2"
19name = "Suspicious Managed Code Hosting Process"
20references = ["https://blog.menasec.net/2019/07/interesting-difr-traces-of-net-clr.html"]
21risk_score = 73
22rule_id = "acf738b5-b5b2-4acc-bad9-1e18ee234f40"
23severity = "high"
24tags = ["Domain: Endpoint", "OS: Windows", "Use Case: Threat Detection", "Tactic: Defense Evasion", "Data Source: Elastic Defend"]
25type = "eql"
26
27query = '''
28sequence by process.entity_id with maxspan=5m
29 [process where host.os.type == "windows" and event.type == "start" and
30  process.name : ("wscript.exe", "cscript.exe", "mshta.exe", "wmic.exe", "regsvr32.exe", "svchost.exe", "dllhost.exe", "cmstp.exe")]
31 [file where host.os.type == "windows" and event.type != "deletion" and
32  file.name : ("wscript.exe.log",
33               "cscript.exe",
34               "mshta.exe.log",
35               "wmic.exe.log",
36               "svchost.exe.log",
37               "dllhost.exe.log",
38               "cmstp.exe.log",
39               "regsvr32.exe.log")]
40'''
41
42
43[[rule.threat]]
44framework = "MITRE ATT&CK"
45[[rule.threat.technique]]
46id = "T1055"
47name = "Process Injection"
48reference = "https://attack.mitre.org/techniques/T1055/"
49
50
51[rule.threat.tactic]
52id = "TA0005"
53name = "Defense Evasion"
54reference = "https://attack.mitre.org/tactics/TA0005/"

References

Related rules

to-top