Skip to content

Commit 3fd9bae

Browse files
authored
[New Rule] Potential WPAD Spoofing via DNS Record Creation (#3748)
1 parent 6a0ac56 commit 3fd9bae

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
[metadata]
2+
creation_date = "2024/06/03"
3+
integration = ["system", "windows"]
4+
maturity = "production"
5+
updated_date = "2024/06/03"
6+
7+
[rule]
8+
author = ["Elastic"]
9+
description = """
10+
Identifies the creation of a DNS record that is potentially meant to enable WPAD spoofing. Attackers can disable the
11+
Global Query Block List (GQBL) and create a "wpad" record to exploit hosts running WPAD with default settings for
12+
privilege escalation and lateral movement.
13+
"""
14+
from = "now-9m"
15+
index = ["winlogbeat-*", "logs-system.*", "logs-windows.*"]
16+
language = "eql"
17+
license = "Elastic License v2"
18+
name = "Potential WPAD Spoofing via DNS Record Creation"
19+
references = [
20+
"https://www.thehacker.recipes/ad/movement/mitm-and-coerced-authentications/wpad-spoofing#through-adidns-spoofing",
21+
"https://cube0x0.github.io/Pocing-Beyond-DA/",
22+
]
23+
risk_score = 47
24+
rule_id = "894326d2-56c0-4342-b553-4abfaf421b5b"
25+
setup = """## Setup
26+
27+
The 'Audit Directory Service Changes' logging policy must be configured for (Success, Failure).
28+
Steps to implement the logging policy with Advanced Audit Configuration:
29+
30+
```
31+
Computer Configuration >
32+
Policies >
33+
Windows Settings >
34+
Security Settings >
35+
Advanced Audit Policies Configuration >
36+
Audit Policies >
37+
DS Access >
38+
Audit Directory Service Changes (Success,Failure)
39+
```
40+
41+
The above policy does not cover the target object by default (we still need it to be configured to generate events), so we need to set up an AuditRule using https://github.com/OTRF/Set-AuditRule.
42+
43+
```
44+
Set-AuditRule -AdObjectPath 'AD:\\CN=MicrosoftDNS,DC=DomainDNSZones,DC=Domain,DC=com' -WellKnownSidType WorldSid -Rights CreateChild -InheritanceFlags Descendents -AttributeGUID e0fa1e8c-9b45-11d0-afdd-00c04fd930c9 -AuditFlags Success
45+
```
46+
"""
47+
severity = "medium"
48+
tags = [
49+
"Domain: Endpoint",
50+
"OS: Windows",
51+
"Use Case: Threat Detection",
52+
"Tactic: Credential Access",
53+
"Data Source: Active Directory",
54+
"Use Case: Active Directory Monitoring",
55+
]
56+
timestamp_override = "event.ingested"
57+
type = "eql"
58+
59+
query = '''
60+
any where host.os.type == "windows" and event.action == "Directory Service Changes" and
61+
event.code == "5137" and winlog.event_data.ObjectDN : "DC=wpad,*"
62+
'''
63+
64+
65+
[[rule.threat]]
66+
framework = "MITRE ATT&CK"
67+
[[rule.threat.technique]]
68+
id = "T1557"
69+
name = "Adversary-in-the-Middle"
70+
reference = "https://attack.mitre.org/techniques/T1557/"
71+
72+
73+
[rule.threat.tactic]
74+
id = "TA0006"
75+
name = "Credential Access"
76+
reference = "https://attack.mitre.org/tactics/TA0006/"
77+

0 commit comments

Comments
 (0)