-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Add Exploit Support for ESC9, ESC10 & ESC16 #20189
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?
Conversation
139306f
to
0e8329c
Compare
ee4a98e
to
50fe418
Compare
|
||
If the AD CS server is configured to allow "weak certificate mappings" when a user is requesting a certificate, the | ||
server will check the `userPrincipalName` or the `dNSHostName` of the requesting identity and then issue a certificate | ||
based on that value. Therefore if we can update user2's UPN to Administrator and then request a certificate on |
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.
I'd quote the username here for consistency with others.
based on that value. Therefore if we can update user2's UPN to Administrator and then request a certificate on | |
based on that value. Therefore if we can update user2's UPN to "Administrator" and then request a certificate on |
docs/metasploit-framework.wiki/ad-certificates/Attacking-AD-CS-ESC-Vulnerabilities.md
Outdated
Show resolved
Hide resolved
docs/metasploit-framework.wiki/ad-certificates/Attacking-AD-CS-ESC-Vulnerabilities.md
Show resolved
Hide resolved
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.
The top of this doc has a list of all the ESC flaws that Metasploit supports and a flow chart. ESC9 and ESC10 should be added to that chart and the full list of ESC vulnerabilities with links to their exploit sections.
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 for the detailed review. I believe I've addressed all the comments.
I haven't updated the module output in the scenarios listed in Attacking-AD-CS-ESC-Vulnerabilities.md
just yet - incase the output changes.
docs/metasploit-framework.wiki/ad-certificates/Attacking-AD-CS-ESC-Vulnerabilities.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Spencer McIntyre <[email protected]>
…etasploit-framework into feat/mod/esc9-esc10-exploit
3a5d01f
to
b7b7d7d
Compare
This adds support to exploit ESC9, ESC10 and ESC16
ESC9, ESC10 and ESC16 scenario 1 can all be exploited using the new module
esc_update_ldap_object
. This new module focuses on exploiting ESC techniques that involve connecting to the domain controller via LDAP to update the specific attributes of a user prior to requesting a certificate on their behalf. We chose to keep this LDAP updating functionality separate from the existingicpr_cert
module and so it got it's own moduleAlso new in this PR is a module
ldap_update_attribute
(which surprise gets called byesc_update_ldap_object
). This new module provides 4 actions tocreate
,read
,update
anddelete
LDAP object attributes.ESC16 scenario 2 is pretty much when the CA has globally disabled security protections to allow ESC6 to be exploited again. This does not require LDAP objects to be updated and so can be exploited using the
icpr_cert
module.This also updates the
Attacking-AD-CS-ESC-Vulnerabilities.md
which should be referenced for all verification steps.