Execution of Persistent Suspicious Program
Identifies execution of suspicious persistent programs (scripts, rundll32, etc.) by looking at process lineage and command line usage.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2020/11/19"
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 execution of suspicious persistent programs (scripts, rundll32, etc.) by looking at process lineage and
13command line usage.
14"""
15from = "now-9m"
16index = ["winlogbeat-*", "logs-endpoint.events.*", "logs-windows.*", "endgame-*"]
17language = "eql"
18license = "Elastic License v2"
19name = "Execution of Persistent Suspicious Program"
20risk_score = 47
21rule_id = "e7125cea-9fe1-42a5-9a05-b0792cf86f5a"
22severity = "medium"
23tags = ["Domain: Endpoint", "OS: Windows", "Use Case: Threat Detection", "Tactic: Persistence", "Data Source: Elastic Endgame", "Data Source: Elastic Defend"]
24type = "eql"
25
26query = '''
27/* userinit followed by explorer followed by early child process of explorer (unlikely to be launched interactively) within 1m */
28sequence by host.id, user.name with maxspan=1m
29 [process where host.os.type == "windows" and event.type == "start" and process.name : "userinit.exe" and process.parent.name : "winlogon.exe"]
30 [process where host.os.type == "windows" and event.type == "start" and process.name : "explorer.exe"]
31 [process where host.os.type == "windows" and event.type == "start" and process.parent.name : "explorer.exe" and
32 /* add suspicious programs here */
33 process.pe.original_file_name in ("cscript.exe",
34 "wscript.exe",
35 "PowerShell.EXE",
36 "MSHTA.EXE",
37 "RUNDLL32.EXE",
38 "REGSVR32.EXE",
39 "RegAsm.exe",
40 "MSBuild.exe",
41 "InstallUtil.exe") and
42 /* add potential suspicious paths here */
43 process.args : ("C:\\Users\\*", "C:\\ProgramData\\*", "C:\\Windows\\Temp\\*", "C:\\Windows\\Tasks\\*", "C:\\PerfLogs\\*", "C:\\Intel\\*")
44 ]
45'''
46
47
48[[rule.threat]]
49framework = "MITRE ATT&CK"
50[[rule.threat.technique]]
51id = "T1547"
52name = "Boot or Logon Autostart Execution"
53reference = "https://attack.mitre.org/techniques/T1547/"
54[[rule.threat.technique.subtechnique]]
55id = "T1547.001"
56name = "Registry Run Keys / Startup Folder"
57reference = "https://attack.mitre.org/techniques/T1547/001/"
58
59
60
61[rule.threat.tactic]
62id = "TA0003"
63name = "Persistence"
64reference = "https://attack.mitre.org/tactics/TA0003/"
Related rules
- Adobe Hijack Persistence
- Component Object Model Hijacking
- Creation of a Hidden Local User Account
- Creation or Modification of a new GPO Scheduled Task or Service
- Execution via MSSQL xp_cmdshell Stored Procedure