HTB - Tally

Getting Root
We find some files on share-point which have credentials to the FTP server
From FTP we get a KeePass database file with credentials that allow us to get a zip file from smb and that file has credentials to the SQL server which allows us to get a shell using xp_cmdshell
The user sarah has the
SeImpersonatePrivilegewhich is easily exploitable using therotten potato/juicypotato
Tools Used:
nmap, dirsearch.py, keepass2john, zip2john, impacket-mssqlclient.py, impacket-smbserver, juicypotato
Nmap
Enumeration
HTTP - Port 80
Dirsearch.py
Visiting /_layouts/viewlsts.aspx provides some interesting results.

Found Documents with Cred
The Documents folder had a file with FTP details

FTP details:

Password: UTDRSCH53c"$6hys
Checking under Site Pages, we noticed another file named Finance Team

Looking at the contents of the file, we notice the username ftp_user

FTP - Port 21
We can successfully login using ftp_user and the password we found earlier.
Found KeePass File
Under /Users/Tim we find a keepass file named tim.kdbx
Cracking the KeePass password

Username: Finance
Password: Acc0unting
SMB - Port 445
Checking the credentials using cme works and we also notice that we have read access to the ACCT share.
Found a zipfile
Cracking the zipfile
Unzipping the file orcharddb.zip shows an sql file with some creds.
Found tester.exe
Creds:
sa:GWE3V65#6KFH93@4GWTG2G
Exploitation:
Getting a shell
Copy nc.exe to the box using impacket-smbserver
Privilege Escalation
The user sarah has some privileges that can be abused using JuicyPotato
We copied the JuicyPotato to the target using the same method we used for nc.exe when executed, we didn't get a shell. However after trying different CLSID, we got a shell
CLSID that worked:
UsoSvc {E7299E79-75E5-47BB-A03D-6D319FB7F886} {B91D5831-B1BD-4608-8198-D72E155020F7}
Last updated