Skip to content

Commit f684ef8

Browse files
authored
Create DNSQueriesServer.yaml (#1016)
1 parent f9ac934 commit f684ef8

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Windows.ETW.DNSQueriesServer
2+
type: CLIENT_EVENT
3+
4+
description: |
5+
Logs dns queries on DNS servers. This is handy for identifying the true source system that is initiating malicious dns requests that you observed. Note that this can be resource intensive for the CPU on busy DNS servers - from 5% to 70% CPU load of one core, but memory consumption is very low. This is still a lot less then enabling DNS debug logging.
6+
7+
author: "Jos Clephas - jos-ir"
8+
9+
parameters:
10+
- name: QueryNameRegex
11+
default: .
12+
- name: SourceIPRegex
13+
default: .
14+
15+
sources:
16+
- precondition:
17+
SELECT OS From info() where OS = 'windows'
18+
19+
query: |
20+
SELECT System.TimeStamp as TimeStamp,
21+
System.ID as ID,
22+
EventData.BufferSize as BufferSize,
23+
EventData.Flags as Flags,
24+
EventData.InterfaceIP as InterfaceIP,
25+
EventData.Port as Port,
26+
EventData.QNAME as QNAME,
27+
EventData.QTYPE as QTYPE,
28+
EventData.RD as RD,
29+
EventData.Source as Source,
30+
EventData.TCP as TCP,
31+
EventData.XID as XID
32+
FROM watch_etw(guid="{EB79061A-A566-4698-9119-3ED2807060E7}")
33+
WHERE EventData AND
34+
QNAME =~ QueryNameRegex AND
35+
Source =~ SourceIPRegex

0 commit comments

Comments
 (0)