Hospital
Recon
HTTP (8080)

Creds:
letmein:letmein
When logged in we get an upload form:

We can fuzz the extension to see which one is valid or not.
Wordlist =
/usr/share/seclists/Discovery/Web-Content/web-extensions.txt
To add string matching go to Settings, Grep Match, add string and include headers.

Not sure why, but shell.phar wasn't getting uploaded. Changing the name helped.
Webshell: http://hospital.htb:8080/uploads/letmein.phar

Bruteforce admin password
Creds don't work anywhere we know...
This is a Windows machine, but clearly we are inside Linux container. Linpeas didn't give anything useful, box is somewhat old so we can assume there's kernel exploit of some sort.
CVE-2023-35001: Exploit used at pwn2own Vancouver 2023 on Ubuntu desktop. The exploit supports the kernel version available at the beginning of the event (5.19.0-35).
For whatever reason there's golang install on machine and we can leverage that to use exploit.
Note: CVE-2023-2640-CVE-2023-32629 GameOver(lay) exploit should also be valid for this kernel.
The only valid hash should be drwilliams
HTTPs (443)
There's HTTPs server which is serving RoundCube webmail.

Creds:
drwilliams:qwe123!@#
Using SSH credentials we can log into webmail. New user drbrown.

About shows version Roundcube Webmail 1.6.4: CVE-2023-43770-POC XSS vulnerability. Can't do much with XSS, so probably not useful...
CVE-2023-36664
drbrown is waiting for GhostScript, CVE-2023-36664-Ghostscript-command-injection could be valid exploit considering the dates.
Sending the email directly to drbrown doesn't get triggered, but replying to his message gives back connection.

WinRM
Creds:
drbrown:chr!$br0wn
User.txt
Privilege Escalation
Nothing useful from bloodhound
Enumerate with winpeas
Path 1
We basically have write permissions on XAMPP, usually due to misconfiguration it's not protected and it's also running as NT SYSTEM...

Path 2 (Failed)
Because of UAC policy RunasCs should have worked, but it failed... Interesting.
Path 3
If we RDP we can observe the automated script logging into the webmail, probably to emulate the user.
Creds: Administrator:Th3B3stH0sp1t4l9786!

Path 4
https://www.offsec.com/metasploit-unleashed/keylogging/
When you want to listen for keystrokes either you attach yourself to process or explorer, generally explorer would be better idea.
Root.txt
Last updated