10.DNSadmins
Approach to Exploiting DnsAdmins
1. Generate a Malicious DLL
2. Host DLL on an HTTP Server
3. Transfer DLL to Target Machine
4. Verify Membership in DnsAdmins Group
5. Load Custom DLL into DNS Server Configuration
6. Check Permissions on DNS Service
Retrieve the Security Identifier (SID) of the user:
Check DNS service permissions:
7. Restart DNS Service to Trigger Payload Execution
8. Verify Exploitation
Check if the user was added to the Domain Admins group (if applicable):
9. Cleanup (if needed)
Check for the malicious DLL entry:
Remove the DLL entry from the registry:
Restart DNS service after cleanup:
10. Alternative Exploit - WPAD Attack
Disable WPAD blocking:
Create a WPAD DNS record pointing to the attacker's IP:
Commands Used:
msfvenom
python3 -m http.server
wget
dnscmd.exe
wmic
sc.exe
net
reg
Set-DnsServerGlobalQueryBlockList
Add-DnsServerResourceRecordA
PowerShell Cmdlets:
Get-ADGroupMember
Using Mimilib.dll
Code: c
Last updated