Open
Conversation
Member
|
Thanks for the PR, definitely looks cool! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a LDAP module to check whether the DC and CA show signs of being vulnerable to Certifried (CVE-2022-26923)
It does the following:
The module reports three outcomes:
CA-side hardening present: issued cert includes the SID extensionPossible vulnerable to Certifried, SID-less user cert accepted over SchannelSID-less cert was rejected over SchannelFor machine accounts, the module checks the LDAP object type, prefers the
Machinetemplate and fails if the account has nodNSHostNameWhat this module proves (not 100% guarantee if the vuln is present):
No new third party dependency update is required
Type of change
Insert an "x" inside the brackets for relevant items (do not delete options)
Setup guide for the review
Tested locally with
Python 3.11.2on Debian WSLReviewer requirements:
Module options:
CA: restrict checks to a specific CA namePASSIVE_TEMPLATE: force a specific template for the CA/DC probeTIMEOUT: timeout in seconds for Certipy operationsReview command:
netexec ldap $dc_ip -u $user -p $password -M certifriedValidation performed:
Vulnerable environment (ludus):
Domain user
Usertemplate issued a SID-less certMachine account without a dNSHostName (default when its created using the add-computer module):
MachinetemplateMachine cert probe failed, machine account has no dNSHostNameMachine account with a dNSHostName:
Machinetemplate issued a SID-less certPatched environment (ludus):
Domain user
Usertemplate issued a cert with the SID extension presentMachine account without a dNSHostName (default when its created using the add-computer module):
MachinetemplateMachine cert probe failed, machine account has no dNSHostNameMachine account with a dNSHostName:
Machinetemplate issued a cert with the SID extension presentTryhackme CVE-2022-26923 room (https://tryhackme.com/room/cve202226923)
Domain user
Usertemplate issued a SID-less certlmk if I need to provide my ludus config ranges files :D
Screenshots (if appropriate):
Unpatched
Domain user

Machine accounts

Patched
Domain user

Machine accounts

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)