Rare Connection to WebDAV Target

Identifies rare connection attempts to a Web Distributed Authoring and Versioning (WebDAV) resource. Attackers may inject WebDAV paths in files or features opened by a victim user to leak their NTLM credentials via forced authentication.

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2025/04/28"
  3integration = ["endpoint", "system", "windows", "m365_defender", "crowdstrike"]
  4maturity = "production"
  5updated_date = "2026/08/18"
  6
  7[rule]
  8author = ["Elastic"]
  9description = """
 10Identifies rare connection attempts to a Web Distributed Authoring and Versioning (WebDAV) resource. Attackers may
 11inject WebDAV paths in files or features opened by a victim user to leak their NTLM credentials via forced
 12authentication.
 13"""
 14from = "now-8h"
 15interval="1h"
 16language = "esql"
 17license = "Elastic License v2"
 18name = "Rare Connection to WebDAV Target"
 19note = """## Triage and analysis
 20
 21### Investigating Rare Connection to WebDAV Target
 22
 23### Possible investigation steps
 24
 25- Examine the reputation of the destination domain or IP address.
 26- Verify if the target user opened any attachments or clicked links pointing to the same target within seconds from the alert timestamp.
 27- Correlate the findings with other security logs and alerts to identify any patterns or additional indicators of compromise related to the potential relay attack.
 28
 29### False positive analysis
 30
 31- User accessing legit WebDAV resources.
 32
 33### Response and remediation
 34
 35- Conduct a password reset for the target account that may have been compromised or are at risk, ensuring the use of strong, unique passwords.
 36- Verify whether other users were targeted but did not open the lure..
 37- Escalate the incident to the security operations center (SOC) or incident response team for further investigation and to determine the full scope of the breach.
 38- Conduct a post-incident review to identify any gaps in security controls and update policies or procedures to prevent recurrence, ensuring lessons learned are applied to improve overall security posture."""
 39references = ["https://attack.mitre.org/techniques/T1187/"]
 40risk_score = 47
 41rule_id = "6756ee27-9152-479b-9b73-54b5bbda301c"
 42severity = "medium"
 43tags = [
 44    "Domain: Endpoint",
 45    "OS: Windows",
 46    "Use Case: Threat Detection",
 47    "Tactic: Credential Access",
 48    "Data Source: Elastic Defend",
 49    "Data Source: Windows Security Event Logs",
 50    "Data Source: Microsoft Defender XDR",
 51    "Data Source: Crowdstrike",
 52    "Resources: Investigation Guide",
 53]
 54timestamp_override = "event.ingested"
 55type = "esql"
 56
 57query = '''
 58from logs-endpoint.events.process-*, logs-windows.sysmon_operational-*, logs-system.security-*, logs-windows.*, winlogbeat-*, logs-crowdstrike.fdr*, logs-m365_defender.event-* METADATA _id, _version, _index
 59| where
 60    event.category == "process" and
 61    event.type == "start" and
 62    process.name == "rundll32.exe" and
 63    process.command_line like "*DavSetCookie*"
 64| keep host.id, process.command_line, user.name, user.id
 65// extract the host from the WebDAV URL authority, excluding optional credentials and port
 66| grok process.command_line """(?i:https?)://(?:[^/@\s]+@)?(?<Esql.server_webdav_server>[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*)"""
 67| eval Esql.server_webdav_server = TO_LOWER(Esql.server_webdav_server)
 68| where
 69    Esql.server_webdav_server is not null and
 70    not Esql.server_webdav_server in ("www.google.com", "www.elastic.co", "google.com", "github.com", "www.github.com", "sharepoint.com", "live.net") and
 71    not Esql.server_webdav_server like ("*.live.net", "*.sharepoint.com") and
 72    // excludes private IP ranges
 73    not Esql.server_webdav_server rlike """(10\.(\d{1,3}\.){2}\d{1,3}|172\.(1[6-9]|2\d|3[0-1])\.(\d{1,3}\.)\d{1,3}|192\.168\.(\d{1,3}\.)\d{1,3})"""
 74| stats
 75    Esql.event_count = count(*),
 76    Esql.host_id_count_distinct = count_distinct(host.id),
 77    Esql.host_id_values = values(host.id),
 78    Esql.user_name_values = values(user.name)
 79  by Esql.server_webdav_server
 80| where
 81    Esql.host_id_count_distinct == 1 and Esql.event_count <= 3
 82| eval host.id = MV_MIN(Esql.host_id_values), user.name = MV_MIN(Esql.user_name_values), destination.domain = MV_MIN(Esql.server_webdav_server)
 83| KEEP host.id, user.name, destination.domain, Esql.*
 84'''
 85
 86setup = """## Setup
 87
 88This rule is designed for data generated by [Elastic Defend](https://www.elastic.co/security/endpoint-security), which provides native endpoint detection and response, along with event enrichments designed to work with our detection rules.
 89
 90Setup instructions: https://ela.st/install-elastic-defend
 91
 92### Additional data sources
 93
 94This rule also supports the following third-party data sources. For setup instructions, refer to the links below:
 95
 96- [CrowdStrike](https://ela.st/crowdstrike-integration)
 97- [Microsoft Defender XDR](https://ela.st/m365-defender)
 98- [Sysmon Event ID 1 - Process Creation](https://ela.st/sysmon-event-1-setup)
 99- [Windows Process Creation Logs](https://ela.st/audit-process-creation)
100"""
101
102
103[[rule.threat]]
104framework = "MITRE ATT&CK"
105
106[[rule.threat.technique]]
107id = "T1187"
108name = "Forced Authentication"
109reference = "https://attack.mitre.org/techniques/T1187/"
110
111[rule.threat.tactic]
112id = "TA0006"
113name = "Credential Access"
114reference = "https://attack.mitre.org/tactics/TA0006/"
115
116[[rule.threat]]
117framework = "MITRE ATT&CK"
118
119[[rule.threat.technique]]
120id = "T1218"
121name = "System Binary Proxy Execution"
122reference = "https://attack.mitre.org/techniques/T1218/"
123
124[[rule.threat.technique.subtechnique]]
125id = "T1218.011"
126name = "Rundll32"
127reference = "https://attack.mitre.org/techniques/T1218/011/"
128
129[rule.threat.tactic]
130id = "TA0005"
131name = "Defense Evasion"
132reference = "https://attack.mitre.org/tactics/TA0005/"

Triage and analysis

Investigating Rare Connection to WebDAV Target

Possible investigation steps

  • Examine the reputation of the destination domain or IP address.
  • Verify if the target user opened any attachments or clicked links pointing to the same target within seconds from the alert timestamp.
  • Correlate the findings with other security logs and alerts to identify any patterns or additional indicators of compromise related to the potential relay attack.

False positive analysis

  • User accessing legit WebDAV resources.

Response and remediation

  • Conduct a password reset for the target account that may have been compromised or are at risk, ensuring the use of strong, unique passwords.
  • Verify whether other users were targeted but did not open the lure..
  • Escalate the incident to the security operations center (SOC) or incident response team for further investigation and to determine the full scope of the breach.
  • Conduct a post-incident review to identify any gaps in security controls and update policies or procedures to prevent recurrence, ensuring lessons learned are applied to improve overall security posture.

References

Related rules

to-top