
By: FelixTrips
February 6, 2017
Tutorial: Domain Password Auditing

By: FelixTrips
February 6, 2017

Summary:
This tutorial is for password auditing of network credentials within your domain. We will use Kali Linux along with some open source software to validate your password policies. As always make sure you have permission to perform this audit at the least every everyone should check to verify that people using privileged accounts are not using the same password for their privileged account and normal user account. Preparation:1) Access to a domain controller for the domain that we will be auditing2) Kali Linux3) ntdsxtract-master.zip (https://github.com/csababarta/ntdsxtract)4) libesedb-experimental-20160622.tar.gz (https://github.com/libyal/libesedb/releases)5) Install ntdsextract and libesedb using instructions given within the archive.Get your NTDS database off the server:
Log into your Domain controller using and admin level account
Open a command prompt
Type ntdsutil
Your prompt should change to ntdsutil:
Type active instance ntds
Type ifm
Your prompt should change to ifm:
Type create full <location of where you want your backup> (i.e. c:pentest)
Once the backup is complete, type quit.
Now copy the folder with your backup to your Kali Linux system
navigate to the ntds.dit file (i.e. /root/pentest/Active Directory)
run esedbexport -m tables /ntds.dit
run dsusers.py ./ntds.dit.export/datatable.4 ./ntds.dit.export/link_table.7 ./hashdumpwork –syshive ../SYSTEM –passwordhashes –lmoutfile lm-out.txt –ntoutfile nt-out.txt –pwdformat john
dsuser.py is the program we just installed for this to pull the hashes out of the database
./ntds.dit.export/datatable.4 database table for the ntds database number may be different
./ntds.dit.export/link_table.7 same as above number may also be different
these two tables are need to allow the program to match up usernames with their associated hashes
./hashdumpwork just a nice way to keep your directory cleaned up will dump all supported files that will be generated here along with our output files
--lmoutfile lm-out.txt this is our file for any lm passwords normally will be blank for modern domains
--ntoutfile nt-out.txt this is our file for ntlm passwords this is where all the good stuff goes
--pwdformat john this tells our program how we wanted this formatted we will format for john the ripper