πDnsAdmins
π― Overview
π§ Attack Mechanism
DNS Plugin Architecture
# Key attack components:
- DNS management performed over RPC
- ServerLevelPluginDll registry key allows custom DLL loading
- Zero verification of DLL path or content
- DNS service restart loads the custom DLL as SYSTEM
- Full path specification required for successful exploitationAttack Flow
π Group Membership Verification
Check DnsAdmins Membership
Alternative Verification
π£ Custom DLL Generation
Method 1: MSFVenom Payload
Method 2: Reverse Shell Payload
Method 3: Custom Mimilib.dll
π DLL Hosting and Delivery
HTTP Server Method
SMB Share Method
π DNS Service Configuration
Test Non-Privileged Access
Load DLL as DnsAdmins Member
Alternative UNC Path
π DNS Service Manipulation
Check Service Permissions
Find User SID
Analyze Service Permissions
Service Restart Sequence
Stop DNS Service
Start DNS Service
Verify Privilege Escalation
π― HTB Academy Lab Solution
Lab Environment
Complete Step-by-Step Walkthrough
1. Connect to Target via RDP
2. Generate Malicious DLL (On Pwnbox/Attack Machine)
3. Start HTTP Server for DLL Delivery
4. Download DLL to Target (PowerShell)
5. Configure DNS Plugin (Command Prompt)
6. Restart DNS Service
7. Verify Privilege Escalation
8. Sign Out and Reconnect
9. Access Administrator Desktop and Retrieve Flag
Key Success Indicators
Alternative Attack Methods
Method A: Direct Administrator Access
Method B: Service Account Technique
π§Ή Cleanup and Restoration
β οΈ Important Considerations
Registry Cleanup
Verify Registry Key
Remove Registry Key
Service Restoration
DNS Functionality Test
π WPAD Attack Alternative
Global Query Block List Manipulation
Disable Global Query Block
Create WPAD Record
Traffic Interception
π Detection Indicators
Registry Monitoring
Service Activity
Network Indicators
π‘οΈ Defense Strategies
Group Membership Hardening
DNS Service Protection
Detection Rules
π DnsAdmins Exploitation Checklist
Prerequisites
DLL Generation
Service Exploitation
Flag Retrieval
Cleanup
π‘ Key Takeaways
Last updated