Skip to content

Instantly share code, notes, and snippets.

@scudette
Created February 14, 2021 11:54
Show Gist options
  • Save scudette/1e14551d2e37a67c3422b852813f53ff to your computer and use it in GitHub Desktop.
Save scudette/1e14551d2e37a67c3422b852813f53ff to your computer and use it in GitHub Desktop.
Artifact to watch dns queries using ETW
name: Custom.Windows.ETW.DNSQueries
type: CLIENT_EVENT
sources:
- precondition:
SELECT OS From info() where OS = 'windows'
query: |
SELECT System.TimeStamp AS Timestamp,
EventData.QueryName AS Query,
EventData.QueryType AS Type,
EventData.QueryResults AS Answer
FROM watch_etw(guid="{1C95126E-7EEA-49A9-A3FE-A378B03DDB4D}")
WHERE System.ID = 3020
reports:
- type: MONITORING_DAILY
template: |
{{ Query "SELECT *, count() AS Count FROM source() \
GROUP BY Query \
ORDER BY Count DESC" | Table }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment