@@ -49,28 +49,28 @@ type flagDesc struct {
49
49
}
50
50
51
51
var UacFlags = map [int ]flagDesc {
52
- UAC_SCRIPT : flagDesc {"Script" , "" },
53
- UAC_ACCOUNTDISABLE : flagDesc {"Disabled" , "Enabled" },
54
- UAC_HOMEDIR_REQUIRED : flagDesc {"HomeDirRequired" , "" },
55
- UAC_LOCKOUT : flagDesc {"LockedOut" , "" },
56
- UAC_PASSWD_NOTREQD : flagDesc {"PwdNotRequired" , "" },
57
- UAC_PASSWD_CANT_CHANGE : flagDesc {"CannotChangePwd" , "" },
58
- UAC_ENCRYPTED_TEXT_PWD_ALLOWED : flagDesc {"EncryptedTextPwdAllowed" , "" },
59
- UAC_TEMP_DUPLICATE_ACCOUNT : flagDesc {"TmpDuplicateAccount" , "" },
60
- UAC_NORMAL_ACCOUNT : flagDesc {"NormalAccount" , "" },
61
- UAC_INTERDOMAIN_TRUST_ACCOUNT : flagDesc {"InterdomainTrustAccount" , "" },
62
- UAC_WORKSTATION_TRUST_ACCOUNT : flagDesc {"WorkstationTrustAccount" , "" },
63
- UAC_SERVER_TRUST_ACCOUNT : flagDesc {"ServerTrustAccount" , "" },
64
- UAC_DONT_EXPIRE_PASSWORD : flagDesc {"DoNotExpirePwd" , "" },
65
- UAC_MNS_LOGON_ACCOUNT : flagDesc {"MNSLogonAccount" , "" },
66
- UAC_SMARTCARD_REQUIRED : flagDesc {"SmartcardRequired" , "" },
67
- UAC_TRUSTED_FOR_DELEGATION : flagDesc {"TrustedForDelegation" , "" },
68
- UAC_NOT_DELEGATED : flagDesc {"NotDelegated" , "" },
69
- UAC_USE_DES_KEY_ONLY : flagDesc {"UseDESKeyOnly" , "" },
70
- UAC_DONT_REQ_PREAUTH : flagDesc {"DoNotRequirePreauth" , "" },
71
- UAC_PASSWORD_EXPIRED : flagDesc {"PwdExpired" , "PwdNotExpired" },
72
- UAC_TRUSTED_TO_AUTH_FOR_DELEGATION : flagDesc {"TrustedToAuthForDelegation" , "" },
73
- UAC_PARTIAL_SECRETS_ACCOUNT : flagDesc {"PartialSecretsAccount" , "" },
52
+ UAC_SCRIPT : {"Script" , "" },
53
+ UAC_ACCOUNTDISABLE : {"Disabled" , "Enabled" },
54
+ UAC_HOMEDIR_REQUIRED : {"HomeDirRequired" , "" },
55
+ UAC_LOCKOUT : {"LockedOut" , "" },
56
+ UAC_PASSWD_NOTREQD : {"PwdNotRequired" , "" },
57
+ UAC_PASSWD_CANT_CHANGE : {"CannotChangePwd" , "" },
58
+ UAC_ENCRYPTED_TEXT_PWD_ALLOWED : {"EncryptedTextPwdAllowed" , "" },
59
+ UAC_TEMP_DUPLICATE_ACCOUNT : {"TmpDuplicateAccount" , "" },
60
+ UAC_NORMAL_ACCOUNT : {"NormalAccount" , "" },
61
+ UAC_INTERDOMAIN_TRUST_ACCOUNT : {"InterdomainTrustAccount" , "" },
62
+ UAC_WORKSTATION_TRUST_ACCOUNT : {"WorkstationTrustAccount" , "" },
63
+ UAC_SERVER_TRUST_ACCOUNT : {"ServerTrustAccount" , "" },
64
+ UAC_DONT_EXPIRE_PASSWORD : {"DoNotExpirePwd" , "" },
65
+ UAC_MNS_LOGON_ACCOUNT : {"MNSLogonAccount" , "" },
66
+ UAC_SMARTCARD_REQUIRED : {"SmartcardRequired" , "" },
67
+ UAC_TRUSTED_FOR_DELEGATION : {"TrustedForDelegation" , "" },
68
+ UAC_NOT_DELEGATED : {"NotDelegated" , "" },
69
+ UAC_USE_DES_KEY_ONLY : {"UseDESKeyOnly" , "" },
70
+ UAC_DONT_REQ_PREAUTH : {"DoNotRequirePreauth" , "" },
71
+ UAC_PASSWORD_EXPIRED : {"PwdExpired" , "PwdNotExpired" },
72
+ UAC_TRUSTED_TO_AUTH_FOR_DELEGATION : {"TrustedToAuthForDelegation" , "" },
73
+ UAC_PARTIAL_SECRETS_ACCOUNT : {"PartialSecretsAccount" , "" },
74
74
}
75
75
76
76
var SDControlFlags = map [int ]string {
@@ -166,49 +166,49 @@ type LibQuery struct {
166
166
}
167
167
168
168
var PredefinedLdapQueries = map [string ][]LibQuery {
169
- "Enum" : [] LibQuery {
170
- LibQuery {"All Organizational Units" , "(objectCategory=organizationalUnit)" },
171
- LibQuery {"All Containers" , "(objectCategory=container)" },
172
- LibQuery {"All Groups" , "(objectCategory=group)" },
173
- LibQuery {"All Computers" , "(objectClass=computer)" },
174
- LibQuery {"All Users" , "(&(objectCategory=person)(objectClass=user))" },
175
- LibQuery {"All Objects" , "(objectClass=*)" },
169
+ "Enum" : {
170
+ {"All Organizational Units" , "(objectCategory=organizationalUnit)" },
171
+ {"All Containers" , "(objectCategory=container)" },
172
+ {"All Groups" , "(objectCategory=group)" },
173
+ {"All Computers" , "(objectClass=computer)" },
174
+ {"All Users" , "(&(objectCategory=person)(objectClass=user))" },
175
+ {"All Objects" , "(objectClass=*)" },
176
176
},
177
- "Users" : [] LibQuery {
178
- LibQuery {"Recently Created Users" , "(&(objectCategory=user)(whenCreated>=<timestamp1d>))" },
179
- LibQuery {"Users With Description" , "(&(objectCategory=user)(description=*))" },
180
- LibQuery {"Users Without Email" , "(&(objectCategory=user)(!(mail=*)))" },
181
- LibQuery {"Likely Service Users" , "(&(objectCategory=user)(sAMAccountName=*svc*))" },
182
- LibQuery {"Disabled Users" , "(&(objectCategory=user)(userAccountControl:1.2.840.113556.1.4.803:=2))" },
183
- LibQuery {"Expired Users" , "(&(objectCategory=user)(accountExpires<=<timestamp>))" },
184
- LibQuery {"Users With Sensitive Infos" , "(&(objectCategory=user)(|(telephoneNumber=*)(pager=*)(homePhone=*)(mobile=*)(info=*)(streetAddress=*)))" },
185
- LibQuery {"Inactive Users" , "(&(objectCategory=user)(lastLogonTimestamp<=<timestamp30d>))" },
177
+ "Users" : {
178
+ {"Recently Created Users" , "(&(objectCategory=user)(whenCreated>=<timestamp1d>))" },
179
+ {"Users With Description" , "(&(objectCategory=user)(description=*))" },
180
+ {"Users Without Email" , "(&(objectCategory=user)(!(mail=*)))" },
181
+ {"Likely Service Users" , "(&(objectCategory=user)(sAMAccountName=*svc*))" },
182
+ {"Disabled Users" , "(&(objectCategory=user)(userAccountControl:1.2.840.113556.1.4.803:=2))" },
183
+ {"Expired Users" , "(&(objectCategory=user)(accountExpires<=<timestamp>))" },
184
+ {"Users With Sensitive Infos" , "(&(objectCategory=user)(|(telephoneNumber=*)(pager=*)(homePhone=*)(mobile=*)(info=*)(streetAddress=*)))" },
185
+ {"Inactive Users" , "(&(objectCategory=user)(lastLogonTimestamp<=<timestamp30d>))" },
186
186
},
187
- "Computers" : [] LibQuery {
188
- LibQuery {"Domain Controllers" , "(&(objectCategory=computer)(userAccountControl:1.2.840.113556.1.4.803:=8192))" },
189
- LibQuery {"Non-DC Servers" , "(&(objectCategory=computer)(operatingSystem=*server*)(!(userAccountControl:1.2.840.113556.1.4.803:=8192)))" },
190
- LibQuery {"Non-Server Computers" , "(&(objectCategory=computer)(!(operatingSystem=*server*))(!(userAccountControl:1.2.840.113556.1.4.803:=8192)))" },
191
- LibQuery {"Stale Computers" , "(&(objectCategory=computer)(!lastLogonTimestamp=*))" },
192
- LibQuery {"Computers With Outdated OS" , "(&(objectCategory=computer)(|(operatingSystem=*Server 2008*)(operatingSystem=*Server 2003*)(operatingSystem=*Windows XP*)(operatingSystem=*Windows 7*)))" },
187
+ "Computers" : {
188
+ {"Domain Controllers" , "(&(objectCategory=computer)(userAccountControl:1.2.840.113556.1.4.803:=8192))" },
189
+ {"Non-DC Servers" , "(&(objectCategory=computer)(operatingSystem=*server*)(!(userAccountControl:1.2.840.113556.1.4.803:=8192)))" },
190
+ {"Non-Server Computers" , "(&(objectCategory=computer)(!(operatingSystem=*server*))(!(userAccountControl:1.2.840.113556.1.4.803:=8192)))" },
191
+ {"Stale Computers" , "(&(objectCategory=computer)(!lastLogonTimestamp=*))" },
192
+ {"Computers With Outdated OS" , "(&(objectCategory=computer)(|(operatingSystem=*Server 2008*)(operatingSystem=*Server 2003*)(operatingSystem=*Windows XP*)(operatingSystem=*Windows 7*)))" },
193
193
},
194
- "Security" : [] LibQuery {
195
- LibQuery {"Domain Admins" , "(&(objectCategory=user)(memberOf=CN=Domain Admins,CN=Users,DC=domain,DC=com))" },
196
- LibQuery {"Administrators" , "(&(objectCategory=user)(memberOf=CN=Administrators,CN=Builtin,DC=domain,DC=com))" },
197
- LibQuery {"High Privilege Users" , "(&(objectCategory=user)(adminCount=1))" },
198
- LibQuery {"Users With SPN" , "(&(objectCategory=user)(servicePrincipalName=*))" },
199
- LibQuery {"Users With SIDHistory" , "(&(objectCategory=person)(objectClass=user)(sidHistory=*))" },
200
- LibQuery {"KrbPreauth Disabled Users" , "(&(objectCategory=person)(userAccountControl:1.2.840.113556.1.4.803:=4194304))" },
201
- LibQuery {"KrbPreauth Disabled Computers" , "(&(objectCategory=computer)(userAccountControl:1.2.840.113556.1.4.803:=4194304))" },
202
- LibQuery {"Constrained Delegation Objects" , "(msDS-AllowedToDelegateTo=*)" },
203
- LibQuery {"Unconstrained Delegation Objects" , "(userAccountControl:1.2.840.113556.1.4.803:=524288)" },
204
- LibQuery {"RBCD Objects" , "(msDS-AllowedToActOnBehalfOfOtherIdentity=*)" },
205
- LibQuery {"Not Trusted For Delegation" , "(&(samaccountname=*)(userAccountControl:1.2.840.113556.1.4.803:=1048576))" },
206
- LibQuery {"Shadow Credentials Targets" , "(msDS-KeyCredentialLink=*)" },
207
- LibQuery {"Must Change Password Users" , "(&(objectCategory=person)(objectClass=user)(pwdLastSet=0)(!(useraccountcontrol:1.2.840.113556.1.4.803:=2)))" },
208
- LibQuery {"Password Never Changed Users" , "(&(objectCategory=user)(pwdLastSet=0))" },
209
- LibQuery {"Never Expire Password Users" , "(&(objectCategory=user)(userAccountControl:1.2.840.113556.1.4.803:=65536))" },
210
- LibQuery {"Empty Password Users" , "(&(objectCategory=user)(userAccountControl:1.2.840.113556.1.4.803:=32))" },
211
- LibQuery {"LockedOut Users" , "(&(objectCategory=user)(lockoutTime>=1))" },
194
+ "Security" : {
195
+ {"Domain Admins" , "(&(objectCategory=user)(memberOf=CN=Domain Admins,CN=Users,DC=domain,DC=com))" },
196
+ {"Administrators" , "(&(objectCategory=user)(memberOf=CN=Administrators,CN=Builtin,DC=domain,DC=com))" },
197
+ {"High Privilege Users" , "(&(objectCategory=user)(adminCount=1))" },
198
+ {"Users With SPN" , "(&(objectCategory=user)(servicePrincipalName=*))" },
199
+ {"Users With SIDHistory" , "(&(objectCategory=person)(objectClass=user)(sidHistory=*))" },
200
+ {"KrbPreauth Disabled Users" , "(&(objectCategory=person)(userAccountControl:1.2.840.113556.1.4.803:=4194304))" },
201
+ {"KrbPreauth Disabled Computers" , "(&(objectCategory=computer)(userAccountControl:1.2.840.113556.1.4.803:=4194304))" },
202
+ {"Constrained Delegation Objects" , "(msDS-AllowedToDelegateTo=*)" },
203
+ {"Unconstrained Delegation Objects" , "(userAccountControl:1.2.840.113556.1.4.803:=524288)" },
204
+ {"RBCD Objects" , "(msDS-AllowedToActOnBehalfOfOtherIdentity=*)" },
205
+ {"Not Trusted For Delegation" , "(&(samaccountname=*)(userAccountControl:1.2.840.113556.1.4.803:=1048576))" },
206
+ {"Shadow Credentials Targets" , "(msDS-KeyCredentialLink=*)" },
207
+ {"Must Change Password Users" , "(&(objectCategory=person)(objectClass=user)(pwdLastSet=0)(!(useraccountcontrol:1.2.840.113556.1.4.803:=2)))" },
208
+ {"Password Never Changed Users" , "(&(objectCategory=user)(pwdLastSet=0))" },
209
+ {"Never Expire Password Users" , "(&(objectCategory=user)(userAccountControl:1.2.840.113556.1.4.803:=65536))" },
210
+ {"Empty Password Users" , "(&(objectCategory=user)(userAccountControl:1.2.840.113556.1.4.803:=32))" },
211
+ {"LockedOut Users" , "(&(objectCategory=user)(lockoutTime>=1))" },
212
212
},
213
213
}
214
214
0 commit comments