1. Resources
  2. Detection rules
  3. DNS Server Plug-In DLL Abuse (DnsAdmins)

DNS Server Plug-In DLL Abuse (DnsAdmins) detection rules

Members of DnsAdmins can make the DNS Server service load a plug-in library of their choice. Where DNS runs on domain controllers, that is code execution on a domain controller. DNS audit event 541 and DNS Server event 150 show it.

Platform
Active Directory
Severity
High
Log source
DNS Server event log, DNS Server audit log (Microsoft-Windows-DNSServer/Audit)
Last updated
Rule formats
Sigmaand queries for: SplunkMicrosoft SentinelIBM QRadar
What an attacker needs
Membership of DnsAdmins, directly or through a nested group, or another account with administrative access to the DNS Server service.
Impact
The attacker's code runs inside the DNS Server service, which on a domain controller leads to full domain compromise and serves as persistence until the setting is cleared.
Response
Clear the plug-in setting on the affected DNS server and restart the DNS Server service, then disable the account that made the change and remove it from DnsAdmins.
Mitigation
Keep DnsAdmins empty or limited to accounts protected like domain administrators, and delegate zone and record management through permissions on the zones instead.
Event IDs
150770541

How the attack works

The Windows DNS Server service can be extended with a server-level plug-in: a library (DLL) whose functions the service calls to resolve names outside the zones it hosts. The path of that library is a server setting, ServerLevelPluginDll, which is changed with the DNS management tools, from the server itself or from another computer. The service loads the configured library into its own process.

Managing a DNS server does not take domain administrator rights. The built-in DnsAdmins group has administrative access to the DNS Server service, and organizations often give it to network teams who do not administer the directory and are not protected like its administrators. In most domains the DNS Server role runs on the domain controllers. A member of DnsAdmins who points the plug-in setting at a library they control therefore gets their own code to run inside a system service of a domain controller. The setting stays in the configuration of the server until someone clears it. Microsoft Defender for Identity reports non-privileged members of DnsAdmins as a security exposure.

Two logs record the attack. The DNS Server audit log (Microsoft-Windows-DNSServer/Audit), which is enabled by default, writes event 541 for every change of a server setting, with the name of the setting and its new value. The DNS Server log writes event 150 when the service could not load or initialize the plug-in library that is configured. Event 150 covers the failed case only, so the setting change is the trace to rely on.

A third rule matches event 770 in the DNS Server log, which a SigmaHQ rule and public copies of the service's event manifest associate with a plug-in library that was loaded. Microsoft does not document event 770, so treat it as a supporting signal next to the setting change.

What an attacker needs

  • Membership of DnsAdmins, direct or through a nested group, or another account with administrative access to the DNS Server service of the target.
  • A server that runs the DNS Server role. On a domain controller the result is control of the domain.
  • A library at a path that the DNS Server service can read.

Impact

The attacker's code runs inside the DNS Server service of the targeted server. On a domain controller that is code execution on the machine that holds every credential of the domain, and it leads to full domain compromise. Because the plug-in setting stays in place until it is cleared, it also serves as persistence. A group that was meant for managing name resolution turns out to be a path to domain administrator.

Detection rules

DNS Server Could Not Load a Plug-In DLL

Detects event 150 in the DNS Server log. The DNS Server service could not load or initialize the plug-in DLL that the event names. On a DNS server that is not supposed to use a plug-in, the event means that someone set the server-level plug-in setting and the library at that path was missing, unreadable or not a working plug-in. A library that loads without error does not produce this event, so use it together with the rule on DNS audit event 541. Microsoft documents the event in its event reference for the DNS Server role of Windows Server 2008 and 2008 R2. Collect the DNS Server log of every DNS server, domain controllers first.

LevelHighStatusExperimentalLog sourceDNS Server event log
title: DNS Server Could Not Load a Plug-In DLL
id: f2aa8f70-e439-43c4-8469-e8e37f0d4cfb
status: experimental
description: >-
  Detects event 150 in the DNS Server log. The DNS Server service could not
  load or initialize the plug-in DLL that the event names. On a DNS server
  that is not supposed to use a plug-in, the event means that someone set the
  server-level plug-in setting and the library at that path was missing,
  unreadable or not a working plug-in. A library that loads without error does
  not produce this event, so use it together with the rule on DNS audit event
  541. Microsoft documents the event in its event reference for the DNS Server
  role of Windows Server 2008 and 2008 R2. Collect the DNS Server log of every
  DNS server, domain controllers first.
references:
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc735829(v=ws.10)
  - https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/dnscmd
  - https://attack.mitre.org/techniques/T1543/003/
author: Forestall
date: 2026-11-15
tags:
  - attack.persistence
  - attack.privilege-escalation
  - attack.t1543.003
logsource:
  product: windows
  service: dns-server
detection:
  selection:
    Provider_Name|contains: DNS-Server-Service
    EventID: 150
  condition: selection
falsepositives:
  - A DNS plug-in that belongs to a product you run and fails to load after an update or after its files were moved. Confirm with the owner of the product, then repair or remove the plug-in.
level: high

False positives

  • A DNS plug-in that belongs to a product you run and fails to load after an update or after its files were moved. Confirm with the owner of the product, then repair or remove the plug-in.

DNS Server Loaded a Plug-In DLL

Detects event 770 in the DNS Server log. Microsoft does not document this event. The SigmaHQ rule this rule derives from matches it together with events 150 and 771, and public copies of the event manifest of the DNS Server service give its text as a statement that a DNS server plug-in DLL has been loaded, with the location of the library and the name of the server. Read that way, it is the successful counterpart of event 150. On a DNS server that is not supposed to use a plug-in it means that a library configured through the server-level plug-in setting now runs inside the DNS Server service. Because the event is undocumented, do not read its absence as proof that no plug-in was loaded, and keep the rule on DNS audit event 541 as the trace of the setting change. Collect the DNS Server log of every DNS server, domain controllers first.

LevelMediumStatusExperimentalLog sourceDNS Server event log
title: DNS Server Loaded a Plug-In DLL
id: 54570a85-d6f8-433e-a19f-cfdc48e0aa61
related:
  - id: cbe51394-cd93-4473-b555-edf0144952d9
    type: derived
status: experimental
description: >-
  Detects event 770 in the DNS Server log. Microsoft does not document this
  event. The SigmaHQ rule this rule derives from matches it together with
  events 150 and 771, and public copies of the event manifest of the DNS
  Server service give its text as a statement that a DNS server plug-in DLL
  has been loaded, with the location of the library and the name of the
  server. Read that way, it is the successful counterpart of event 150. On a
  DNS server that is not supposed to use a plug-in it means that a library
  configured through the server-level plug-in setting now runs inside the DNS
  Server service. Because the event is undocumented, do not read its absence
  as proof that no plug-in was loaded, and keep the rule on DNS audit event
  541 as the trace of the setting change. Collect the DNS Server log of every
  DNS server, domain controllers first.
references:
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/builtin/dns_server/win_dns_server_susp_server_level_plugin_dll.yml
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc735829(v=ws.10)
  - https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/dnscmd
  - https://attack.mitre.org/techniques/T1543/003/
author: Forestall, based on work by Florian Roth (Nextron Systems)
date: 2026-11-16
tags:
  - attack.persistence
  - attack.privilege-escalation
  - attack.t1543.003
logsource:
  product: windows
  service: dns-server
detection:
  selection:
    Provider_Name|contains: DNS-Server-Service
    EventID: 770
  condition: selection
falsepositives:
  - A DNS plug-in that belongs to a product you run. Confirm the library with the owner of the product, then exclude the DNS servers that use it.
level: medium

False positives

  • A DNS plug-in that belongs to a product you run. Confirm the library with the owner of the product, then exclude the DNS servers that use it.

DNS Server Setting Changed

Detects event 541 in the DNS Server audit log. A server-level setting of the DNS Server service was changed, and the event text gives the name of the setting, the scope and the new value. The rule matches every server setting, because the data fields of this event are not mapped for the SIEM conversions yet. Filter the results on the setting name ServerLevelPluginDll (compare without regard to case), which holds the path of the plug-in library the service loads, and treat a change that sets a path as high severity. The audit log is enabled by default, on Windows Server 2016 and later and on Windows Server 2012 R2 with the hotfix Microsoft names.

LevelLowStatusExperimentalLog sourceDNS Server audit log (Microsoft-Windows-DNSServer/Audit)
title: DNS Server Setting Changed
id: 81ad718f-abf4-4d4f-9428-2ce34236b682
status: experimental
description: >-
  Detects event 541 in the DNS Server audit log. A server-level setting of the
  DNS Server service was changed, and the event text gives the name of the
  setting, the scope and the new value. The rule matches every server setting,
  because the data fields of this event are not mapped for the SIEM
  conversions yet. Filter the results on the setting name
  ServerLevelPluginDll (compare without regard to case), which holds the path
  of the plug-in library the service loads, and treat a change that sets a
  path as high severity. The
  audit log is enabled by default, on Windows Server 2016 and later and on
  Windows Server 2012 R2 with the hotfix Microsoft names.
references:
  - https://learn.microsoft.com/en-us/windows-server/networking/dns/dns-logging-and-diagnostics
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/dn800669(v=ws.11)
  - https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/dnscmd
  - https://attack.mitre.org/techniques/T1543/003/
author: Forestall
date: 2026-11-15
tags:
  - attack.persistence
  - attack.privilege-escalation
  - attack.t1543.003
logsource:
  product: windows
  service: dns-server-audit
detection:
  selection:
    Provider_Name|contains: DNSServer
    EventID: 541
  condition: selection
falsepositives:
  - Planned configuration work by DNS administrators. Match each event to a change record. A change of the plug-in setting is not routine work on a DNS server that uses no plug-in.
level: low

False positives

  • Planned configuration work by DNS administrators. Match each event to a change record. A change of the plug-in setting is not routine work on a DNS server that uses no plug-in.

Detection logic

Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.

DNS server setting changed and a restart of the DNS service requested soon after

Detection hypothesisSequence of events

The DNS Server service loads the plug-in library when it starts, so an attacker who sets the plug-in path also needs the service restarted. The setting rule fires on every server setting at a low level, because the name of the setting is only in the text of event 541. A setting change followed on the same server by a request to restart the DNS service, or by a plug-in load event, is the configure-then-load sequence.

  1. From the DNS Server audit log of each domain controller, take event 541, whose text reads The setting %1 on scope %2 has been set to %3, and read the setting name and the new value from the rendered text.
  2. Within 60 minutes, a starting value, look on the same Computer for audit event 548 (a request to restart the DNS server service has been received), or for event 150 or event 770 in the DNS Server log.
  3. Report every such pair, first those whose 541 text names ServerLevelPluginDll or a path to a library.

Events541548150770

LimitsMicrosoft documents the text of event 541 but not its field names, so the setting name has to be read from the rendered message. A restart through a reboot of the server or through the Service Control Manager writes no 548. A planned setting change followed by a planned restart looks the same and needs a change record.

Triage

  • For event 541, read the name of the setting and its new value. A change that sets ServerLevelPluginDll to a path is the signal. A path on a remote share, or in a folder that ordinary users can write to, makes it urgent.
  • Identify who made the change. Look for logons to the DNS server by members of DnsAdmins around the time of the event, and ask the DNS team whether anyone installed a plug-in.
  • For event 150, read the library path in the event. The service failed to load it, but somebody configured it. Find the matching event 541.
  • Check for a restart of the DNS Server service near the change. Audit event 548 records a request to restart the DNS server service.
  • Examine the file at the configured path (who created it, when, and whether a vendor you know signed it).
  • Without a benign explanation, treat the server as compromised. On a domain controller that means a domain compromise.

Response

Once the attack is confirmed:

  1. Clear the plug-in setting on the affected DNS server and restart the DNS Server service, so the library is no longer loaded. Microsoft's reference for event 150 describes how to remove a plug-in from the configuration of the DNS server.
  2. Keep a copy of the library and record its path, hash and timestamps for the investigation, then remove it from the location the service read it from.
  3. Disable the account that made the change, reset its credentials and remove it from DnsAdmins. Review recent changes to the membership of that group.
  4. If the library was loaded on a domain controller, treat the domain as compromised. Rebuild that domain controller instead of cleaning it, reset the krbtgt password twice and reset the credentials of privileged accounts.
  5. Check every other DNS server for a configured plug-in, and review what the affected server did after the change, such as replication requests, new accounts and new services.

Mitigation

  • Keep DnsAdmins empty, or limit it to accounts that are managed and protected like domain administrators. Remove network teams, help desk groups and service accounts from it.
  • Delegate the management of zones and records through permissions on the zones instead of membership of DnsAdmins, so the people who edit records cannot change server settings.
  • Collect the DNS Server audit log and the DNS Server log from every DNS server. Alert on event 541 when it names the plug-in setting, and on event 150.
  • Check the server-level plug-in setting of every DNS server. Unless a product you run installs a DNS plug-in, no path should be configured.
  • Monitor changes to the membership of DnsAdmins in the same way as changes to other privileged groups.

Frequently asked questions

Is DnsAdmins a Tier 0 group?

Treat it as one wherever the DNS Server role runs on domain controllers. Microsoft describes DnsAdmins as a privileged group with administrative access to the DNS Server service, and Microsoft Defender for Identity reports its non-privileged members as a security exposure. A member can change how a service on a domain controller behaves, so the group needs the same protection as the other groups that administer the domain.

Which events show that a DNS server plug-in was configured?

Event 541 in the DNS Server audit log (Microsoft-Windows-DNSServer/Audit) records every change of a server setting, with the name of the setting and the new value. Event 150 in the DNS Server log is written when the service could not load or initialize the configured plug-in library. Microsoft states that the audit log is enabled by default.

Does event 150 mean the attack failed?

It means the DNS Server service could not load or initialize that library at that moment. Someone still configured a plug-in path on the server, and a corrected library or path can follow. Find out who changed the setting, clear it and review the membership of DnsAdmins.

Has Microsoft restricted what members of DnsAdmins can change?

Partly. With the November 2026 cumulative updates, changing the path of the DNS debug log requires membership of the local Administrators group on the DNS server, and members of DnsAdmins who are not local administrators are refused. Microsoft's description of that change does not mention the plug-in setting, so keep treating DnsAdmins as a privileged group and keep monitoring changes of server settings.

References

We respect your privacy

We use cookies to keep this site secure and working properly. With your permission, we also use optional cookies to understand usage and improve the experience. Cookie Policy

You can change your choice at any time.