Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create DNSQueriesServer.yaml #1016

Merged
merged 1 commit into from
Apr 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions artifacts/definitions/Windows/ETW/DNSQueriesServer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Windows.ETW.DNSQueriesServer
type: CLIENT_EVENT

description: |
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.

author: "Jos Clephas - jos-ir"

parameters:
- name: QueryNameRegex
default: .
- name: SourceIPRegex
default: .

sources:
- precondition:
SELECT OS From info() where OS = 'windows'

query: |
SELECT System.TimeStamp as TimeStamp,
System.ID as ID,
EventData.BufferSize as BufferSize,
EventData.Flags as Flags,
EventData.InterfaceIP as InterfaceIP,
EventData.Port as Port,
EventData.QNAME as QNAME,
EventData.QTYPE as QTYPE,
EventData.RD as RD,
EventData.Source as Source,
EventData.TCP as TCP,
EventData.XID as XID
FROM watch_etw(guid="{EB79061A-A566-4698-9119-3ED2807060E7}")
WHERE EventData AND
QNAME =~ QueryNameRegex AND
Source =~ SourceIPRegex