Attacking Active Directory & NTDS.dit

June 06, 2024

I just used the msfconsole because using crackmapexec is taking way too long bruteforcing smb

msfconsole -q 
search smb_login
use 0
options
set rhost 
set user_file /home/kyou/academy-htb/password-attakcs/attacking-ntds/john.txt
set pass_file /usr/share/wordlists/fasttrack.txt
run

THE OTHER WAY TO GET THE NTDS.dit

Log in to the user via wsman protocol or winrm or windows remote management using evil-winrm

First we have to look for the current local group membership that our user have

Then check for the privilege of our user including domain

Creating a drive where the AD is initially installed using vssadmin

Now we are going to use cmd to copy the ntds.dit from shadow copy

First we have to make a directory named NTDS

In our attacker machine we have to create a smb server that will receive the ntds file

Now just move the ntds file from windows to our attacker machine

Now we can view the NTDS.dit file in our attacker machine

Last updated