Thanks, I understand the statements part but here problem is that every host is trying to resolve it's own hostname which is unique for each host so if I use only "localhost", statements are useless in this case. I am trying to find a way to completely disable/exclude sysmon DNSquery logging only in case when host tries to resolve itself.
Sysmon Event ID 22 - Filter localhost DNS queries

Is it possible to somehow exclude / filter out DNS queries so machine doesn't log localhost resolving. In sysmon logs I see majority of DNS events are coming from machine trying to resolve itself (QueryName: "localmachinename"). The following peace of code under the DNS Query Section in sysmon doesn't seems to work:
<DnsQuery onmatch="exclude">
<QueryName condition="is">..localmachine</QueryName>
<QueryName condition="is">localhost</QueryName>
Any ideas how this can be solved?
Thanks,
Ivica
1 additional answer
Sort by: Most helpful
-
dstaulcu 351 Reputation points
2021-02-18T02:45:04.497+00:00 With current version of Sysmon, the following filter statements are supported:
- is (default)
- is not
- contains
- contains any
- is any
- contains all
- excludes
- excludes any
- excludes all
- begin with
- end with
- less than
- more than
- image
Try incorporating use of "end with" or "contains" instead of "is"