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/04/28"
 6min_stack_version = "8.17.0"
 7min_stack_comments = "Elastic ES|QL VALUES aggregation is more performant in 8.16.5 and above."
 8
 9[rule]
10author = ["Elastic"]
11description = """
12Identifies rare connection attempts to a Web Distributed Authoring and Versioning (WebDAV) resource. Attackers may inject
13WebDAV paths in files or features opened by a victim user to leak their NTLM credentials via forced authentication.
14"""
15from = "now-3660s"
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 for Endpoint",
51    "Data Source: Crowdstrike",
52    "Resources: Investigation Guide",
53]
54timestamp_override = "event.ingested"
55type = "esql"
56
57query = '''
58FROM logs-*
59| where @timestamp > NOW() - 8 hours
60| WHERE event.category == "process" and event.type == "start" and process.name == "rundll32.exe" and process.command_line like "*DavSetCookie*"
61| keep host.id, process.command_line, user.name
62| grok process.command_line """(?<target>DavSetCookie .* http)"""
63| eval webdav_target = REPLACE(target, "(DavSetCookie | http)", "")
64| where webdav_target is not null and webdav_target rlike """(([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,3}(@SSL.*)*|(\d{1,3}\.){3}\d{1,3})""" and not webdav_target in ("www.google.com@SSL", "www.elastic.co@SSL") and not webdav_target 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})"""
65| stats total = count(*), unique_count_host = count_distinct(host.id), hosts = VALUES(host.id), users = VALUES(user.name) by webdav_target
66| where unique_count_host == 1 and total <= 3
67'''
68
69
70[[rule.threat]]
71framework = "MITRE ATT&CK"
72[[rule.threat.technique]]
73id = "T1187"
74name = "Forced Authentication"
75reference = "https://attack.mitre.org/techniques/T1187/"
76
77
78[rule.threat.tactic]
79id = "TA0006"
80name = "Credential Access"
81reference = "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