펜테스팅 위키
  • 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 Ticket
      • DC Shadow
      • RID Hijacking
    • 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
        • WriteOwner
        • GenericAll
        • GenericWrite
        • WriteSPN
        • AddMembers
        • WriteProperty
        • WriteGPO
        • AddAllowedToAct
        • AllExtendedRights
      • 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 Ticket
      • KrbRelayUp
    • 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
      • Targeted Kerberoast
      • ASRep-Roasting
      • AS Requested Service Tickets
      • Unconstrained Delegation
      • Constrained Delegation
      • Alternate Service Name
      • Resource Based Constrained Delegation
      • DCSync
      • LSASS
      • Shadow Credentials
      • Backup Operators
      • SeEnableDelegationPrivilege
      • Domain Cached Credentials
    • Windows
      • Unattended File
      • DPAPI
      • Hard-coding Credentials
      • SeBackupPrivilege
  • 측면 이동
    • File Transfer
      • SCP
      • ZIP
      • ncat
      • Python
      • PowerShell
      • certutil
      • wget
      • SMB
      • Base64
      • FTP
      • WebDav
      • cURL
    • Pivoting
      • SOCKS
      • Proxyfier
      • Remote Port Forwarding
    • NTLM 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
  • ETC
    • CS
      • Kerberos
      • NTLM
      • PKINIT
      • Integrity
      • Registry
      • Active Directory Trusts
      • Delegation
      • OAuth 2.0
      • S4U
    • Tools
      • Cobalt Strike
      • BloodHound
      • Certipy-ad
      • LDAP Search
      • Hydra
      • Hashcat
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. 민감정보 탈취
  2. Active Directory

Unconstrained Delegation

제약없는 위임에 대해서는 Delegation에서 기술하지만, 권한이 위임된 머신을 장악했을 때, 해당 머신에서 다른 사용자들의 티켓을 추출하여 사용자 가장 활동을 하는 매커니즘에 대해서 간략하게 서술하면 다음과 같습니다.

클라이언트가 웹 서버에 접속했을 때, 해당 클라이언트에 관한 정보를 백엔드 데이터베이스 서버로부터 가져와야 하는 상황을 생각해보겠습니다. 이때 클라이언트의 권한으로 데이터베이스에 접근을 해야하지만, 매번 클라이언트가 직접 데이터베이스에 접근하는 것은 자동화와 능률 측면에서 좋지 않을 수 있습니다. Windows 2000부터 도입된 위임 기능은 이러한 상황을 해결할 수 있습니다.

  1. 웹 서버(자동화를 위해 위임할 머신)에 Unconstrained Delegation 위임

  2. 사용자가 웹 서버에 접근할 때 서비스 티켓과 함께 TGT를 전송

  3. 웹 서버는 사용자의 TGT에서 사본을 생성하여 메모리에 캐시

  4. 이후 웹 서버는 사용자 TGT 사본을 통해 다른 서비스(백엔드 등)를 사용자의 권한으로 이용 가능

제약없는 위임에서 흥미로운 점은 도메인 관리자가 파일 공유나 다른 Kerberos 서비스를 사용하여 이 시스템에 접근했을 때, 관리자의 TGT도 메모리에 저장되기 때문에 Unconstrained Delegation이 설정된 시스템을 탈취하는데 성공한다면 다른 도메인 서비스에 대해 사용자 가장이 가능합니다.

도메인 컨트롤러는 기본적으로 Unconstrained Delegation 목록에 열거됩니다.

# Unconstrained Delegation이 설정된 객체 열거
execute-assembly C:\Tools\ADSearch.exe --search "(&(objectCategory=computer)(userAccountControl:1.2.840.113556.1.4.803:=524288))" --attributes samaccountname,dnshostname
# Unconstrained Delegation이 설정된 객체 열거
Get-ADComputer -Filter {TrustedForDelegation -eq $true -and primarygroupid -eq 515} -Properties trustedfordelegation,serviceprincipalname,description
# Delegation이 설정된 객체 열거
impacket-findDelegation <Domain/USER:PASS@dc-ip>
# Unconstrained Delegation이 설정된 객체 열거
crackmapexec ldap <dc-ip> -u <USER> -p <PASS> --delegation

PreviousAS Requested Service TicketsNextConstrained Delegation

Last updated 2 days ago

Was this helpful?