In this write-up, we will walk through the digital forensics and incident response (DFIR) steps to solve the Management Wants a Word challenge from TryHackMe's Hacker Holidays.
1. Initial Setup and Reconnaissance
First, we navigate to the challenge directory and inspect the files extracted via KAPE:
cd management-wants-a-word-forensics-hh-day-14
cd KAPE
Identify the suspicious backup file type and inspect its header:
file C/Users/vera/Documents/backup
xxd -l 64 C/Users/vera/Documents/backup
Search for sensitive Google Chrome browser artifacts belonging to the user vera:
find C/Users/vera -type f \( -iname "Login Data" -o -iname "Local State" -o -iname "Web Data" -o -iname "History" \)
2. Extracting Windows Secrets & DPAPI Masterkey
Extract the Windows registry hives to retrieve system security data:
impacket-secretsdump -sam C/Windows/System32/config/SAM -system C/Windows/System32/config/SYSTEM -security C/Windows/System32/config/SECURITY LOCAL
Decrypt the user's DPAPI Masterkey using the account password (minivera):
impacket-dpapi masterkey -file 'C/Users/vera/AppData/Roaming/Microsoft/Protect/S-1-5-21-2529683458-431225740-1723070931-1000/c90719ef-5b98-474e-b934-136d606a702a' -sid 'S-1-5-21-2529683458-431225740-1723070931-1000' -password 'minivera'
Store the resulting masterkey value in a shell variable:
MASTERKEY='5e5715ec9b6df5a86e97902692a66d28e691f05d5bc1e04d0159cfe960e94c978c07e5004a0179d3a96df2468885a28175b0b02cc064445f116a752d2b3e9d40'
3. Decrypting the Chrome AES Key
Locate the Local State file path and extract the encrypted key:
LOCAL_STATE="$(find "$PWD/C/Users/vera" -type f -iname 'Local State' -print -quit)"
echo $LOCAL_STATE
printf '%s\n' "$LOCAL_STATE"
jq -r '.os_crypt.encrypted_key' "$LOCAL_STATE" | base64 -d | xxd
jq -r '.os_crypt.encrypted_key' "$LOCAL_STATE" | base64 -d | tail -c +6 > chrome-key.dpapi
Run a Python script to decrypt the Chrome key using the Masterkey:
python3 - "$MASTERKEY" <<'PY'
import sys
from impacket.dpapi import DPAPI_BLOB
masterkey = bytes.fromhex(sys.argv[1])
with open("chrome-key.dpapi", "rb") as f:
blob = DPAPI_BLOB(f.read())
decrypted = blob.decrypt(masterkey)
if decrypted is None:
raise SystemExit("DPAPI decryption failed")
with open("chrome-aes.key", "wb") as f:
f.write(decrypted)
print(f"Wrote {len(decrypted)} bytes")
print(f"Chrome AES key: {decrypted.hex()}")
PY
..................
wc -c chrome-aes.key
- Extracting Saved Credentials
Find the Login Data SQLite database and run a script to decrypt stored passwords using AES-GCM:
................
LOGIN_DATA="$(find "$PWD/C/Users/vera" -type f -iname 'Login Data' -print -quit)"
printf '%s\n' "$LOGIN_DATA"
file "$LOGIN_DATA"
python3 - "$LOGIN_DATA" ./chrome-aes.key <<'PY'
import sqlite3
import sys
from pathlib import Path
from cryptography.hazmat.primitives.ciphers.aead import AESGCM
database = Path(sys.argv[1]).resolve()
keyfile = Path(sys.argv[2]).resolve()
if not database.is_file():
raise SystemExit(f"Missing database: {database}")
key = keyfile.read_bytes()
if len(key) != 32:
raise SystemExit(f"Unexpected AES key length: {len(key)}")
db = sqlite3.connect(database.as_uri() + "?mode=ro", uri=True)
for url, username, encrypted in db.execute("""
SELECT origin_url, username_value, password_value
FROM logins
"""):
if not encrypted:
continue
try:
iv = encrypted
payload = encrypted[15:]
aesgcm = AESGCM(key)
decrypted = aesgcm.decrypt(iv, payload, None)
password = decrypted.decode('utf-8')
except Exception as e:
password = f"[Decryption Failed: {e}]"
print(f"URL: {url}")
print(f"Username: {username}")
print(f"Password: {password}")
print("-" * 40)
PY
- Mounting the VeraCrypt Container
Open the VeraCrypt encrypted backup container, create a mount point, and mount it in read-only mode:
sudo cryptsetup tcryptOpen \ --veracrypt \ 'C/Users/vera/Documents/backup' \ vera_backup
password : Wh4t1sV3raD0ing0nTh1sH0st
.........
sudo mkdir -p /mnt/vera
sudo mount -o ro /dev/mapper/vera_backup /mnt/vera
List the container contents and navigate to the financial documents:
ls /mnt/vera
ls /mnt/vera/secret_financial_documents
..................
Open the target invoice PDF file to retrieve the flag:
xdg-open /mnt/vera/secret_financial_documents/important_invoice_byte_lotus.pdf
Flag:
THM{---------_---_AL0ng?!}
6. Cleanup
Safely unmount the filesystem and close the encrypted device:
..................
cd ~
sudo fuser -km /mnt/vera
sudo umount /mnt/vera
sudo cryptsetup close vera_backup
























Top comments (0)