Brute
https://www.cyberseclabs.co.uk/labs/info/Brute/

Nmap
On this machine I will initiate a SYN scan and define version checking with default scripts.
SMB
As per usual I like to start with quick null authentication checks against SMB. Unfortunately we have nothing to reveal here.

Kerberos
As port 88 is open we can run Kerbrute against the server to hopefully identify any valid usernames.

As above we have discovered four usernames. We can store these in a test file and perform AS-REP roasting with them which I have covered in a little more detail below:
As we have no web server or SMB access the next best logical step is to check for Kerberoastable accounts.

We notice that from the resulting output that the user 'tess' has not returned an error message. We can cat the output file to confirm if we have a hash.

We can send this straight to John and attempt to crack.

We now have the credentials: tess:Unique1
Initial Foothold
I checked these credentials against SMB and had access to list shares. The shares SYSVOL and NETLOGON had nothing interesting in them. We do have WinRM running so we can use Evil-WinRM and attempt to connect.

Privilege Escalation
I like to check the systeminfo command first when looking for privilege escalation but, in this instance access to the command was denied. I next looked at whoami /all to have a quick overview on account memberships and permissions.

What stands out immediately is that we are a member of the 'DnsAdmins' group. I am aware of a privilege escalation method which can be performed by users that are part of the 'DnsAdmins' group.
A quick google search for this returns a really good medium article on performing this attack.
As per the article we first need to create a malicious DLL file with msfvenom.
The article actually recommends hosting the DLL file on a SMB server form our attacking machine. This did not work for me as the connection back to the file kept getting terminated early.

Instead I opted to upload the file directly with Evil-WinRM just make sure when connecting with Evil-WinRM you define the location of the payload with the -s switch. Once connected to the upload command and then specify the file.

After the upload has completed run the following command.
The command should return back completed. Now start up a netcat listener on your attacking machine and specify the same port as used in msfvenom for the payload.
Next we can query the DNS service on the server to view its status. Then run the following commands:

The netcat shell should get a callback and we should have gained access as SYSTEM.

Last updated