First, we add the accounting vhost to our machine and log in to http://accounting.heron.vl/ using svc-web-accounting-d. We don’t find any useful information, but discover a potential new user: rhys.george@heron.vl. For our reverse shell, I recommend using the PowerShell #3 Base64 payload from revshells. We modify the web.config file:
Then we create a hoaxshell and paste the base64 output in the arguments:
1
del web.config
1
put web.config
This gives us a shell as svc-web-accounting (set the shell to be on the jumpbox machine and not your attack machine). A good idea is to use Sliver so you can use your tools to connect to the domain controller. Ligolo setup:
As this Linux machine is domain-joined, we can extract krb5.keytab, which contains secrets about the machine account. We use KeyTabExtract to extract those secrets:
1
sudo python3 keytabextract.py /etc/krb5.keytab
After password spraying, we get a hit on julian.pratt:
After retrieving mucjmp.lnk to our local machine and examining it (just run cat mucjmp.lnk and there should be a cleartext string with the autologin credentials), we find credentials for adm_prju: adm_prju@mucjmp -pw <PASS>
Domain Admin Privilege Escalation
From our BloodHound enumeration, we discovered that adm_prju is in the Admins_T1 group, which has WriteAccountRestrictions over the DC. To exploit this, we need a machine account. Fortunately, we have compromised the Linux machine account. Now we can abuse Resource-Based Constrained Delegation (RBCD):
Now we can attempt to dump all secrets through our SOCKS proxy using Impacket’s secretsdump command with our Kerberos ticket. The output may be slow since it has to tunnel through the proxy, so be patient:
1
impacket-secretsdump -k mucdc.heron.vl
We tried using WinRM, but it’s disabled, so we’ll use psexec instead: