CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/rex/proto/ms_crtd.rb
Views: 11655
1
# -*- coding: binary -*-
2
# frozen_string_literal: true
3
4
module Rex::Proto
5
module MsCrtd
6
# see: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-crtd/4c6950e4-1dc2-4ae3-98c3-b8919bb73822
7
8
# [2.26 msPKI-Enrollment-Flag Attribute](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-crtd/ec71fd43-61c2-407b-83c9-b52272dec8a1)
9
CT_FLAG_INCLUDE_SYMMETRIC_ALGORITHMS = 0x00000001
10
CT_FLAG_PEND_ALL_REQUESTS = 0x00000002
11
CT_FLAG_PUBLISH_TO_KRA_CONTAINER = 0x00000004
12
CT_FLAG_PUBLISH_TO_DS = 0x00000008
13
CT_FLAG_AUTO_ENROLLMENT_CHECK_USER_DS_CERTIFICATE = 0x00000010
14
CT_FLAG_AUTO_ENROLLMENT = 0x00000020
15
CT_FLAG_PREVIOUS_APPROVAL_VALIDATE_REENROLLMENT = 0x00000040
16
CT_FLAG_USER_INTERACTION_REQUIRED = 0x00000100
17
CT_FLAG_REMOVE_INVALID_CERTIFICATE_FROM_PERSONAL_STORE = 0x00000400
18
CT_FLAG_ALLOW_ENROLL_ON_BEHALF_OF = 0x00000800
19
CT_FLAG_ADD_OCSP_NOCHECK = 0x00001000
20
CT_FLAG_ENABLE_KEY_REUSE_ON_NT_TOKEN_KEYSET_STORAGE_FULL = 0x00002000
21
CT_FLAG_NOREVOCATIONINFOINISSUEDCERTS = 0x00004000
22
CT_FLAG_INCLUDE_BASIC_CONSTRAINTS_FOR_EE_CERTS = 0x00008000
23
CT_FLAG_ALLOW_PREVIOUS_APPROVAL_KEYBASEDRENEWAL_VALIDATE_REENROLLMENT = 0x00010000
24
CT_FLAG_ISSUANCE_POLICIES_FROM_REQUEST = 0x00020000
25
CT_FLAG_SKIP_AUTO_RENEWAL = 0x00040000
26
27
# [2.27 msPKI-Private-Key-Flag Attribute](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-crtd/f6122d87-b999-4b92-bff8-f465e8949667)
28
CT_FLAG_REQUIRE_PRIVATE_KEY_ARCHIVAL = 0x00000001
29
CT_FLAG_EXPORTABLE_KEY = 0x00000010
30
CT_FLAG_STRONG_KEY_PROTECTION_REQUIRED = 0x00000020
31
CT_FLAG_REQUIRE_ALTERNATE_SIGNATURE_ALGORITHM = 0x00000040
32
CT_FLAG_REQUIRE_SAME_KEY_RENEWAL = 0x00000080
33
CT_FLAG_USE_LEGACY_PROVIDER = 0x00000100
34
CT_FLAG_ATTEST_NONE = 0x00000000
35
CT_FLAG_ATTEST_REQUIRED = 0x00002000
36
CT_FLAG_ATTEST_PREFERRED = 0x00001000
37
CT_FLAG_ATTESTATION_WITHOUT_POLICY = 0x00004000
38
CT_FLAG_EK_TRUST_ON_USE = 0x00000200
39
CT_FLAG_EK_VALIDATE_CERT = 0x00000400
40
CT_FLAG_EK_VALIDATE_KEY = 0x00000800
41
CT_FLAG_HELLO_LOGON_KEY = 0x00200000
42
43
# [2.28 msPKI-Certificate-Name-Flag Attribute](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-crtd/1192823c-d839-4bc3-9b6b-fa8c53507ae1)
44
CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT = 0x00000001
45
CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT_ALT_NAME = 0x00010000
46
CT_FLAG_SUBJECT_ALT_REQUIRE_DOMAIN_DNS = 0x00400000
47
CT_FLAG_SUBJECT_ALT_REQUIRE_SPN = 0x00800000
48
CT_FLAG_SUBJECT_ALT_REQUIRE_DIRECTORY_GUID = 0x01000000
49
CT_FLAG_SUBJECT_ALT_REQUIRE_UPN = 0x02000000
50
CT_FLAG_SUBJECT_ALT_REQUIRE_EMAIL = 0x04000000
51
CT_FLAG_SUBJECT_ALT_REQUIRE_DNS = 0x08000000
52
CT_FLAG_SUBJECT_REQUIRE_DNS_AS_CN = 0x10000000
53
CT_FLAG_SUBJECT_REQUIRE_EMAIL = 0x20000000
54
CT_FLAG_SUBJECT_REQUIRE_COMMON_NAME = 0x40000000
55
CT_FLAG_SUBJECT_REQUIRE_DIRECTORY_PATH = 0x80000000
56
CT_FLAG_OLD_CERT_SUPPLIES_SUBJECT_AND_ALT_NAME = 0x00000008
57
58
end
59
end
60
61