How to hack Active Directory on a Windows Domain Controller – NTDS.dit
Using the same underlying technique (Volume Shadow Service), there is an in-built command (Windows 2008 and later) that does a backup of the crucial NTDS.dit file, and the SYSTEM file (containing the key required to extract the password hashes), without the need to use VB Script, third-party tools or injecting into running processes.
All you need is a command prompt running with administrator privileges, and the following commands:
ntdsutil: activate instance ntds
ifm: create full c:\pentest
Copy/move the created folder from the target DC to your machine, and you have all necessary files to conduct an offline password audit of the domain.
If you’re running Windows, there is a new tool on the block – named ntds_decode.exe (referenced here – http://insecurety.net/?p=884), which seems to work fine in our lab, without requiring a number of rather convoluted steps to achieve our goal. Unfortunately source code isn’t available at this moment in time, so take normal precautions before running.
The SYSTEM registry hive and Active Directory database are from a domain controller.
These files are obviously locked so you need to backup using the Volume Shadow Copy Service.
The output format is similar to pwdump and only runs on Windows at the moment.
LM and NTLM hashes are extracted from active user accounts only.
ntds_decode mounts the SYSTEM file so Administrator access is required on the computer you run it on.