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/03/24"
  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-endpoint.events.process-*, logs-windows.sysmon_operational-*, logs-system.security-*, logs-windows.*, winlogbeat-*, logs-crowdstrike.fdr*, logs-m365_defender.event-* METADATA _id, _version, _index
 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, user.id
 65// extract domain or IP address from process cmdline
 66| grok process.command_line """(?<Esql.server_webdav_server>((http|https)://[a-zA-Z0-9-\.]{1,}\.[a-zA-Z]{2,3}[@\/]+)|(\b(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\b)[@\/]+)"""
 67// remove sub domains from URL
 68| eval Esql.server_webdav_server = REPLACE(Esql.server_webdav_server, """((http|https)://[a-zA-Z0-9-]{1,}\.)""", "")
 69| eval Esql.server_webdav_server = REPLACE(Esql.server_webdav_server, "/", "")
 70| where
 71    Esql.server_webdav_server is not null and
 72    not Esql.server_webdav_server in ("www.google.com", "www.elastic.co", "sharepoint.com", "live.net", "google.com", "SHAREPOINT.COM", "github.com") and
 73    // excludes private IP ranges
 74    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})"""
 75| stats
 76    Esql.event_count = count(*),
 77    Esql.host_id_count_distinct = count_distinct(host.id),
 78    Esql.host_id_values = values(host.id),
 79    Esql.user_name_values = values(user.name)
 80  by Esql.server_webdav_server
 81| where
 82    Esql.host_id_count_distinct == 1 and Esql.event_count <= 3
 83| 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)
 84| KEEP host.id, user.name, destination.domain, Esql.*
 85'''
 86
 87
 88[[rule.threat]]
 89framework = "MITRE ATT&CK"
 90
 91[[rule.threat.technique]]
 92id = "T1187"
 93name = "Forced Authentication"
 94reference = "https://attack.mitre.org/techniques/T1187/"
 95
 96[rule.threat.tactic]
 97id = "TA0006"
 98name = "Credential Access"
 99reference = "https://attack.mitre.org/tactics/TA0006/"
100
101[[rule.threat]]
102framework = "MITRE ATT&CK"
103
104[[rule.threat.technique]]
105id = "T1218"
106name = "System Binary Proxy Execution"
107reference = "https://attack.mitre.org/techniques/T1218/"
108
109[[rule.threat.technique.subtechnique]]
110id = "T1218.011"
111name = "Rundll32"
112reference = "https://attack.mitre.org/techniques/T1218/011/"
113
114[rule.threat.tactic]
115id = "TA0005"
116name = "Defense Evasion"
117reference = "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