file where host.os.type == "windows" and process.name : "dns.exe" and event.type in ("creation", "deletion", "change") and
not file.name : "dns.log" and not
(file.extension : ("old", "temp", "bak", "dns", "arpa") and file.path : "C:\\Windows\\System32\\dns\\*") and
/* DNS logs with custom names, header converts to "DNS Server log" */
not ?file.Ext.header_bytes : "444e5320536572766572206c6f67*"
Install detection rules in Elastic Security
Detect Unusual File Modification by dns.exe in the Elastic Security detection engine by installing this rule into your Elastic Stack.
To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(opens in a new tab or window).