본문으로 건너뛰기
Skillpedia
에이전트35k · #8348

relaying-ntlm-for-adcs-esc8

하는 일

이 도구는 공격자가 도메인 컨트롤러에서 컴퓨터 인증서를 얻도록 합니다. 이 인증서를 이용하면 네트워크 전체를 완전히 장악할 수 있습니다.

사용하는 경우

  • ✓기업 네트워크 침투 테스트를 하는 동안.
  • ✓인증서 공격에 대한 방어가 제대로 작동하는지 확인할 때.
  • ✓실제 공격을 모의하는 교육 훈련을 할 때.

스킬 링크

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/relaying-ntlm-for-adcs-esc8/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

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

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

AI에게 요청하는 예시

“네트워크를 장악하기 위해 도메인 컨트롤러 인증서를 얻는 방법을 알려 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

도구는 도메인 컨트롤러가 공격자가 관리하는 서버에 인증하도록 속입니다. 그 인증을 이용해 도메인 컨트롤러의 인증서를 요청하고, 결국 전체 접근 권한을 얻습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Relaying NTLM for ADCS ESC8

Legal Notice: This skill is for authorized penetration testing, red-team engagements, and educational purposes only. Coercing authentication and relaying credentials against systems you do not own or lack explicit written authorization to test is illegal. Operate strictly within a signed rules-of-engagement; ESC8 coercion can affect production domain controllers.

Overview

ESC8 is one of the Active Directory Certificate Services (AD CS) escalation paths catalogued by SpecterOps in "Certified Pre-Owned." It abuses the AD CS HTTP web-enrollment endpoint (/certsrv/), which by default supports NTLM authentication and, critically, does not enforce HTTPS channel binding or Extended Protection for Authentication (EPA). Because NTLM over HTTP on that endpoint is unprotected, an attacker can coerce a privileged machine account (typically a domain controller) into authenticating to an attacker-controlled host, then relay that NTLM authentication to the CA's web-enrollment page and request a certificate as the coerced machine.

When the relayed victim is a domain controller, the attacker obtains a certificate for the DC's machine account (DC01$). That certificate can then be used for Kerberos PKINIT to request a TGT as the DC, recover the DC's NT hash, and ultimately perform DCSync — a full domain compromise. This maps to MITRE ATT&CK T1557.001 (Adversary-in-the-Middle: LLMNR/NBT-NS Poisoning and SMB Relay), extended here to NTLM relay against an HTTP enrollment service.

The standard toolchain is Impacket's ntlmrelayx.py (the relay engine, with --adcs mode), a coercion tool (PetitPotam, Coercer, printerbug.py/dementor), and Certipy for enumeration and for turning the captured certificate into a TGT / NT hash.

When to Use

  • During an internal AD penetration test where AD CS with the HTTP Web Enrollment role is present and EPA is not enforced.
  • When you have a foothold (even an unauthenticated network position with a coercion vector) and want a path to Domain Admin via certificate impersonation.
  • When validating that the organization has mitigated ESC8 (EPA enabled, HTTP enrollment disabled, RPC/EFSRPC coercion patched).
  • During purple-team exercises to test detection of coercion + relay + anomalous certificate enrollment.

Prerequisites

  • A network position that can reach the CA web-enrollment endpoint and a coercion vector to the target DC.
  • The CA hostname and an enrollable template that yields client-auth EKU (e.g., DomainController, Machine).
  • Tooling (install from official upstreams):
# Impacket (provides ntlmrelayx.py / impacket-ntlmrelayx)
pipx install impacket

# Certipy (AD CS enumeration + abuse)
pipx install certipy-ad

# Coercion tools
git clone https://github.com/topotam/PetitPotam.git
pipx install coercer            # https://github.com/p0dalirius/Coercer
# printerbug.py ships with Impacket examples (MS-RPRN)

Objectives

  • Enumerate AD CS to confirm an ESC8-vulnerable web-enrollment endpoint.
  • Stand up ntlmrelayx in --adcs mode targeting the CA enrollment URL.
  • Coerce a domain controller to authenticate to the relay (PetitPotam/Coercer/printerbug).
  • Capture the base64 certificate issued for the DC machine account.
  • Use Certipy to convert the certificate into a TGT and recover the DC NT hash.
  • Validate domain compromise (DCSync) and document mitigations.

MITRE ATT&CK Mapping

Technique ID Name Tactic Relevance
T1557.001 Adversary-in-the-Middle: LLMNR/NBT-NS Poisoning and SMB Relay Credential Access / Collection The core ESC8 primitive relays coerced NTLM authentication to the AD CS HTTP endpoint.
T1187 Forced Authentication Credential Access PetitPotam/printerbug coerce the DC to authenticate to the attacker.
T1649 Steal or Forge Authentication Certificates Credential Access The attack yields a certificate for the DC machine account used for PKINIT.
T1003.006 OS Credential Dumping: DCSync Credential Access The recovered DC identity enables DCSync for full domain compromise.

Workflow

1. Enumerate AD CS for ESC8

Use Certipy to find enabled, vulnerable templates and confirm a web-enrollment endpoint:

certipy find -u attacker@corp.local -p 'Password123!' -dc-ip 10.0.0.10 -vulnerable -enabled -stdout

…

자주 묻는 질문

이 맥락에서 ‘강제 인증(coercion)’은 무엇인가요?

컴퓨터가 공격자가 관리하는 서버에 연결하도록 속여서, 인증 정보를 보내게 만드는 것을 뜻합니다.

‘릴레이(relay)’란 무엇인가요?

한 컴퓨터에서 받은 인증 정보를 가지고, 마치 그 컴퓨터인 것처럼 다른 서비스에 연결하는 것입니다.

왜 위험한가요?

공격자가 도메인 컨트롤러인 것처럼 행세할 수 있어, 보통 기업 네트워크 전체를 장악하게 되기 때문입니다.

상세 정보

작성자의 원본 설명

Uses Impacket's ntlmrelayx.py with a coercion tool (PetitPotam, Coercer, printerbug) to relay NTLM authentication from a coerced domain controller into the AD CS HTTP web-enrollment endpoint (ESC8), obtaining a DC certificate usable via Certipy for PKINIT/DCSync. Use during internal AD penetration tests or purple-team exercises when AD CS Web Enrollment lacks Extended Protection for Authentication

repo: mukul975/Anthropic-Cybersecurity-Skills

인기도

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

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬