DS
Debojit SinghAuthorized lab notes & technical writing

Lab walkthrough

TryHackMe RazorBlack Walkthrough: From NFS to Active Directory

A practical RazorBlack Active Directory walkthrough covering enumeration, AS-REP roasting, Kerberoasting, Backup Operators, NTDS extraction, credential reuse and DPAPI.

TryHackMeRazorBlackActive DirectoryKerberosWindowsDPAPIRed Team
TryHackMe RazorBlack Walkthrough: From NFS to Active Directory cover image

Scope and evidence

RazorBlack required careful interpretation of service responses, account context and file formats. This public walkthrough examines separate investigation checkpoints rather than reproducing the protected route between accounts. Original terminal images are redacted in their pixels. Commands with placeholders are reusable demonstrations; they are not asserted to be the exact commands visible in every capture. The full solution, sensitive mappings and unredacted evidence remain private.

Prerequisites: basic TCP/IP, domain authentication, Bash and Windows PowerShell. Run examples only in your assigned lab or written assessment scope. Replace <TARGET_IP> with your current assigned address.

Reading the exposed protocol surface

I started with network enumeration rather than guessing at an exploit. The host exposed a familiar AD collection: DNS (53), Kerberos (88), LDAP (389 / 636), SMB (445) and WinRM (5985). It also exposed RPC (111) and NFS (2049). Those last two ports mattered because they suggested a file-sharing surface outside the usual Windows SMB workflow.

export TARGET_IP='<TARGET_IP>'
nmap -Pn -sC -sV -p- "$TARGET_IP"
showmount -e "$TARGET_IP"

What I was looking for: a domain name, DC hostname, file services, and a reason to investigate one interface before another. Seeing both Kerberos and LDAP is strong evidence of a Windows domain environment, but it does not establish any exploitable weakness by itself.

Original Nmap output showing exposed DNS, Kerberos, LDAP, SMB, NFS and WinRM services

Original service inventory. NFS and Windows domain protocols coexist; the capture does not show the later script scan finishing.

The original capture shows an initial service inventory and the start of another Nmap invocation. It is evidence of exposed services, not proof that the displayed -sC invocation completed. Port 111 is rpcbind; the Windows RPC endpoint mapper is a separate service on 135. NFS deserves examination alongside SMB, while an open WinRM port alone says nothing about a particular account’s logon rights.

Next investigation: Having identified the services, establish which export or share is actually readable, under which identity, and whether access is read-only. A listener identifies an interface to test; a successful file operation establishes a capability.

Reading the command: -p- selects all 65,535 TCP ports; it does not scan UDP. -sV probes discovered services rather than relying only on conventional port names. -sC runs the default NSE script set, not every vulnerability check. -Pn skips host discovery and attempts the scan even when discovery probes receive no reply; it does not repair a missing VPN route. The original initial capture is a limited TCP inventory, so the reusable full-port command above must not be mistaken for a captured completed full-port result.

Before troubleshooting a service: verify the assigned instance is running and the lab route reaches its current address. A timeout, a filtered port and a connection refusal are different observations. Keep the scan timestamp and command with the output. A banner is a lead to validate, not proof of an exploitable version.

File access and authenticated SMB boundaries

I mounted the advertised export read-only and listed its contents:

sudo mkdir -p /mnt/razor-nfs
sudo mount -t nfs -o ro,vers=3,nolock \
  "$TARGET_IP:/<EXPORTED_DIRECTORY>" /mnt/razor-nfs
find /mnt/razor-nfs -maxdepth 2 -type f -printf '%p\n'
file /mnt/razor-nfs/*

The original SMB capture shows an authenticated smbclient session and a directory listing. It does not show an NFS mount, and I do not use it as proof of one. The distinction matters: export discovery, filesystem access and an authenticated share session answer different questions.

Original authenticated SMB directory listing with account and target redacted

Original authenticated SMB listing. This is SYSVOL access, not proof of an NFS mount or remote-shell authorization.

The readable SYSVOL root is a service-specific access result. It does not imply access to arbitrary shares, protected user files or an interactive WinRM shell. In my investigation a credential accepted by LDAP and SMB was denied interactive WinRM access. That failure narrowed the authorization boundary instead of invalidating the successful authentication.

A repeatable protocol check uses an interactive secret prompt rather than embedding a password in shell history:

smbclient "//$TARGET_IP/SYSVOL" -U '<DOMAIN>/<USER>'
# At the SMB prompt:
# ls

Next investigation: Record the identity and protocol for every successful authentication, then compare directory attributes with service-specific access. Do not infer remote-shell authorization from a share listing.

NFS prerequisites and result checks: the Linux client needs NFS utilities, a reachable export service and a valid advertised export path. Replace the export placeholder with the path returned by discovery. showmount -e asks the mount service for exports; an advertised export alone does not prove that your client can mount it or read every file. NFSv4-only servers may behave differently from this NFSv3 example.

In the mount options, ro requests a read-only client mount, vers=3 selects NFSv3, and nolock avoids the separate locking protocol for this read-only inspection. These options do not bypass server permissions. The find command limits traversal to two levels; a file deeper in the tree will be missed. file identifies likely formats, but neither a filename nor a format label establishes the contents or trustworthiness of a document. My private notes record spreadsheet-based identity leads; the public SMB image is evidence of a separate protocol operation.

When access fails: a mount timeout suggests routing or service reachability; an export rejection suggests the advertised path, client restrictions or NFS version; a successful mount followed by permission denied concerns file permissions or identity mapping. An SMB authentication failure concerns a different protocol. Preserve the exact error rather than trying the same secret repeatedly. Readable directory metadata can suggest candidate identities for later validation without establishing their passwords or logon rights.

LDAP results are identity data, not a privilege claim

The LDAP capture records a successful authenticated users query with account properties and password-set timestamps. The password originally appeared in both the command and success line; both occurrences are removed. User identities and target details are also masked.

Original authenticated LDAP user enumeration with sensitive identities and credentials redacted

Original LDAP users query. Credentials and identities are masked; readable attributes do not establish administrator rights.

The visible table layout separates usernames, password-set dates and counters. A date is an attribute, not proof of a weak password. A group membership discovered elsewhere predicts capabilities to test; it is not proof of the effective token in a session. LDAP authentication does not grant a WinRM session by itself. Investigate the service policy and logon rights before repeating failed credentials.

Next investigation: Validate candidate identities independently of passwords. Keep directory observations separate from the authentication behavior tested below; this public ordering is explanatory and does not disclose the account transitions used to solve the room.

How to interpret directory results: distinguish a successful authenticated bind from the entries returned by a search. The search base, filter, requested attributes, paging and access controls determine what is visible. A small result set is not a reliable total-domain count unless those boundaries are known. Account timestamps and descriptions are context, not findings of password weakness. Direct group membership also does not show all nested membership, deny rights or the effective token of a new logon.

Troubleshooting: a successful TCP connection to LDAP is not a successful bind. Separate incorrect credentials from signing or TLS requirements, a wrong directory search base and an empty successful search. Avoid weakening server policy to make an enumeration tool work. The useful next question is whether a verified identity is authorized for the particular service you intend to use, not whether LDAP printed its name.

Kerberos principal validation

kerbrute userenum --dc "$TARGET_IP" \
  -d '<DOMAIN.FQDN>' candidate-users.txt

The key distinction: a valid principal is not the same thing as a valid password. This stage established that some candidate identities existed. It did not establish that I could log in as them.

Original Kerbrute enumeration showing valid principal responses with identities redacted

Original principal validation responses. Identifiers and list path are masked; valid principal is not a valid password.

The green responses establish valid-principal responses to the enumeration tool. They are not evidence of a password login. Domain, account names and the supplied list path are deliberately removed; no public candidate list is provided. KDC reachability, domain spelling, DNS and time synchronization are separate troubleshooting checks. A timeout should not be labeled an invalid username without an actual protocol response.

Using placeholders: replace the quoted domain placeholder and supply your own authorized candidate file before running the command. The quotes prevent angle brackets from being interpreted as shell redirection; they are not part of the domain. Record a positive KDC response separately from an unresponsive server. Kerberos authentication can also fail because the client clock and KDC clock differ or the realm and hostname do not resolve correctly. A valid-principal response establishes identity existence only; it provides neither a ticket-decryption key nor authorization to another service.

Distinguishing AS-REP and service-ticket analysis

An AS-REP test concerns an account configured without required pre-authentication. Kerberoasting concerns service-ticket material for an SPN-bearing identity. Confusing the two leads to incorrect prerequisites and incorrect remediation.

The presence of an SPN matters because Kerberos service tickets contain material encrypted using a key associated with the service account. In configurations with weak passwords, a ticket can support an offline guessing attack.

impacket-GetUserSPNs '<DOMAIN.FQDN>/<AUTHENTICATED_USER>' \
  -dc-ip "$TARGET_IP" -request -outputfile service-tickets.hashes

Original John the Ripper Kerberos TGS analysis with ticket material and recovered password redacted

Original Kerberos TGS offline analysis. This is krb5tgs processing, not ZIP cracking; ticket material and recovered password are masked.

The screenshot shows John loading krb5tgs material as Kerberos 5 TGS type 23 and completing an offline session. Its source filename said ZIP cracking, but the visible format is Kerberos TGS, not a ZIP hash. The ticket line, account context and recovered plaintext are masked. The capture does not show the ticket request, and it does not prove every SPN account is weak. Prefer strong managed service credentials and review unnecessary SPNs; enabling pre-authentication addresses a different exposure.

Next investigation: If an authorized credential provides a Windows session, inspect its effective token before testing privileged operations. Credential recovery, service logon permission and backup capability are separate results to validate.

Prerequisites and interpretation: the AS-REP exposure depends on pre-authentication being disabled for the account; the service-ticket technique usually begins with an authenticated domain identity and a usable SPN. Neither exposure guarantees a recoverable password. Offline guessing depends on the ticket encryption type and password strength. Requiring pre-authentication fixes the first configuration issue; it does not prevent ordinary authenticated requests for service tickets.

The retained GetUserSPNs example requests service tickets and writes ticket material to a local file. It needs the correct domain, reachable KDC and valid authentication; secret input should remain at the tool prompt. Protect its output as credential material. A tool listing an SPN without a successful ticket request is not an offline-recovery result. Likewise, John reporting a format or loading a record is distinct from reporting a recovered value. A format mismatch, empty input, already-processed record or exhausted wordlist must not be described as a successful recovery. The original image supports the narrower TGS analysis claim made in its caption.

Backup semantics and permission failures

In a Windows session, examine the token before assuming that a directory role grants administrative power:

whoami /groups
whoami /priv

The session showed SeBackupPrivilege and SeRestorePrivilege enabled. Those privileges support backup and restore operations that can bypass ordinary ACL checks when the program invokes the relevant backup semantics. They do not automatically turn an account into NT AUTHORITY\SYSTEM or make every administrative command succeed.

This distinction explained some otherwise confusing errors. Ordinary registry reads, icacls, and CIM volume queries produced access-denied results even though the account held backup privileges. In the lab, a backup-aware file-copy operation could access files that a normal read could not.

I also tested whether an existing Volume Shadow Copy was available. DiskShadow started but could not be driven interactively through Evil-WinRM. Running it from a script fixed the console issue; the query reported no existing shadow copies. An attempted snapshot workflow was not the path that finished the challenge.

What I learned from that detour: Always record how an access check was performed. “Access denied from this tool” and “the account cannot perform a backup operation” are not equivalent claims.

These observations are supported by my session notes, not by a screenshot labeled winrm-privileges.png: that image actually shows string inspection of Registry.pol. I do not present it as whoami evidence.

Next investigation: When a normal read fails, determine whether the obstacle is an ACL, a missing privilege, backup semantics or the shell itself. If authorized backup material is already available, analyze its provenance and age before assuming that it represents the live directory.

Privilege presence, state and use: whoami /groups describes groups in the current logon token; whoami /priv lists privilege assignments and their enabled state. An enabled privilege does not prove an arbitrary command used it. SeBackupPrivilege concerns backup reads; SeRestorePrivilege concerns restore writes and related ownership operations. ACL queries, registry operations and backup-aware file opens can therefore behave differently under the same login.

My notes record Robocopy /B for backup-mode copying and /R:0 /W:0 to avoid prolonged retries. Protected paths and mappings remain private. Backup mode changes access semantics; it does not decrypt DPAPI or EFS content, resolve every sharing violation, or guarantee a consistent copy of an in-use database.

Snapshot evidence limit: the scripted query found no existing shadows. A later attempt showed syntax help rather than creating a snapshot. There is no verified successful live NTDS snapshot in this session. Scripted execution addressed console input only.

Reproducing the permission-versus-operation distinction

Use a disposable folder you control to learn how the copy tool reports outcomes before touching protected lab artifacts. This demonstration validates the tool invocation only; it does not prove bypass of an ACL or possession of a backup privilege.

$demoRoot = Join-Path $env:TEMP 'backup-copy-demo'
$src = Join-Path $demoRoot 'source'
$dst = Join-Path $demoRoot 'destination'
New-Item -ItemType Directory -Force $src, $dst | Out-Null
Set-Content -LiteralPath (Join-Path $src 'example.txt') -Value 'owned test data'
robocopy $src $dst example.txt /R:0 /W:0
$copyExit = $LASTEXITCODE
Get-Content -LiteralPath (Join-Path $dst 'example.txt')
$copyExit

Robocopy uses a status bitmask: a nonzero exit is not automatically failure; codes 8 and above indicate at least one copy failure. Compare the summary and destination contents. An ordinary successful copy of your own file proves neither backup-mode access nor administrative execution. In an authorized privileged session, distinguish a copy performed with backup semantics from this ordinary read/write test and record the effective token separately.

Reading the demonstration: source directory, destination directory and filename are separate Robocopy arguments. /R:0 disables retries after failure; /W:0 sets no retry wait. Capture $LASTEXITCODE immediately because a later external command can replace it. A rerun may copy nothing when the destination matches; this alone is not failure. The example uses ordinary copy mode and controlled data, so it cannot demonstrate protected-file access.

My notes also record a long-filename problem. Extended Windows path handling addressed path resolution, not permissions. Treat path-too-long errors, access-denied errors and incomplete transfers as different problems. Validate a downloaded artifact is complete before interpreting extraction failures as encryption failures.

Historical database analysis and its limits

For a separate offline-analysis checkpoint, my notes describe an extracted ntds.dit and matching SYSTEM registry hive. This is the type of material that can contain historical Windows domain credential records.

# Example offline-analysis syntax; filenames refer to files already
# extracted from an authorized lab backup.
impacket-secretsdump \
  -system ./system.hive \
  -ntds ./ntds.dit LOCAL > extracted-hashes.txt

wc -l extracted-hashes.txt

The private notes report roughly 1,866 archived account-hash records, while the live LDAP query returned only a handful of domain users. Treat that as a recorded observation, not a count independently established by the screenshot. Searching the hash text for several known live usernames returned no match.

At first, that looked like a failure: was the wrong database extracted? A better interpretation was that the archive represented a different account population or point in time. Historical credential records can still matter, even when the target name is absent.

I would not publish the recovered hashes or the exact account-to-hash mapping. The technical insight is more useful: the NT hash is derived from the password, not salted with the username. Two Windows accounts using the same password can therefore have the same NT hash. That makes password reuse across identities an issue even when the old account name disappears.

An archived NTDS database is not automatically a map of the current directory. Distinguish “the account exists in this dump” from “some recovered credential material may still be valid elsewhere.”

The file labeled impacket-secretsdump.png shows NetExec workspace initialization, not a secretsdump result. It is excluded rather than used to support the extraction claim. The command above is explanatory syntax; the underlying credential dump stays private.

Next investigation: File access and credential reuse do not automatically establish decryption capability. Identify the artifact format and the Windows user/computer context that protects it before attempting a permitted import.

Offline-analysis prerequisites: the retained command assumes an authorized, intact directory-database backup and its corresponding SYSTEM hive. -ntds selects the database, -system supplies hive material needed for key derivation, and LOCAL selects local-file processing. This is not a live DCSync request and establishes no replication privileges. Missing or mismatched files and truncated artifacts can prevent extraction. Preserve original evidence and work on a controlled copy.

Count records, not terminal lines: wc -l counts lines, potentially including banners, warnings and other key types. It does not establish a unique-account count. A traditional hash row has an account label, RID, LM field and NT field. Selecting an LM placeholder instead of the NT field invalidates subsequent analysis. Account history and multiple key types can also inflate counts.

Reuse requires validation: an absent live username does not rule out a reused password, but it does not identify a matching live account either. The service must accept the authentication method, the account must be enabled, the credential still valid and the service access authorized. Possessing an NT hash is not recovering plaintext. My private notes record a later validation but lack the complete candidate-selection procedure, so no automatic mapping or complete discovery transcript is claimed.

DPAPI and the execution context

A different obstacle appeared with a PowerShell CLIXML credential file. The XML structure was readable, but its secret was not plaintext. Importing it under an unrelated Windows identity failed with a cryptographic-context error:

Key not valid for use in specified state

That was expected behavior for a Windows PowerShell credential serialized using DPAPI. Under normal circumstances, Export-Clixml protects the credential for the originating user on the originating computer. Copying the XML to another account does not automatically make the protected password readable.

The appropriate way to understand the behavior is to reproduce it with a disposable credential you own:

$demo = Get-Credential
$demo | Export-Clixml "$env:TEMP\demo-credential.xml"
$restored = Import-Clixml "$env:TEMP\demo-credential.xml"
$restored.UserName

Now consider why importing the same file under a different security principal is not the same operation. This is not a flaw in the XML parser. It is the protection boundary imposed by the DPAPI context.

Original PowerShell crop identifying a PSCredential object

The small original crop establishes the PSCredential object type only. It is not proof of decrypting another user’s secret. The original full capture contains a room flag and remains private.

Interpreting the original result: my notes distinguish an import failure under one identity from a successful import in the originating user context on the same target. Copying the file did not defeat DPAPI. Successful import depended on protection material available in that session. A matching username on another machine is not equivalent, and a remote login does not guarantee that every DPAPI artifact becomes decryptable.

What the example proves: the disposable credential example exercises serialization and import under your current Windows account. Printing UserName inspects a non-secret property; it does not demonstrate displaying the password. Run it on Windows to study Windows DPAPI behavior. On Linux and macOS, Export-Clixml does not provide equivalent Windows credential encryption.

Troubleshoot by layer: distinguish a missing file, malformed XML, unexpected object type and a cryptographic protection error. Verify file integrity and object type before treating the document as a credential. An XML extension or hex-looking value does not establish encryption. The Administrator proof artifact and user-scoped DPAPI document in my notes used different representations; a decoder for one cannot be assumed to work on the other. Protected values and artifact-specific recovery instructions stay private.

Troubleshooting lessons from the investigation

Some of the most useful details from my attempt were failures:

  • SMB authenticated; WinRM denied. Authentication was valid, but remote interactive access wasn't granted to that account.
  • A protected file rejected normal access. Backup privileges were present, but the tool did not exercise backup semantics.
  • The archived database lacked the live username. The dump was not necessarily useless; identity and password reuse are separate questions.
  • CLIXML decryption failed under the wrong identity. Possession of encrypted data did not equal possession of the DPAPI protection context.
  • DiskShadow's interactive prompt failed inside WinRM. The remote shell's I/O model matters; scripted execution and interactive execution are not equivalent.
  • The target IP changed after a room restart. Hardcoding a temporary address makes a walkthrough age badly. Use a TARGET_IP variable instead.

None of those errors required guessing random exploits. They called for a more precise understanding of the current identity, the protocol, or the data's origin.

Defensive takeaways

The lab illustrates how several individually manageable issues can combine. Defenders should prioritize preventing the transitions between boundaries:

  1. Restrict NFS exports and SMB shares; remove unnecessary employee and account metadata from broadly readable locations.
  2. Require Kerberos pre-authentication; use strong, unique passwords and managed service identities for SPN-bearing accounts.
  3. Review Remote Management Users and Backup Operators carefully. Audit effective token privileges and backup operations, not merely directory membership.
  4. Keep historical AD backups encrypted, access-controlled and retention-limited. Password resets and account lifecycle changes matter because archived hashes persist.
  5. Use unique passwords across accounts and monitor unexpected NTLM authentication paths.
  6. Treat DPAPI-protected credential files as sensitive. The encryption boundary is meaningful, but compromised user contexts can change the threat model.

Outcome boundary: Recovering and submitting the Administrator/root objective demonstrates access to the challenge’s protected proof artifact. It does not by itself demonstrate an interactive NT AUTHORITY\SYSTEM shell, Domain Admins membership, or an interactive Domain Administrator session. Those stronger claims would require separate token or session evidence and are not asserted here.

Root Access Objective and Room Completion

The final stage of my RazorBlack assessment involved examining Windows authorization boundaries, protected administrative artifacts, and the implications of backup-related privileges.

I successfully recovered and submitted the lab's Administrator/root objective. The associated proof value and complete room-specific solution are intentionally withheld from this public article.

Room status: Completed on 16 November 2026.

View my completed TryHackMe RazorBlack room

Technical references

These explain tool behavior and are not additional evidence of actions completed in my lab.

Conclusion

The useful result of these checkpoints is a precise account of what each response establishes: an exposed service, a valid principal, authenticated file access, a token capability, historical credential data or a DPAPI context. None should stand in for another. The protected account transitions and final solution are intentionally absent.

More offensive security walkthroughs, Red Team insights and practical labs: follow @cyberdebojit.