Detection rules › Elastic

Attempt to Mount a Remote WebDav Share

Source
github.com/elastic/protections-artifacts

Identifies attempt to mount or copy files from a remote WebDav Share. Adversaries may abuse this method to evade dropping malicious files to victim file system.

MITRE ATT&CK coverage

Rule body

[rule]
description = """
Identifies attempt to mount or copy files from a remote WebDav Share. Adversaries may abuse this method to evade
dropping malicious files to victim file system.
"""
id = "0a364281-5edc-4f75-a839-48b150cec3f2"
license = "Elastic License v2"
name = "Attempt to Mount a Remote WebDav Share"
os_list = ["windows"]
version = "1.0.10"

query = '''
process where event.action == "start" and
 (
  (process.name : "explorer.exe" and process.args : "\\\\*@*") or
  (process.name : "rundll32.exe" and process.command_line : "*\\\\*@*,*" and process.parent.name : ("explorer.exe", "cmd.exe", "powershell.exe", "mshta.exe", "msiexec.exe")) or 
  (process.name : "net.exe" and process.args : "use" and 
   ((process.args : ("http*:*", "*webdav*") and process.args : "/user*@*") or process.command_line : "*\\\\*@ssl\\*") and not process.command_line : "*//localhost*") or
  (process.name : ("expand.exe", "xcopy.exe", "cmd.exe") and process.args : ("\\\\webdav*", "*DavWWWRoot*"))
 ) and
 not (process.parent.name : "rundll32.exe" and process.parent.args : "?:\\Program Files\\Microsoft Office\\root\\Office16\\MLCFG32.CPL") and
 not process.parent.executable : ("C:\\Program Files\\Microsoft Office\\root\\Office16\\WINPROJ.EXE",
                                  "D:\\SF-Deploy\\Console\\Console.exe",
                                  "C:\\Program Files\\WindowsApps\\MyCaseInc.MyCaseFileSync_*\\app\\MyCase Desktop.exe",
                                  "C:\\Program Files\\Microsoft Office\\root\\Office16\\OUTLOOK.EXE") and
 not (process.name : "xcopy.exe" and process.args : "\\\\*.sharepoint.com\\DavWWWRoot\\sites\\*")
'''

min_endpoint_version = "7.16.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0

[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 0

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1204"
name = "User Execution"
reference = "https://attack.mitre.org/techniques/T1204/"
[[threat.technique.subtechnique]]
id = "T1204.002"
name = "Malicious File"
reference = "https://attack.mitre.org/techniques/T1204/002/"



[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1021"
name = "Remote Services"
reference = "https://attack.mitre.org/techniques/T1021/"
[[threat.technique.subtechnique]]
id = "T1021.002"
name = "SMB/Windows Admin Shares"
reference = "https://attack.mitre.org/techniques/T1021/002/"



[threat.tactic]
id = "TA0008"
name = "Lateral Movement"
reference = "https://attack.mitre.org/tactics/TA0008/"

[internal]
min_endpoint_version = "7.16.0"

Stages and Predicates

Stage 1: process

process where event.action == "start" and
 (
  (process.name : "explorer.exe" and process.args : "\\\\*@*") or
  (process.name : "rundll32.exe" and process.command_line : "*\\\\*@*,*" and process.parent.name : ("explorer.exe", "cmd.exe", "powershell.exe", "mshta.exe", "msiexec.exe")) or 
  (process.name : "net.exe" and process.args : "use" and 
   ((process.args : ("http*:*", "*webdav*") and process.args : "/user*@*") or process.command_line : "*\\\\*@ssl\\*") and not process.command_line : "*//localhost*") or
  (process.name : ("expand.exe", "xcopy.exe", "cmd.exe") and process.args : ("\\\\webdav*", "*DavWWWRoot*"))
 ) and
 not (process.parent.name : "rundll32.exe" and process.parent.args : "?:\\Program Files\\Microsoft Office\\root\\Office16\\MLCFG32.CPL") and
 not process.parent.executable : ("C:\\Program Files\\Microsoft Office\\root\\Office16\\WINPROJ.EXE",
                                  "D:\\SF-Deploy\\Console\\Console.exe",
                                  "C:\\Program Files\\WindowsApps\\MyCaseInc.MyCaseFileSync_*\\app\\MyCase Desktop.exe",
                                  "C:\\Program Files\\Microsoft Office\\root\\Office16\\OUTLOOK.EXE") and
 not (process.name : "xcopy.exe" and process.args : "\\\\*.sharepoint.com\\DavWWWRoot\\sites\\*")

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.argswildcard\\*.sharepoint.com\DavWWWRoot\sites\*excludes:process.args field:"process.args" value:"\\*.sharepoint.com\DavWWWRoot\sites\*"
process.nameeqxcopy.exeexcludes:process.name field:"process.name" value:"xcopy.exe"
process.parent.argseq?:\Program Files\Microsoft Office\root\Office16\MLCFG32.CPLexcludes:process.parent.args field:"process.parent.args" value:"?:\Program Files\Microsoft Office\root\Office16\MLCFG32.CPL"
process.parent.nameeqrundll32.exeexcludes:process.parent.name field:"process.parent.name" value:"rundll32.exe"
process.parent.executablewildcardC:\Program Files\Microsoft Office\root\Office16\WINPROJ.EXE, D:\SF-Deploy\Console\Console.exe, C:\Program Files\WindowsApps\MyCaseInc.MyCaseFileSync_*\app\MyCase Desktop.exe, C:\Program Files\Microsoft Office\root\Office16\OUTLOOK.EXEexcludes:process.parent.executable

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • start corpus 391 (elastic 391)
field:"EventType" kind:eq value:"start"
process.argswildcard
  • *DavWWWRoot*
  • *webdav*
  • /user*@*
  • \\*@*
  • \\webdav*
  • http*:*
  • use corpus 5 (elastic 5)
field:"process.args" kind:wildcard
process.command_linewildcard
  • *\\*@*,* corpus 2 (elastic 2)
  • *\\*@ssl\*
field:"CommandLine" kind:wildcard
process.namewildcard
  • cmd.exe corpus 121 (elastic 92, splunk 29)
  • expand.exe corpus 8 (elastic 7, splunk 1)
  • explorer.exe corpus 21 (elastic 19, splunk 2)
  • net.exe corpus 28 (elastic 26, splunk 2)
  • rundll32.exe corpus 126 (elastic 100, splunk 26)
  • xcopy.exe corpus 10 (elastic 10)
field:"process_name" kind:wildcard
process.parent.namewildcard
  • cmd.exe corpus 36 (elastic 31, splunk 4, kusto 1)
  • explorer.exe corpus 51 (elastic 50, splunk 1)
  • mshta.exe corpus 24 (elastic 22, splunk 2)
  • msiexec.exe corpus 19 (elastic 14, splunk 3, kusto 2)
  • powershell.exe corpus 39 (elastic 36, kusto 2, splunk 1)
field:"parent_process_name" kind:wildcard