ADCS ESC11 coverage
Description
Coverage of the ADCS ESC11 attack paths.
ESC11 attacks exploit misconfigured Enterprise Certificate Authorities that allow inbound relay attacks and impersonation of any domain principal.
This PR implements:
- The new EnterpriseCA property: RPCEncryptionEnforced
- A post-processed edge named CoerceAndRelayNTLMToADCSRPC similar to CoerceAndRelayNTLMToADCS with the following difference:
- CoerceAndRelayNTLMToADCS: HasVulnerableEndpoint=true
- CoerceAndRelayNTLMToADCSRPC: RPCEncryptionEnforced=false
- A saved cypher query showing Enterprise CAs vulnerable to ESC11 (RPCEncryptionEnforced=false)
- Fix the look of the other CoerceAndRelayNTLM... entity panel texts
Motivation and Context
Resolves BED-6182
Using this dataset: 20250611101235_BloodHound_esc11.zip
Screenshots (optional):
Types of changes
- New feature (non-breaking change which adds functionality)
Checklist:
- [x] I have met the contributing prerequisites
- Assigned myself to this PR
- Added the appropriate labels
- Associated an issue: https://github.com/SpecterOps/BloodHound/issues/672
- Read the Contributing guide: https://github.com/SpecterOps/BloodHound/wiki/Contributing
- [x] I have ensured that related documentation is up-to-date
- Open API docs
- Code comments (GoDocs / JSDocs)
- [x] I have followed proper test practices
- Added/updated tests to cover my changes
- All new and existing tests passed
Summary by CodeRabbit
Summary by CodeRabbit
-
New Features
- Added support for identifying and visualizing a new NTLM relay attack path targeting Active Directory Certificate Services (ADCS) via vulnerable RPC endpoints (ESC11).
- Introduced new relationship type and properties to represent RPC encryption status and relay paths in the interface.
- Enhanced search capabilities and queries to detect ESC11-vulnerable enterprise CAs and related certificate template enrollment rights.
- Added comprehensive help content and abuse walkthroughs for the new attack path, including detection and operational security guidance.
-
Bug Fixes
- None.
-
Documentation
- Expanded in-app help and reference materials to cover the new NTLM relay to ADCS RPC scenario, including detailed steps for both Linux and Windows environments.
-
Tests
- Introduced new integration tests to validate detection and processing of the new NTLM relay to ADCS RPC relationship.
-
Style
- Improved formatting and accessibility of help content with consistent use of UI components for links and code snippets.
Walkthrough
This update introduces support for the new relationship kind CoerceAndRelayNTLMToADCSRPC, representing NTLM relay attacks to ADCS via RPC endpoints. It extends the schema, backend analysis, UI, and integration tests to handle ESC11 attack scenarios, adds new properties for RPC encryption enforcement, and provides comprehensive help and search capabilities for this attack vector.
Changes
| Files / Areas | Change Summary |
|---|---|
cmd/api/src/analysis/ad/ntlm_integration_test.go |
Added integration tests for NTLM relay to ADCS via RPC, verifying relationship creation and composition. |
cmd/api/src/test/integration/harnesses.go, .../harnesses/CoerceAndRelayNTLMToADCSRPC.json |
Introduced a new test harness and corresponding JSON graph definition for NTLM relay to ADCS RPC scenarios. |
packages/cue/bh/ad/ad.cue |
Added new properties (RPCEncryptionEnforced, RPCEncryptionCollected) and relationship kind (CoerceAndRelayNTLMToADCSRPC) to the AD schema. |
packages/go/analysis/ad/ad.go, .../ntlm.go, .../post.go |
Extended analysis logic to support the new relationship kind, including traversal, validation, and post-processing for RPC-based NTLM relay to ADCS. |
packages/go/ein/ad.go, .../incoming_models.go |
Added support for extracting and storing the RPCEncryptionEnforced property from CA registry data. |
packages/go/graphschema/ad/ad.go, .../common/common.go |
Integrated new relationship kind and properties into graph schema enums, property lists, and relationship kind arrays. |
packages/javascript/bh-shared-ui/src/commonSearchesAGI.ts, .../commonSearchesAGT.ts |
Added new queries and updated existing ones to detect ESC11-vulnerable CAs and NTLM relay edges involving the new relationship kind and property. |
packages/javascript/bh-shared-ui/src/components/HelpTexts/CoerceAndRelayNTLMToADCS/LinuxAbuse.tsx, .../WindowsAbuse.tsx |
Refactored help text components for NTLM relay to ADCS (HTTP) to use Material-UI components and improve formatting. |
packages/javascript/bh-shared-ui/src/components/HelpTexts/CoerceAndRelayNTLMToADCSRPC/* |
Added a new suite of help text components for the RPC-based NTLM relay edge, including general info, abuse instructions, opsec, references, composition, and relay target lists. |
packages/javascript/bh-shared-ui/src/components/HelpTexts/index.tsx |
Registered the new CoerceAndRelayNTLMToADCSRPC help text component in the exported components map. |
packages/javascript/bh-shared-ui/src/edgeTypes.tsx |
Added CoerceAndRelayNTLMToADCSRPC to the list of NTLM relay edge types. |
packages/javascript/bh-shared-ui/src/graphSchema.ts |
Extended enums and mappings to include the new relationship kind and properties, updating display functions and arrays accordingly. |
Sequence Diagram(s)
sequenceDiagram
participant User
participant UI
participant API
participant Analysis
participant GraphDB
User->>UI: Initiates search or views edge info for ESC11/NTLM relay to ADCS RPC
UI->>API: Requests edge composition or relay targets for CoerceAndRelayNTLMToADCSRPC
API->>Analysis: Analyzes graph for vulnerable Enterprise CAs (RPCEncryptionEnforced = false)
Analysis->>GraphDB: Queries nodes and relationships with new properties/kind
GraphDB-->>Analysis: Returns matching nodes/edges
Analysis-->>API: Returns composition/targets
API-->>UI: Returns data
UI-->>User: Displays help texts, relay targets, and composition info
Suggested labels
api, user interface
Suggested reviewers
- mvlipka
- superlinkx
Poem
A rabbit hopped through graphs anew,
Finding edges, bright and true—
Now RPC relays join the dance,
ESC11 gets a fighting chance!
With help texts, tests, and schema wide,
This bunny beams with coder pride.
🐇✨
[!NOTE]
⚡️ Unit Test Generation is now available in beta!
Learn more here, or try it out under "Finishing Touches" below.
✨ Finishing Touches
- [ ] 📝 Generate Docstrings
🧪 Generate unit tests
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
- [ ] Commit unit tests in branch
adcsesc11
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
🪧 Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
I pushed a fix in commit <commit_id>, please review it.Explain this complex logic.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai explain this code block.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.@coderabbitai read src/utils.ts and explain its main purpose.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.@coderabbitai help me debug CodeRabbit configuration file.
Support
Need help? Create a ticket on our support page for assistance with any issues or questions.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (Invoked using PR comments)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai generate docstringsto generate docstrings for this PR.@coderabbitai generate sequence diagramto generate a sequence diagram of the changes in this PR.@coderabbitai generate unit teststo generate unit tests for this PR.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
CodeRabbit Configuration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.