펜테스팅 위키
  • 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
  • S4U2Proxy
  • S4U2self
  • References

Was this helpful?

Export as PDF
  1. ETC
  2. CS

S4U

PreviousOAuth 2.0NextSCCM

Last updated 1 month ago

Was this helpful?

S4U는 Service For User으로 2종류의 Kerberos 확장 서비스가 있습니다.

  • S4U2self ( Service for User to self )

  • S4U2Proxy ( Service for User to Proxy )

S4U2Proxy

S4U2Proxy는 사용자의 유효한 ST를 이용하여 다른 ST를 얻는 매커니즘입니다. 사용자의 유효한 ST를 가진 상태라는 점에서 Kerberos 인증을 사용하는 사용자의 상황에서만 사용이 가능하며, 이를 제약된 위임(Constrained Delegation)이라고 합니다.

위 그림에서 Service1에서 유효한 ST를 가지고 TGS_REQ를 전송할 때 TGS는 TGS_REQ로부터 서비스 티켓에 forwardable 플래그가 설정되어 있는지를 확인합니다. 이 플래그가 존재한다면(True), 발급된 토큰이 전달 가능한 토큰임을 나타내며 이는 권한을 위임했음을 의미합니다. 반면 TGS가 확인한 TGS_REQ에서 forwardable 플래그 값이 없다면(False), 발급된 토큰은 전달 가능한 토큰이 아니므로 S4U2Proxy를 사용하지 못합니다.

S4U2self

S4U2Proxy에서 사용자의 유효한 ST를 보유하고 있다면, 사용자를 대신하여 다른 서비스에 접근 가능한 ST를 발급 하는 것이 가능하다고 했습니다. 하지만 이것은 Kerberos 인증을 사용해서 ST 발급이 가능한 사용자 계정에서만 정상적으로 동작하기 때문에 제약된 위임입니다.

반면, NTLM 인증과 같은 Kerberos 외의 인증 방식을 사용하는 경우 사용하는 사용자 계정에서는 ST 발급이 안 되기 때문에 나온 확장이 S4U2self입니다. S4U2self는 서비스가 자신을 위한 ST를 요청할 수 있도록 합니다. 여기서 "서비스"는 자신을 대신하여 티켓을 요청/제공 가능한 위임된 서비스입니다. 하지만 자신을 대행하여 수행하는 객체가 반드시 주체와 다를 필요는 없습니다. 따라서 NTLM 인증을 사용하는 사용자 역시 자신을 대행하여 자신의 ST를 요청할 수 있습니다.

본질적으로 Kerberos 프로토콜의 인증 과정에서 TGS 응답으로부터 오는 서비스 세션 키는 TGT 응답에 있던 유저의 패스워드에서 파생된 키로 암호화되어 전송됩니다. 하지만 S4U2self를 이용하여 ST 발급 요청을 한다면 TGT 과정이 생략되기 때문에 서비스 세션 키는 유저로부터 받은 세션키로 할당됩니다.

S4U2self는 사용자가 Kerberos 인증이 아닌 다른 방식의 인증을 사용하는 상황에서도 ST를 발급 받을 수 있는 제약 없는 위임이기 때문에 Unconstrained Delegation이라고 부릅니다.

References

Attacking Kerberos: Unconstrained Delegation
Attacking Kerberos: Constrained Delegation
https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-sfu/c920c148-8a9c-42e9-b8e9-db5755cd281b
https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-sfu/6a8dfc0c-2d32-478a-929f-5f9b1b18a169
[MS-SFU]: S4U2proxyMicrosoftLearn
Logo
RequestSecurityToken.Forwardable 속성 (System.IdentityModel.Protocols.WSTrust)MicrosoftLearn
Logo
Logo
Logo