Skip to content
This repository was archived by the owner on Jan 21, 2021. It is now read-only.

Commit 9853900

Browse files
committed
Type fix.
Added -TrustedToAuth to Get-DomainUser
1 parent 831dde1 commit 9853900

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

Recon/PowerView.ps1

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4423,7 +4423,7 @@ Required Dependencies: Get-DomainSearcher, Convert-ADName, Convert-LDAPProperty
44234423

44244424
Builds a directory searcher object using Get-DomainSearcher, builds a custom
44254425
LDAP filter based on targeting/filter parameters, and searches for all objects
4426-
matching the criteria. To only return specific properies, use
4426+
matching the criteria. To only return specific properties, use
44274427
"-Properties samaccountname,usnchanged,...". By default, all user objects for
44284428
the current domain are returned.
44294429

@@ -4449,6 +4449,10 @@ Switch. Return user accounts that are not marked as 'sensitive and not allowed f
44494449

44504450
Switch. Return user accounts that are marked as 'sensitive and not allowed for delegation'
44514451

4452+
.PARAMETER TrustedToAuth
4453+
4454+
Switch. Return computer objects that are trusted to authenticate for other principals.
4455+
44524456
.PARAMETER KerberosPreuthNotRequired
44534457

44544458
Switch. Return user accounts with "Do not require Kerberos preauthentication" set.
@@ -4603,6 +4607,9 @@ The raw DirectoryServices.SearchResult object, if -Raw is enabled.
46034607
[Switch]
46044608
$DisallowDelegation,
46054609

4610+
[Switch]
4611+
$TrustedToAuth,
4612+
46064613
[Switch]
46074614
$KerberosPreuthNotRequired,
46084615

@@ -4731,6 +4738,10 @@ The raw DirectoryServices.SearchResult object, if -Raw is enabled.
47314738
Write-Verbose '[Get-DomainUser] Searching for adminCount=1'
47324739
$Filter += '(admincount=1)'
47334740
}
4741+
if ($PSBoundParameters['TrustedToAuth']) {
4742+
Write-Verbose '[Get-DomainUser] Searching for users that are trusted to authenticate for other principals'
4743+
$Filter += '(msds-allowedtodelegateto=*)'
4744+
}
47344745
if ($PSBoundParameters['KerberosPreuthNotRequired']) {
47354746
Write-Verbose '[Get-DomainUser] Searching for user accounts that do not require kerberos preauthenticate'
47364747
$Filter += '(userAccountControl:1.2.840.113556.1.4.803:=4194304)'
@@ -5472,7 +5483,7 @@ Required Dependencies: Get-DomainSearcher, Convert-LDAPProperty
54725483

54735484
Builds a directory searcher object using Get-DomainSearcher, builds a custom
54745485
LDAP filter based on targeting/filter parameters, and searches for all objects
5475-
matching the criteria. To only return specific properies, use
5486+
matching the criteria. To only return specific properties, use
54765487
"-Properties samaccountname,usnchanged,...". By default, all computer objects for
54775488
the current domain are returned.
54785489

@@ -5828,7 +5839,7 @@ Required Dependencies: Get-DomainSearcher, Convert-LDAPProperty, Convert-ADName
58285839

58295840
Builds a directory searcher object using Get-DomainSearcher, builds a custom
58305841
LDAP filter based on targeting/filter parameters, and searches for all objects
5831-
matching the criteria. To only return specific properies, use
5842+
matching the criteria. To only return specific properties, use
58325843
"-Properties samaccountname,usnchanged,...". By default, all objects for
58335844
the current domain are returned.
58345845

@@ -7437,7 +7448,7 @@ Required Dependencies: Get-DomainSearcher, Convert-LDAPProperty
74377448

74387449
Builds a directory searcher object using Get-DomainSearcher, builds a custom
74397450
LDAP filter based on targeting/filter parameters, and searches for all objects
7440-
matching the criteria. To only return specific properies, use
7451+
matching the criteria. To only return specific properties, use
74417452
"-Properties whencreated,usnchanged,...". By default, all OU objects for
74427453
the current domain are returned.
74437454

@@ -7700,7 +7711,7 @@ Required Dependencies: Get-DomainSearcher, Convert-LDAPProperty
77007711

77017712
Builds a directory searcher object using Get-DomainSearcher, builds a custom
77027713
LDAP filter based on targeting/filter parameters, and searches for all objects
7703-
matching the criteria. To only return specific properies, use
7714+
matching the criteria. To only return specific properties, use
77047715
"-Properties whencreated,usnchanged,...". By default, all site objects for
77057716
the current domain are returned.
77067717

@@ -7959,7 +7970,7 @@ Required Dependencies: Get-DomainSearcher, Convert-LDAPProperty
79597970

79607971
Builds a directory searcher object using Get-DomainSearcher, builds a custom
79617972
LDAP filter based on targeting/filter parameters, and searches for all objects
7962-
matching the criteria. To only return specific properies, use
7973+
matching the criteria. To only return specific properties, use
79637974
"-Properties whencreated,usnchanged,...". By default, all subnet objects for
79647975
the current domain are returned.
79657976

@@ -8312,7 +8323,7 @@ Required Dependencies: Get-DomainSearcher, Get-DomainObject, Convert-ADName, Con
83128323

83138324
Builds a directory searcher object using Get-DomainSearcher, builds a custom
83148325
LDAP filter based on targeting/filter parameters, and searches for all objects
8315-
matching the criteria. To only return specific properies, use
8326+
matching the criteria. To only return specific properties, use
83168327
"-Properties samaccountname,usnchanged,...". By default, all group objects for
83178328
the current domain are returned. To return the groups a specific user/group is
83188329
a part of, use -MemberIdentity X to execute token groups enumeration.
@@ -10572,7 +10583,7 @@ Required Dependencies: Get-DomainSearcher, Get-DomainComputer, Get-DomainUser, G
1057210583

1057310584
Builds a directory searcher object using Get-DomainSearcher, builds a custom
1057410585
LDAP filter based on targeting/filter parameters, and searches for all objects
10575-
matching the criteria. To only return specific properies, use
10586+
matching the criteria. To only return specific properties, use
1057610587
"-Properties samaccountname,usnchanged,...". By default, all GPO objects for
1057710588
the current domain are returned. To enumerate all GPOs that are applied to
1057810589
a particular machine, use -ComputerName X.

0 commit comments

Comments
 (0)