Mounting Hidden or WebDav Remote Shares

Identifies the use of net.exe to mount a WebDav or hidden remote share. This may indicate lateral movement or preparation for data exfiltration.

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2020/11/02"
  3integration = ["endpoint", "windows"]
  4maturity = "production"
  5updated_date = "2024/05/21"
  6
  7[rule]
  8author = ["Elastic"]
  9description = """
 10Identifies the use of net.exe to mount a WebDav or hidden remote share. This may indicate lateral movement or
 11preparation for data exfiltration.
 12"""
 13from = "now-9m"
 14index = [
 15    "logs-endpoint.events.process-*",
 16    "winlogbeat-*",
 17    "logs-windows.*",
 18    "endgame-*",
 19    "logs-system.security*",
 20]
 21language = "eql"
 22license = "Elastic License v2"
 23name = "Mounting Hidden or WebDav Remote Shares"
 24risk_score = 47
 25rule_id = "c4210e1c-64f2-4f48-b67e-b5a8ffe3aa14"
 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 = [
 36    "Domain: Endpoint",
 37    "OS: Windows",
 38    "Use Case: Threat Detection",
 39    "Tactic: Initial Access",
 40    "Tactic: Lateral Movement",
 41    "Data Source: Elastic Endgame",
 42    "Data Source: Elastic Defend",
 43]
 44timestamp_override = "event.ingested"
 45type = "eql"
 46
 47query = '''
 48process where host.os.type == "windows" and event.type == "start" and
 49 ((process.name : "net.exe" or ?process.pe.original_file_name == "net.exe") or ((process.name : "net1.exe" or ?process.pe.original_file_name == "net1.exe") and
 50 not process.parent.name : "net.exe")) and
 51 process.args : "use" and
 52 /* including hidden and webdav based online shares such as onedrive  */
 53 process.args : ("\\\\*\\*$*", "\\\\*@SSL\\*", "http*") and
 54 /* excluding shares deletion operation */
 55 not process.args : "/d*"
 56'''
 57
 58
 59[[rule.threat]]
 60framework = "MITRE ATT&CK"
 61[[rule.threat.technique]]
 62id = "T1021"
 63name = "Remote Services"
 64reference = "https://attack.mitre.org/techniques/T1021/"
 65[[rule.threat.technique.subtechnique]]
 66id = "T1021.002"
 67name = "SMB/Windows Admin Shares"
 68reference = "https://attack.mitre.org/techniques/T1021/002/"
 69
 70
 71
 72[rule.threat.tactic]
 73id = "TA0008"
 74name = "Lateral Movement"
 75reference = "https://attack.mitre.org/tactics/TA0008/"
 76[[rule.threat]]
 77framework = "MITRE ATT&CK"
 78[[rule.threat.technique]]
 79id = "T1078"
 80name = "Valid Accounts"
 81reference = "https://attack.mitre.org/techniques/T1078/"
 82[[rule.threat.technique.subtechnique]]
 83id = "T1078.003"
 84name = "Local Accounts"
 85reference = "https://attack.mitre.org/techniques/T1078/003/"
 86
 87
 88
 89[rule.threat.tactic]
 90id = "TA0001"
 91name = "Initial Access"
 92reference = "https://attack.mitre.org/tactics/TA0001/"
 93[[rule.threat]]
 94framework = "MITRE ATT&CK"
 95[[rule.threat.technique]]
 96id = "T1087"
 97name = "Account Discovery"
 98reference = "https://attack.mitre.org/techniques/T1087/"
 99[[rule.threat.technique.subtechnique]]
100id = "T1087.001"
101name = "Local Account"
102reference = "https://attack.mitre.org/techniques/T1087/001/"
103
104[[rule.threat.technique.subtechnique]]
105id = "T1087.002"
106name = "Domain Account"
107reference = "https://attack.mitre.org/techniques/T1087/002/"
108
109
110
111[rule.threat.tactic]
112id = "TA0007"
113name = "Discovery"
114reference = "https://attack.mitre.org/tactics/TA0007/"

Related rules

to-top