Suspicious Execution from a Mounted Device

Identifies when a script interpreter or signed binary is launched via a non-standard working directory. An attacker may use this technique to evade defenses.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2021/05/28"
 3integration = ["endpoint", "windows"]
 4maturity = "production"
 5min_stack_comments = "New fields added: required_fields, related_integrations, setup"
 6min_stack_version = "8.3.0"
 7updated_date = "2024/03/28"
 8
 9[rule]
10author = ["Elastic"]
11description = """
12Identifies when a script interpreter or signed binary is launched via a non-standard working directory. An attacker may
13use this technique to evade defenses.
14"""
15from = "now-9m"
16index = ["winlogbeat-*", "logs-endpoint.events.process-*", "logs-windows.sysmon_operational-*"]
17language = "eql"
18license = "Elastic License v2"
19name = "Suspicious Execution from a Mounted Device"
20references = [
21    "https://www.microsoft.com/security/blog/2021/05/27/new-sophisticated-email-based-attack-from-nobelium/",
22    "https://www.volexity.com/blog/2021/05/27/suspected-apt29-operation-launches-election-fraud-themed-phishing-campaigns/",
23]
24risk_score = 47
25rule_id = "8a1d4831-3ce6-4859-9891-28931fa6101d"
26setup = """## Setup
27
28If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2,
29events will not define `event.ingested` and default fallback for EQL rules was not added until version 8.2.
30Hence for this rule to work effectively, users will need to add a custom ingest pipeline to populate
31`event.ingested` to @timestamp.
32For more details on adding a custom ingest pipeline refer - https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html
33"""
34severity = "medium"
35tags = ["Domain: Endpoint", "OS: Windows", "Use Case: Threat Detection", "Tactic: Defense Evasion", "Tactic: Execution", "Data Source: Elastic Defend", "Data Source: Sysmon"]
36timestamp_override = "event.ingested"
37type = "eql"
38
39query = '''
40process where host.os.type == "windows" and event.type == "start" and process.executable : "C:\\*" and
41  (process.working_directory : "?:\\" and not process.working_directory: "C:\\") and
42  process.parent.name : "explorer.exe" and
43  process.name : ("rundll32.exe", "mshta.exe", "powershell.exe", "pwsh.exe", "cmd.exe", "regsvr32.exe",
44                  "cscript.exe", "wscript.exe")
45'''
46
47
48[[rule.threat]]
49framework = "MITRE ATT&CK"
50[[rule.threat.technique]]
51id = "T1218"
52name = "System Binary Proxy Execution"
53reference = "https://attack.mitre.org/techniques/T1218/"
54[[rule.threat.technique.subtechnique]]
55id = "T1218.005"
56name = "Mshta"
57reference = "https://attack.mitre.org/techniques/T1218/005/"
58
59[[rule.threat.technique.subtechnique]]
60id = "T1218.010"
61name = "Regsvr32"
62reference = "https://attack.mitre.org/techniques/T1218/010/"
63
64[[rule.threat.technique.subtechnique]]
65id = "T1218.011"
66name = "Rundll32"
67reference = "https://attack.mitre.org/techniques/T1218/011/"
68
69
70
71[rule.threat.tactic]
72id = "TA0005"
73name = "Defense Evasion"
74reference = "https://attack.mitre.org/tactics/TA0005/"
75[[rule.threat]]
76framework = "MITRE ATT&CK"
77[[rule.threat.technique]]
78id = "T1059"
79name = "Command and Scripting Interpreter"
80reference = "https://attack.mitre.org/techniques/T1059/"
81
82[[rule.threat.technique.subtechnique]]
83id = "T1059.001"
84name = "PowerShell"
85reference = "https://attack.mitre.org/techniques/T1059/001/"
86
87[[rule.threat.technique.subtechnique]]
88id = "T1059.003"
89name = "Windows Command Shell"
90reference = "https://attack.mitre.org/techniques/T1059/003/"
91
92
93
94[rule.threat.tactic]
95id = "TA0002"
96name = "Execution"
97reference = "https://attack.mitre.org/tactics/TA0002/"

References

Related rules

to-top