Skip to content

feat: improve ADCS and share enumeration logic and enhance certipy parser deduplication#278

Merged
l50 merged 4 commits into
feat/more-attack-covfrom
feat/dreadgoad-adcs-coverage
May 12, 2026
Merged

feat: improve ADCS and share enumeration logic and enhance certipy parser deduplication#278
l50 merged 4 commits into
feat/more-attack-covfrom
feat/dreadgoad-adcs-coverage

Conversation

@l50
Copy link
Copy Markdown
Contributor

@l50 l50 commented May 12, 2026

Key Changes:

  • Improved ADCS work collection to include LDAP-open DCs without CertEnroll shares, increasing coverage for certipy_find enumeration
  • Enhanced per-host credential selection in SMB share enumeration to prefer domain-matching credentials, unblocking cross-forest CA discovery
  • Updated certipy parser to generate unique vuln_ids per vulnerable template, preventing deduplication of distinct templates on the same CA
  • Added comprehensive unit tests for new logic in ADCS work collection, share enumeration, and certipy parser

Added:

  • LDAP service detection logic in ADCS automation to recognize DCs as valid certipy_find targets even without discovered CertEnroll shares
  • Unit tests covering LDAP fallback in ADCS work collection, per-host credential selection in share enumeration, and template slugification in the certipy parser
  • slugify_template function in the certipy parser to normalize template names for vuln_id generation

Changed:

  • ADCS work collection logic now sources candidate hosts from both confirmed CertEnroll shares and LDAP-open DCs, avoiding silent omission of cross-forest CAs when SMB share enumeration fails
  • Share enumeration logic now pairs each host with a credential matching its AD domain when available, falling back to a global credential only when needed
  • Certipy parser now includes the normalized template name in the vuln_id for each finding, ensuring multiple vulnerable templates of the same ESC type on a single CA are tracked separately

Removed:

  • Previous deduplication approach in certipy parser that could collapse distinct vulnerable templates of the same ESC type on the same CA into a single entry

l50 added 3 commits May 12, 2026 14:37
**Added:**

- Introduced `host_domain_from_fqdn` helper to extract AD domain from host FQDNs
- Added unit tests for `host_domain_from_fqdn` covering normal, subdomain, and edge cases

**Changed:**

- Refined credential selection logic to prefer credentials matching each host's AD domain, falling back to a global credential if no match is found
- Built a per-domain credential index, skipping delegation and quarantined accounts to avoid unnecessary authentication attempts
- Updated share enumeration to pair each host IP with the best available credential based on domain matching
- Improved documentation for credential selection and enumeration process in `auto_share_enumeration`
… templates

**Added:**

- Implemented `slugify_template` function to normalize certificate template names for vuln_id uniqueness
- Added tests to ensure vuln_id includes template name and to verify slugification logic

**Changed:**

- Updated vuln_id generation in `parse_certipy_find` to append slugified template name when present, preventing different vulnerable templates of the same ESC type on the same CA from collapsing into one dedup entry
…share is missing

**Added:**

- Added host_has_ldap function to detect LDAP services on hosts
- Enabled ADCS enumeration for LDAP-open hosts without CertEnroll share in collect_adcs_work
- Added unit tests to validate LDAP-fallback logic and prevent duplicate work items

**Changed:**

- Refactored collect_adcs_work to use LDAP service detection and avoid duplicate work items for hosts with both CertEnroll share and LDAP
- Updated filtering and deduplication logic to generalize over both CertEnroll and LDAP-fallback host candidates
- Improved test coverage to ensure correct handling of various host service scenarios
@l50 l50 changed the base branch from main to feat/more-attack-cov May 12, 2026 20:43
@l50 l50 changed the title feat: orchestrate and exploit full AD attack surface across domains and forests feat: improve ADCS and share enumeration logic and enhance certipy parser deduplication May 12, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

❌ Patch coverage is 80.22599% with 35 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.09%. Comparing base (647dfe9) to head (1be20b5).

Files with missing lines Patch % Lines
ares-cli/src/orchestrator/automation/share_enum.rs 42.10% 33 Missing ⚠️
ares-cli/src/orchestrator/automation/adcs.rs 98.76% 1 Missing ⚠️
ares-tools/src/parsers/certipy.rs 97.43% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@                   Coverage Diff                    @@
##           feat/more-attack-cov     #278      +/-   ##
========================================================
+ Coverage                 76.07%   76.09%   +0.02%     
========================================================
  Files                       432      432              
  Lines                    111949   112106     +157     
========================================================
+ Hits                      85169    85311     +142     
- Misses                    26780    26795      +15     
Files with missing lines Coverage Δ
ares-cli/src/orchestrator/automation/adcs.rs 72.42% <98.76%> (+3.55%) ⬆️
ares-tools/src/parsers/certipy.rs 89.03% <97.43%> (+0.94%) ⬆️
ares-cli/src/orchestrator/automation/share_enum.rs 21.42% <42.10%> (+21.42%) ⬆️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

**Changed:**

- Remove unnecessary into_iter() calls when chaining vectors in check_domain_arg to streamline domain collection logic in domain_validator.rs
@l50 l50 merged commit a8c5d50 into feat/more-attack-cov May 12, 2026
@l50 l50 deleted the feat/dreadgoad-adcs-coverage branch May 12, 2026 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant