SolarLab
Recon
└─$ tail -1 /etc/hosts
10.10.11.16 solarlab.htbSMB
Most of them are empty documents, except details-file, could be useful..
HTTP (80)
Nothing interesting on site itself, seems like a placeholder for service. feroxbuster didn't find anything and no subdomains was found with ffuf.
HTTP (6791)
When visiting port we are redirected to report subdomain.

After trying credentials from SMB excel document many of them don't work. ``
al;ksdhfewoiuh
KAlexander
dkjafblkjadsfgl
d398sadsknr390
blake.byte
ThisCanB3typedeasily1@
AlexanderK
danenacia9234n
ClaudiaS
dadsfawe9dafkn
Till AlexanderK it said username doesn't exist, but password didn't work neither for AlexanderK nor ClaudiaS. But if we observe names have pattern: {Firstname}{LastnameFirstChar}
Trying this on blake we are able to login: BlakeB:ThisCanB3typedeasily1@

If we generate any report we get:
https://security.snyk.io/vuln/SNYK-PYTHON-REPORTLAB-5664897CVE-2023-33733 PoC
User input is limiting us to 300 characters and with this payload that's nearly impossible. We can use other fields, but what was weird is that server was giving 500 and I wanted to see any output. If we start listener and fire the reverse shell we are able to catch it even if server returns 500. Reverse shell from https://www.revshells.com
C:\Users\blake\Documents\app\reports\instance\users.db:
1
BlakeB
BlakeB
2
ClaudiaS
ClaudiaS
3
AlexanderK
ClaudiaS
4
blakeb
ThisCanB3typedeasily1@
5
claudias
007poiuytrewq
6
alexanderk
HotP!fireguard
User.txt
Privilege Escalation
Running winPeas:
winPeas didn't show the ports running on localhost:
I saw people using Chisel to forward the traffic from box to their machines, more about Tunneling
First of all use ConPtyShell to get a stable shell.
Privilege Escalation (openfire)
I somewhat gave up on ports for some time and tried my luck with runas, winrm failed but that's because the service isn't active. Using runas we can switch users:
The shell wasn't started, but password is confirmed to be true. The reason it failed was because UAC is in place and from shell we can't do anything about it.
Upload RunasCs.exe:
User openfire doesn't have access to our directory so RunasCs fails to execute, but we can use /Users/Public which is accessible to most users.
During my enumeration I saw an openfire directory in Program Files, since username and dir name is same let's check it out.
https://www.cybersecurity-help.cz/vdb/ignite_realtime/openfire/4.7.4/
https://www.cybersecurity-help.cz/vdb/SB2023052418
Not interesting, since we are already on the machine and have access to source
Privilege Escalation (Administrator)
While looking for a way to decrypt the hash I came over Hashcat forum which explained how it works, with code to decrypt it. openfire hash
Had a quick look at what OpenFire does and it is basically true what we said, but it does use SHA1 AND blowfish, basically. What one needs to have to decrypt the encrypted password (yes, they are encrypted not hashed, but there is also a SHA1 hash of the passwordKey field involved) is a passwordKey + the encrypted password. The first 8 bytes (16 chars, 8 hex) of the encrypted password is the initialization vector, the blowfish CBC key is stored in the database as "passwordKey" (<- this is SHA1 hashed before used as key to blowfish CBC).
Script: [[OpenFireDecryptPass.java]]
I messed up big time here, openfire user doesn't have access to blake directory so I had to redowload the file since I was disconnected too. Note to the future: use directory where everyone has fucking access...
Root.txt
Writeups Referenced: https://medium.com/@Null0X0/solarlab-machine-htb-season-5-walkthrough-writeup-0be6c53a467a https://medium.com/@mjd.jellali/hackthebox-solarlab-walkthrough-5c9bd1bdcdb1
Last updated