Sitemap
PizzSec

PizzSec

HackTheBox — Baby

4 min readOct 17, 2025

Hack The Box Baby is an Easy rate Windows machine

Initial Access

Initial nmap scan show the following open ports

Press enter or click to view image in full size
Press enter or click to view image in full size

Judging by the open ports with the ports like 53 & 88 present we can assume we are up against a Domain Controller.

We need to identify a username/usernames to proceed with AD attack vectors. Let’s enumerate SMB with anonymous login

No luck with smbclient.

Press enter or click to view image in full size

No luck with netexec either.

Rpcclient doesn’t yield anything either.

Smb is not giving us anything. Switched to ldap enumeration with netexec.

Press enter or click to view image in full size

There’s a detailed output with all the users. Down in the bottom we see a password in the description field for user Teresa.Bell

Press enter or click to view image in full size

We can put the users into a list and spray the password to see which users are accessible with it. But first we can get a cleaner list of names that can be copied easily

Press enter or click to view image in full size

Tried password spraying with “BabyStart123!”

Press enter or click to view image in full size

We don’t get any hits but we have Caroline.Robinson user with an expired password. Meaning this user’s password can be changed.

We can use impacket’s changepasswd tool to change this user’s password to a one we choose and gain access.

Press enter or click to view image in full size

Password changed successfully.

Get PizzSec’s stories in your inbox

Join Medium for free to get updates from this writer.

Just for good measure before proceeding further tried Asreproasting and kerberoasting for any other users that can be compromised.

Press enter or click to view image in full size

No luck with Asreproasting

Press enter or click to view image in full size

No luck with Kerberoasting either.

Enumerate SMB with the compromised user.

Press enter or click to view image in full size

There are no shares that are standing out. We can try to gain access via WinRM

Press enter or click to view image in full size

We have access to the user flag

Privesc

With the access gained enumerated user privileges for potential abuse possibilities.

Press enter or click to view image in full size
Press enter or click to view image in full size

We have 2 privileges with viable escalation paths

  1. SeMachineAccountPrivilege
  2. SeBackupPrivilege/SeRestorePrivilege

First path didn’t work with NOPAC so that’s a no go. With SeBackupPrivilege we can copy the SAM, SYSTEM and SECURITY files dump the hashes. However, since we are in a domain controller we need the ntds.dit file. This file cannot be copied since it is being used by the system before making a shadow of the C:\ drive.

First we create “diskshadow.txt” on the local attacker machine with the following content that is going to be given as an argument diskshadow.exe which will create a shadow of the C:\ drive

Then this file is uploaded to a writable directory on the target and diskshadow.exe is run as below

Press enter or click to view image in full size
Press enter or click to view image in full size

We have the drive E:\ which is a shadow of C:\. We can use “robocopy” to copy the ntds.dit and the SYSTEM file which are needed for the hashdump.

Press enter or click to view image in full size
Press enter or click to view image in full size

We now have the ntds.dit file. Time to copy the SYSTEM file.

Press enter or click to view image in full size

Now we can simply download the 2 files and use impacket’s secretsdump to dump the hashes

Press enter or click to view image in full size

We can use administrator hash to login

Press enter or click to view image in full size

--

--