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/09/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 "Noise: Medium",
54 "Performance: Normal",
55 "Profile: Recommended",
56 "Threat: Living off the Land",
57 "Threat: WebDAV Abuse",
58 "Rule Type: ES|QL",
59 "Platform: Windows",
60 "Data Source: Sysmon",
61]
62timestamp_override = "event.ingested"
63type = "esql"
64
65query = '''
66from 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
67| where
68 event.category == "process" and
69 event.type == "start" and
70 process.name == "rundll32.exe" and
71 process.command_line like "*DavSetCookie*"
72| keep host.id, process.command_line, user.name, user.id
73// extract the host from the WebDAV URL authority, excluding optional credentials and port
74| grok process.command_line """(?i:https?)://(?:[^/@\s]+@)?(?<Esql.server_webdav_server>[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*)"""
75| eval Esql.server_webdav_server = TO_LOWER(Esql.server_webdav_server)
76| where
77 Esql.server_webdav_server is not null and
78 not Esql.server_webdav_server in ("www.google.com", "www.elastic.co", "google.com", "github.com", "www.github.com", "sharepoint.com", "live.net") and
79 not Esql.server_webdav_server like ("*.live.net", "*.sharepoint.com") and
80 // excludes private IP ranges
81 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})"""
82| stats
83 Esql.event_count = count(*),
84 Esql.host_id_count_distinct = count_distinct(host.id),
85 Esql.host_id_values = values(host.id),
86 Esql.user_name_values = values(user.name)
87 by Esql.server_webdav_server
88| where
89 Esql.host_id_count_distinct == 1 and Esql.event_count <= 3
90| 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)
91| KEEP host.id, user.name, destination.domain, Esql.*
92'''
93
94setup = """## Setup
95
96This 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.
97
98Setup instructions: https://ela.st/install-elastic-defend
99
100### Additional data sources
101
102This rule also supports the following third-party data sources. For setup instructions, refer to the links below:
103
104- [CrowdStrike](https://ela.st/crowdstrike-integration)
105- [Microsoft Defender XDR](https://ela.st/m365-defender)
106- [Sysmon Event ID 1 - Process Creation](https://ela.st/sysmon-event-1-setup)
107- [Windows Process Creation Logs](https://ela.st/audit-process-creation)
108"""
109
110
111[[rule.threat]]
112framework = "MITRE ATT&CK"
113
114[[rule.threat.technique]]
115id = "T1187"
116name = "Forced Authentication"
117reference = "https://attack.mitre.org/techniques/T1187/"
118
119[rule.threat.tactic]
120id = "TA0006"
121name = "Credential Access"
122reference = "https://attack.mitre.org/tactics/TA0006/"
123
124[[rule.threat]]
125framework = "MITRE ATT&CK"
126
127[[rule.threat.technique]]
128id = "T1218"
129name = "System Binary Proxy Execution"
130reference = "https://attack.mitre.org/techniques/T1218/"
131
132[[rule.threat.technique.subtechnique]]
133id = "T1218.011"
134name = "Rundll32"
135reference = "https://attack.mitre.org/techniques/T1218/011/"
136
137[rule.threat.tactic]
138id = "TA0005"
139name = "Defense Evasion"
140reference = "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
- Potential Local NTLM Relay via HTTP
- Control Panel Process with Unusual Arguments
- Execution of COM object via Xwizard
- ImageLoad via Windows Update Auto Update Client
- Mounting Hidden or WebDav Remote Shares