Domain Controllers
Basics
Find the NETBIOS Domain Name
nbtscan -v 10.10.8.1-254Should also be in nmap output
3389/tcp open ms-wbt-server syn-ack ttl 125 Microsoft Terminal Services
| rdp-ntlm-info:
| Target_Name: THM-AD
| NetBIOS_Domain_Name: THM-AD
| NetBIOS_Computer_Name: ATTACKTIVEDIREC
| DNS_Domain_Name: spookysec.local
| DNS_Computer_Name: AttacktiveDirectory.spookysec.local
| DNS_Tree_Name: spookysec.local
| Product_Version: 10.0.17763
|_ System_Time: 2021-08-20T18:00:52+00:00
| ssl-cert: Subject: commonName=AttacktiveDirectory.spookysec.local
| Issuer: commonName=AttacktiveDirectory.spookysec.localAdd to
/etc/hosts
Kerbrute
Find valid users
Example Syntax
what a successful tool run looks like where no valid users are found
Impacket
Location:
If we have IPC$ access without authentication we are able to list the domain users as anonymous
Isolate the users with
SidTypeUser
Now, let’s use
GetNPUsers.pyto find users without Kerberos pre-authentication:
Should retrive a hash if the command is sucessful
Crack the hash with
john
SMB Samba authenticated access
Cat out files with
smb
Dump hashes
Use
secretsdump.pywith impacketThis will allow us to retrieve all of the password hashes that this user account (that is synced with the domain controller) has to offer.
Creds used need to be domain admin for this to work

Alt Method
Open
cmd.exeRun
ntdsutilfrom the command prompt, enter these commands
Takes a snapshot of the DC
Will show you the UUID of the newly created snapshot.
ntdsutil is using Volume Shadow Copy for the snapshot creation, but also ensures the database consistency. Use the UUID for the following command:
The output will show the path where the snapshot was mounted. Start another cmd.exe as Administrator and copy NTDS.dit (located in
Windows\NTDS\NTDS.ditby default).Create a copy of the
SYSTEMregistry hive:
Go back to the
cmd.exewindow withntdsutilrunning, andunmount(and optionallydelete) the snapshot and exit:
Using the two saved files (
NTDS.ditandSYSTEMregistry hive) you can use the samesecretsdump.pyscript to extract password hashes offline (doesn’t need to be done on the domain controller):
Secretsdump Local
Exfil the registry hives
Extract hashes from exfiled SECURITY SAM and SYSTEM
Another Cheatsheet
https://gist.github.com/TarlogicSecurity/2f221924fef8c14a1d8e29f3cb5c5c4a
Invoke-ShareFinder
Last updated