forked from ANSSI-FR/ORADAD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Constants.h
176 lines (160 loc) · 8.49 KB
/
Constants.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
#include <Iads.h> // cUserAccountControl
#include <ntsecapi.h> // cTrustAttributes
#define CONST_MAX_SIZE 1024
#define SIZE_NUMBER_TXT 12
#define ADS_UF_NO_AUTH_DATA_REQUIRED 0x2000000
#define ADS_UF_PARTIAL_SECRETS_ACCOUNT 0x4000000
CONST_TXT cUserAccountControl[] =
{
{ ADS_UF_ACCOUNTDISABLE, L"DISABLE" },
{ ADS_UF_LOCKOUT, L"LOCKOUT" },
{ ADS_UF_PASSWD_NOTREQD, L"PASSWD_NOTREQD" },
{ ADS_UF_PASSWD_CANT_CHANGE, L"PASSWD_CANT_CHANGE" },
{ ADS_UF_ENCRYPTED_TEXT_PASSWORD_ALLOWED, L"TEXT_PASSWORD" },
{ ADS_UF_PASSWORD_EXPIRED, L"PASSWORD_EXPIRED" },
{ ADS_UF_DONT_EXPIRE_PASSWD, L"DONT_EXPIRE_PASSWD" },
{ ADS_UF_DONT_REQUIRE_PREAUTH, L"DONT_REQUIRE_PREAUTH" },
{ ADS_UF_SMARTCARD_REQUIRED, L"SMARTCARD_REQUIRED" },
{ ADS_UF_USE_DES_KEY_ONLY, L"USE_DES_KEY_ONLY" },
{ ADS_UF_NOT_DELEGATED, L"NOT_DELEGATED" },
{ ADS_UF_TRUSTED_FOR_DELEGATION, L"TRUSTED_FOR_DELEGATION" },
{ ADS_UF_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION, L"T2A4F" },
{ ADS_UF_TEMP_DUPLICATE_ACCOUNT, L"TEMP_DUPLICATE_ACCOUNT" },
{ ADS_UF_NORMAL_ACCOUNT, L"NORMAL_ACCOUNT" },
{ ADS_UF_INTERDOMAIN_TRUST_ACCOUNT, L"INTERDOMAIN_ACCOUNT" },
{ ADS_UF_WORKSTATION_TRUST_ACCOUNT, L"WORKSTATION_ACCOUNT" },
{ ADS_UF_SERVER_TRUST_ACCOUNT, L"SERVER_ACCOUNT" },
{ ADS_UF_PARTIAL_SECRETS_ACCOUNT, L"PARTIAL_SECRETS_ACCOUNT" },
{ ADS_UF_MNS_LOGON_ACCOUNT, L"MNS_LOGON_ACCOUNT" },
{ ADS_UF_NO_AUTH_DATA_REQUIRED, L"NO_AUTH_DATA_REQUIRED" },
{ ADS_UF_SCRIPT, L"SCRIPT" },
{ ADS_UF_HOMEDIR_REQUIRED, L"HOMEDIR_REQUIRED" },
{ FILTER_FLAG, NULL }
};
#define FLAG_ATTR_REQ_PARTIAL_SET_MEMBER 0x00000002
#define FLAG_ATTR_IS_OPERATIONAL 0x00000008
#define FLAG_SCHEMA_BASE_OBJECT 0x00000010
#define FLAG_ATTR_IS_RDN 0x00000020
#define FLAG_DISALLOW_MOVE_ON_DELETE 0x02000000
CONST_TXT cSystemFlags [] =
{
{ ADS_SYSTEMFLAG_ATTR_NOT_REPLICATED, L"NOT_REPLICATED/NC" },
{ FLAG_ATTR_REQ_PARTIAL_SET_MEMBER, L"PARTIAL_SET_MEMBER/DOMAIN" },
{ ADS_SYSTEMFLAG_ATTR_IS_CONSTRUCTED, L"CONSTRUCTED/NOT_GC_REPLICATED" },
{ FLAG_ATTR_IS_OPERATIONAL, L"OPERATIONAL" },
{ FLAG_SCHEMA_BASE_OBJECT, L"BASE_OBJECT" },
{ FLAG_ATTR_IS_RDN, L"RDN" },
{ FLAG_DISALLOW_MOVE_ON_DELETE, L"DISALLOW_MOVE_ON_DELETE" },
{ ADS_SYSTEMFLAG_DOMAIN_DISALLOW_MOVE, L"DISALLOW_MOVE" },
{ ADS_SYSTEMFLAG_DOMAIN_DISALLOW_RENAME, L"DISALLOW_RENAME" },
{ ADS_SYSTEMFLAG_CONFIG_ALLOW_LIMITED_MOVE, L"ALLOW_LIMITED_MOVE" },
{ ADS_SYSTEMFLAG_CONFIG_ALLOW_MOVE, L"ALLOW_MOVE" },
{ ADS_SYSTEMFLAG_CONFIG_ALLOW_RENAME, L"ALLOW_RENAME" },
{ ADS_SYSTEMFLAG_DISALLOW_DELETE, L"DISALLOW_DELETE" },
{ FILTER_FLAG, NULL }
};
#define fATTINDEX 0x1
#define fPDNTATTINDEX 0x2
#define fANR 0x4
#define fPRESERVEONDELETE 0x8
#define fCOPY 0x10
#define fTUPLEINDEX 0x20
#define fSUBTREEATTINDEX 0x40
#define fCONFIDENTIAL 0x80
#define fNEVERVALUEAUDIT 0x100
#define fRODCFilteredAttribute 0x200
#define fEXTENDEDLINKTRACKING 0x400
#define fBASEONLY 0x800
#define fPARTITIONSECRET 0x1000
CONST_TXT cSearchFlags[] =
{
{ fATTINDEX, L"ATTINDEX" },
{ fPDNTATTINDEX, L"PDNTATTINDEX" },
{ fANR, L"ANR" },
{ fPRESERVEONDELETE, L"PRESERVEONDELETE" },
{ fCOPY, L"COPY" },
{ fTUPLEINDEX, L"TUPLEINDEX" },
{ fSUBTREEATTINDEX, L"SUBTREEATTINDEX" },
{ fCONFIDENTIAL, L"CONFIDENTIAL" },
{ fNEVERVALUEAUDIT, L"NEVERVALUEAUDIT" },
{ fRODCFilteredAttribute, L"RODCFilteredAttribute" },
{ fEXTENDEDLINKTRACKING, L"EXTENDEDLINKTRACKING" },
{ fBASEONLY, L"BASEONLY" },
{ fPARTITIONSECRET, L"PARTITIONSECRET" },
{ FILTER_FLAG, NULL }
};
#define FLAG_ATTR_IS_CRITICAL 0x1
CONST_TXT cSchemaFlagsEx[] =
{
{ FLAG_ATTR_IS_CRITICAL, L"IS_CRITICAL" },
{ FILTER_FLAG, NULL }
};
#define GROUP_TYPE_BUILTIN_LOCAL_GROUP 0x1
#define GROUP_TYPE_ACCOUNT_GROUP 0x2
#define GROUP_TYPE_RESOURCE_GROUP 0x4
#define GROUP_TYPE_UNIVERSAL_GROUP 0x8
#define GROUP_TYPE_APP_BASIC_GROUP 0x10
#define GROUP_TYPE_APP_QUERY_GROUP 0x20
#define GROUP_TYPE_SECURITY_ENABLED 0x80000000
CONST_TXT cGroupType[] =
{
{ GROUP_TYPE_BUILTIN_LOCAL_GROUP, L"BUILTIN_LOCAL" },
{ GROUP_TYPE_ACCOUNT_GROUP, L"ACCOUNT" },
{ GROUP_TYPE_RESOURCE_GROUP, L"RESOURCE" },
{ GROUP_TYPE_UNIVERSAL_GROUP, L"UNIVERSAL" },
{ GROUP_TYPE_APP_BASIC_GROUP, L"APP_BASIC" },
{ GROUP_TYPE_APP_QUERY_GROUP, L"APP_QUERY" },
{ GROUP_TYPE_SECURITY_ENABLED, L"SECURITY_ENABLED" },
{ FILTER_FLAG, NULL }
};
#define DES_CBC_CRC 0x1
#define DES_CBC_MD5 0x2
#define RC4_HMAC 0x4
#define AES128_CTS_HMAC_SHA1_96 0x8
#define AES256_CTS_HMAC_SHA1_96 0x10
#define FAST_supported 0x10000
#define Compound_identity_supported 0x20000
#define Claims_supported 0x40000
#define Resource_SID_compression_disabled 0x80000
CONST_TXT cSupportedEncryptionTypes[] =
{
{ DES_CBC_CRC, L"DES_CRC" },
{ DES_CBC_MD5, L"DES_MD5" },
{ RC4_HMAC, L"RC4" },
{ AES128_CTS_HMAC_SHA1_96, L"AES128" },
{ AES256_CTS_HMAC_SHA1_96, L"AES256" },
{ Compound_identity_supported, L"Compound" },
{ FAST_supported, L"FAST" },
{ Claims_supported, L"Claims" },
{ Resource_SID_compression_disabled, L"SID_compression_disabled" },
{ FILTER_FLAG, NULL }
};
#define TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION 0x00000080
CONST_TXT cTrustAttributes[] =
{
{ TRUST_ATTRIBUTE_NON_TRANSITIVE, L"NON_TRANSITIVE" },
{ TRUST_ATTRIBUTE_UPLEVEL_ONLY, L"UPLEVEL_ONLY" },
{ TRUST_ATTRIBUTE_QUARANTINED_DOMAIN, L"QUARANTINED_DOMAIN" },
{ TRUST_ATTRIBUTE_FOREST_TRANSITIVE, L"FOREST_TRANSITIVE" },
{ TRUST_ATTRIBUTE_CROSS_ORGANIZATION, L"CROSS_ORGANIZATION" },
{ TRUST_ATTRIBUTE_WITHIN_FOREST, L"WITHIN_FOREST" },
{ TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL, L"TREAT_AS_EXTERNAL" },
{ TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION, L"USES_RC4_ENCRYPTION" },
{ TRUST_ATTRIBUTE_CROSS_ORGANIZATION_NO_TGT_DELEGATION, L"CROSS_ORGANIZATION_NO_TGT_DELEGATION" },
{ TRUST_ATTRIBUTE_PIM_TRUST, L"PIM_TRUST" },
{ FILTER_FLAG, NULL }
};
CONST_TXT cTrustDirection[] =
{
{ TRUST_DIRECTION_INBOUND, L"INBOUND" },
{ TRUST_DIRECTION_OUTBOUND, L"OUTBOUND" },
{ TRUST_DIRECTION_BIDIRECTIONAL, L"BIDIRECTIONAL" },
{ FILTER_TYPE, NULL }
};
CONST_TXT cTrustType[] =
{
{ TRUST_TYPE_DOWNLEVEL, L"DOWNLEVEL" },
{ TRUST_TYPE_UPLEVEL, L"UPLEVEL" },
{ TRUST_TYPE_MIT, L"MIT" },
{ FILTER_TYPE, NULL }
};