-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Add Updates to LDAP ESC Vulnerable Cert Finder #20658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add Updates to LDAP ESC Vulnerable Cert Finder #20658
Conversation
cdelafuente-r7
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @jheysel-r7 for these updates. I just left a few comments, otherwise, it looks good to me.
dledda-r7
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @jheysel-r7 I've left minor comments that are not a blocker, more question. Also i noticed you may want to rebase the PR because i've seen some merge conflicts
This adds a number of enhancements and fixes to the
ldap_esc_vulenrable_cert_finder. Pro required the keystarget_usersas as well ascan_enrollto be passed along in the@certificate_detailshash to allow for automatic exploitation of ECS9 etc. This also splits the twoESC16variants into two separate techniques (ESC16_1andESC16_2) which makes it easier to auto exploit in Pro.Microsoft recently patched weak certificate binding enforcement so a version check has been added to the cert finder such that it doesn't report false positives when the domain controller has the September 2025 security patch installed.
Lastly when requesting some certificate templates it was noticed that the
ms-app-policieswere no longer being displayed in the output as they used to be, it seems like there might have been a change in the ASN1 certificate definition:Testing
Application Policies / EKUs
Original Behavior :
Prior to this change:
After this change:
Version Check
domain_controller_version_checkgets runESC16_1 and ESC16_2
Details on how to configure each template as well as the can be found domain controller and certificate authority can be found here:
https://github.com/rapid7/metasploit-framework/blob/1c4e3d59eeeb07b3716c5459b34a5ebc98bcd9ca/documentation/modules/auxiliary/gather/ldap_esc_vulnerable_cert_finder.md#setting-up-a-esc16-vulnerable-certificate-template
Module runs as expected