Enterprise
https://tryhackme.com/room/enterprise
Nmap
Note: Add the following to /etc/hosts.
Starting out we check SMB and find that anonymous login is allowed.
Running crackmapexec
with various parameters we are able to identify users using a RID brute force.
However, we are unable to proceed with any of this information so far. Brute forcing the user accounts proved to be unsuccessful.
Checking the web server running on port 7790 reveals the following below; where we see that Enterprise-THM is moving to Github.
Searching for Enterprise-THM on Google shows the following Github page.
Github: https://github.com/Enterprise-THM
On the right we see a profile for "nik".
We can see under the profile a mgmtScript.ps1 file. Nothing of interest here so far...
However, looking back at the file commit history we see the original file upload which had user credentials stored within the script.
We can take these user credentials and list the SMB shares on the target Domain Controller.
Finding some sensitive documents. I tried to crack these after converting them to a hash format with office2john.py
. I was unable to successfully crack the hashes after some time.
Looking inside the path shown below we find Consolehost_hisory.txt
.
Reading the contents of Consolehost_hisory.txt
we see some credential information.
I was unable to find anywhere where the credentials are usable. As such, I went back to further enumerating with Nik's credentials.
We recevie a TGT hash for the account bitbucket. Using Hashcat we are able to crack this quite quickly aganst the rockyou.txt
wordlist.
With the new set of credentials we are then able to run ldapdomaindump
to dump LDAP
information into HTLM format.
Viewing the Domain Users group we notice in the description field, a password is left in the clear for the user contractor-temp
. Again, we are unable to process in the envionment with these credentials.
Looking furhter into the LDAP information we see the user bitbucket is a member of "Remote Desktop Users".
We can then login over RDP
and grab the user.txt
flag.
After grabbing the flag PowerUp.ps1
is uploaded to the Domain Controller and run with the "Invoke-AllChecks" command.
We see that the service "zerotieroneservice" runs as SYSTEM, and we have the ability to change the service binary as well as manipulate the running state of the service.
The command below is used to abuse this as well as add our current user bitbucket to the Administrators group.
After performing the service abuse we then stop and start the zerotieroneservice.
Checking bitbucket's group memberships we see we are now a member of the Administrators group.
Firstly, we need to logoff from command prompt and sign in again over RDP to referesh our privileges to reflect that of an Administrator.
We are then able to read the root.txt
flag on the Administrators desktop.
Last updated