-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19816 from jheysel-r7/esc_4_detection
Add ESC4 detection to ldap_esc_vulnerable_cert_finder module
- Loading branch information
Showing
2 changed files
with
197 additions
and
4 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
data/auxiliary/admin/ldap/ad_cs_cert_template/esc4_template.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
# Creates a template that will be vulnerable to ESC4 (certificate has weak edit permissions). | ||
# Fields are based on the SubCA template. For field descriptions, | ||
# see: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-crtd/b2df0c1c-8657-4684-bb5f-4f6b89c8d434 | ||
showInAdvancedViewOnly: 'TRUE' | ||
# this security descriptor grants all permissions to all authenticated users (this is what makes the template vulnerable to ESC4) | ||
nTSecurityDescriptor: D:PAI(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;AU) | ||
flags: 0 | ||
pKIDefaultKeySpec: 2 | ||
pKIKeyUsage: !binary |- | ||
hgA= | ||
pKIMaxIssuingDepth: 0 | ||
pKICriticalExtensions: | ||
- 2.5.29.19 | ||
- 2.5.29.15 | ||
pKIExtendedKeyUsage: | ||
# Server Authentication OID (Not necessary although if left blank this template would also be vulnerable to ESC2) | ||
- 1.3.6.1.5.5.7.3.1 | ||
pKIExpirationPeriod: !binary |- | ||
AEAepOhl+v8= | ||
pKIOverlapPeriod: !binary |- | ||
AICmCv/e//8= | ||
pKIDefaultCSPs: 1,Microsoft Enhanced Cryptographic Provider v1.0 | ||
msPKI-RA-Signature: 0 | ||
msPKI-Enrollment-Flag: 0 | ||
# CT_FLAG_EXPORTABLE_KEY | ||
msPKI-Private-Key-Flag: 0x10 | ||
# CT_FLAG_SUBJECT_ALT_REQUIRE_UPN | CT_FLAG_SUBJECT_REQUIRE_DIRECTORY_PATH | ||
msPKI-Certificate-Name-Flag: 0x82000000 | ||
msPKI-Minimal-Key-Size: 2048 |
This file contains 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