Enum delegation module#1071
Conversation
|
Thank you for PR! But there is a flag for that which is |
|
Thank you! My bad: I was initially working with 1.2.0 where this feature was not implemented. Woud it make sense to add ACL enumeration searching for WriteAccountRestrictions|GenericAll|GenericWrite|Owns|WriteDacl on a Computer as a part of RBCD enumeration? I have tried to implement it, but it was hard to work with ACLs enumeration, but I could dig more into it. Also another question: would it be useful to add a module to enumerate AD Recycle Bin searching for deleted accounts which can be restored (https://netwrix.com/en/resources/blog/active-directory-object-recovery-recycle-bin/)? |
|
No problem, but this is why we recommend and need to use up-to-date version 😄 |
|
Hi and thanks for the PR from my side as well! However, as @termanix said this is duplicate. I also think ACL enumeration would be a ton of work which is usually covered by BloodHound so I don't really see the reason to also add it to NetExec, at least for now. Gonna close the PR for now. |
Description
This pull request introduces a new LDAP module
enum_delegationthat enumerates Active Directory delegation configurations, including:The module performs LDAP-based enumeration and reports:
userAccountControlmsDS-AllowedToDelegateTomsDS-AllowedToActOnBehalfOfOtherIdentitysecurity descriptorThe module is based on findDelegation.py from Impacket and it introduces some opportunities for the future development such as ACLs enumeration for RBCD and options to choose a Delegation type.
In general, this would be a good addition for Netexec to have all Delegation enumeration in one place.
Note:
The current RBCD implementation only enumerates principals explicitly present in the
msDS-AllowedToActOnBehalfOfOtherIdentityattribute.It does not enumerate ACLs that could allow configuring RBCD indirectly (e.g., via
WriteDacl,GenericWrite, etc.).A BloodHound query is included in the module documentation to help identify principals that could enable RBCD via ACL abuse.
No new external dependencies are introduced.
Type of change
Insert an "x" inside the brackets for relevant items (do not delete options)
Setup guide for the review
Environment used for testing:
Target environment:
msDS-AllowedToActOnBehalfOfOtherIdentityfindDelegation.pyScreenshots (if appropriate):
Checklist:
Insert an "x" inside the brackets for completed and relevant items (do not delete options)
poetry run python -m ruff check . --preview, use--fixto automatically fix what it can)tests/e2e_commands.txtfile if necessary (new modules or features are required to be added to the e2e tests)