Lateral Movement via Startup Folder
Identifies suspicious file creations in the startup folder of a remote system. An adversary could abuse this to move laterally by dropping a malicious script or executable that will be executed after a reboot or user logon.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2020/10/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/10/23"
8
9[rule]
10author = ["Elastic"]
11description = """
12Identifies suspicious file creations in the startup folder of a remote system. An adversary could abuse this to move
13laterally by dropping a malicious script or executable that will be executed after a reboot or user logon.
14"""
15from = "now-9m"
16index = ["logs-endpoint.events.*", "winlogbeat-*", "logs-windows.*", "endgame-*"]
17language = "eql"
18license = "Elastic License v2"
19name = "Lateral Movement via Startup Folder"
20references = ["https://www.mdsec.co.uk/2017/06/rdpinception/"]
21risk_score = 73
22rule_id = "25224a80-5a4a-4b8a-991e-6ab390465c4f"
23setup = """
24
25If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2,
26events will not define `event.ingested` and default fallback for EQL rules was not added until version 8.2.
27Hence for this rule to work effectively, users will need to add a custom ingest pipeline to populate
28`event.ingested` to @timestamp.
29For more details on adding a custom ingest pipeline refer - https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html
30"""
31severity = "high"
32tags = ["Domain: Endpoint", "OS: Windows", "Use Case: Threat Detection", "Tactic: Lateral Movement", "Data Source: Elastic Endgame", "Data Source: Elastic Defend"]
33timestamp_override = "event.ingested"
34type = "eql"
35
36query = '''
37file where host.os.type == "windows" and event.type in ("creation", "change") and
38
39 /* via RDP TSClient mounted share or SMB */
40 (process.name : "mstsc.exe" or process.pid == 4) and
41
42 file.path : ("?:\\Users\\*\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\*",
43 "?:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\*")
44'''
45
46
47[[rule.threat]]
48framework = "MITRE ATT&CK"
49[[rule.threat.technique]]
50id = "T1021"
51name = "Remote Services"
52reference = "https://attack.mitre.org/techniques/T1021/"
53
54[[rule.threat.technique.subtechnique]]
55id = "T1021.001"
56name = "Remote Desktop Protocol"
57reference = "https://attack.mitre.org/techniques/T1021/001/"
58
59
60[rule.threat.tactic]
61id = "TA0008"
62name = "Lateral Movement"
63reference = "https://attack.mitre.org/tactics/TA0008/"
64[[rule.threat]]
65framework = "MITRE ATT&CK"
66[[rule.threat.technique]]
67id = "T1547"
68name = "Boot or Logon Autostart Execution"
69reference = "https://attack.mitre.org/techniques/T1547/"
70[[rule.threat.technique.subtechnique]]
71id = "T1547.001"
72name = "Registry Run Keys / Startup Folder"
73reference = "https://attack.mitre.org/techniques/T1547/001/"
74
75
76
77[rule.threat.tactic]
78id = "TA0003"
79name = "Persistence"
80reference = "https://attack.mitre.org/tactics/TA0003/"
References
Related rules
- Execution via TSClient Mountpoint
- Microsoft Exchange Server UM Spawning Suspicious Processes
- Microsoft Exchange Server UM Writing Suspicious Files
- Mounting Hidden or WebDav Remote Shares
- Potential Remote Desktop Shadowing Activity