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 = "2025/07/16"
 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-3660s"
15language = "esql"
16license = "Elastic License v2"
17name = "Rare Connection to WebDAV Target"
18note = """## Triage and analysis
19
20### Investigating Rare Connection to WebDAV Target
21
22### Possible investigation steps
23
24- Examine the reputation of the destination domain or IP address.
25- Verify if the target user opened any attachments or clicked links pointing to the same target within seconds from the alert timestamp.
26- Correlate the findings with other security logs and alerts to identify any patterns or additional indicators of compromise related to the potential relay attack.
27
28### False positive analysis
29
30- User accessing legit WebDAV resources.
31
32### Response and remediation
33
34- Conduct a password reset for the target account that may have been compromised or are at risk, ensuring the use of strong, unique passwords.
35- Verify whether other users were targeted but did not open the lure..
36- 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.
37- 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."""
38references = ["https://attack.mitre.org/techniques/T1187/"]
39risk_score = 47
40rule_id = "6756ee27-9152-479b-9b73-54b5bbda301c"
41severity = "medium"
42tags = [
43    "Domain: Endpoint",
44    "OS: Windows",
45    "Use Case: Threat Detection",
46    "Tactic: Credential Access",
47    "Data Source: Elastic Defend",
48    "Data Source: Windows Security Event Logs",
49    "Data Source: Microsoft Defender for Endpoint",
50    "Data Source: Crowdstrike",
51    "Resources: Investigation Guide",
52]
53timestamp_override = "event.ingested"
54type = "esql"
55
56query = '''
57from logs-*
58| where
59    @timestamp > now() - 8 hours and
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
65| grok
66    process.command_line """(?<Esql.server_webdav_cookie>DavSetCookie .* http)"""
67| eval
68    Esql.server_webdav_cookie_replace = replace(Esql.server_webdav_cookie, "(DavSetCookie | http)", "")
69| where
70    Esql.server_webdav_cookie_replace is not null and
71    Esql.server_webdav_cookie_replace rlike """(([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,3}(@SSL.*)*|(\d{1,3}\.){3}\d{1,3})""" and
72    not Esql.server_webdav_cookie_replace in ("www.google.com@SSL", "www.elastic.co@SSL") and
73    not Esql.server_webdav_cookie_replace 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_cookie_replace
80| where
81    Esql.host_id_count_distinct == 1 and
82    Esql.event_count <= 3
83'''
84
85
86[[rule.threat]]
87framework = "MITRE ATT&CK"
88[[rule.threat.technique]]
89id = "T1187"
90name = "Forced Authentication"
91reference = "https://attack.mitre.org/techniques/T1187/"
92
93
94[rule.threat.tactic]
95id = "TA0006"
96name = "Credential Access"
97reference = "https://attack.mitre.org/tactics/TA0006/"

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