File tree Expand file tree Collapse file tree 14 files changed +206
-114
lines changed
Expand file tree Collapse file tree 14 files changed +206
-114
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 88 FunctionsToExport = ' Invoke-Locksmith'
99 GUID = ' b1325b42-8dc4-4f17-aa1f-dcb5984ca14a'
1010 HelpInfoURI = ' https://raw.githubusercontent.com/jakehildreth/Locksmith/main/en-US/'
11- ModuleVersion = ' 2025.5.26 '
11+ ModuleVersion = ' 2025.9.8 '
1212 PowerShellVersion = ' 5.1'
1313 PrivateData = @ {
1414 PSData = @ {
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ $Assembly = @(
5353 }
5454)
5555$FoundErrors = @ (
56- Foreach ($Import in @ ($Assembly )) {
56+ foreach ($Import in @ ($Assembly )) {
5757 try {
5858 Write-Verbose - Message $Import.FullName
5959 Add-Type - Path $Import.Fullname - ErrorAction Stop
@@ -77,10 +77,10 @@ $FoundErrors = @(
7777 }
7878 }
7979 # Dot source the files
80- Foreach ($Import in @ ($Classes + $Enums + $Private + $Public )) {
81- Try {
80+ foreach ($Import in @ ($Classes + $Enums + $Private + $Public )) {
81+ try {
8282 . $Import.Fullname
83- } Catch {
83+ } catch {
8484 Write-Error - Message " Failed to import functions from $ ( $import.Fullname ) : $_ "
8585 $true
8686 }
Original file line number Diff line number Diff line change 5656 } else {
5757 $SID = ($Principal.Translate ([System.Security.Principal.SecurityIdentifier ])).Value
5858 }
59- if ( ($SID -notmatch $SafeUsers ) -and ( ($entry.ActiveDirectoryRights -match ' ExtendedRight' ) -or ($entry.ActiveDirectoryRights -match ' GenericAll' ) ) ) {
59+ if (
60+ ($SID -notmatch $SafeUsers ) -and
61+ ( ( ($entry.ActiveDirectoryRights -match ' ExtendedRight' ) -and
62+ ( $entry.ObjectType -match ' 0e10c968-78fb-11d2-90d4-00c04f79dc55|00000000-0000-0000-0000-000000000000' ) ) -or
63+ ($entry.ActiveDirectoryRights -match ' GenericAll' ) )
64+ ) {
6065 $Issue = [pscustomobject ]@ {
6166 Forest = $_.CanonicalName.split (' /' )[0 ]
6267 Name = $_.Name
Original file line number Diff line number Diff line change @@ -56,7 +56,12 @@ function Find-ESC13 {
5656 } else {
5757 $SID = ($Principal.Translate ([System.Security.Principal.SecurityIdentifier ])).Value
5858 }
59- if ( ($SID -notmatch $SafeUsers ) -and ($entry.ActiveDirectoryRights -match ' ExtendedRight' ) ) {
59+ if (
60+ ($SID -notmatch $SafeUsers ) -and
61+ ( ( ($entry.ActiveDirectoryRights -match ' ExtendedRight' ) -and
62+ ( $entry.ObjectType -match ' 0e10c968-78fb-11d2-90d4-00c04f79dc55|00000000-0000-0000-0000-000000000000' ) ) -or
63+ ($entry.ActiveDirectoryRights -match ' GenericAll' ) )
64+ ) {
6065 $Issue = [pscustomobject ]@ {
6166 Forest = $_.CanonicalName.split (' /' )[0 ]
6267 Name = $_.Name
Original file line number Diff line number Diff line change @@ -44,7 +44,12 @@ function Find-ESC15 {
4444 } else {
4545 $SID = ($Principal.Translate ([System.Security.Principal.SecurityIdentifier ])).Value
4646 }
47- if ( ($SID -notmatch $SafeUsers ) -and ( ($entry.ActiveDirectoryRights -match ' ExtendedRight' ) -or ($entry.ActiveDirectoryRights -match ' GenericAll' ) ) ) {
47+ if (
48+ ($SID -notmatch $SafeUsers ) -and
49+ ( ( ($entry.ActiveDirectoryRights -match ' ExtendedRight' ) -and
50+ ( $entry.ObjectType -match ' 0e10c968-78fb-11d2-90d4-00c04f79dc55|00000000-0000-0000-0000-000000000000' ) ) -or
51+ ($entry.ActiveDirectoryRights -match ' GenericAll' ) )
52+ ) {
4853 $Issue = [pscustomobject ]@ {
4954 Forest = $_.CanonicalName.split (' /' )[0 ]
5055 Name = $_.Name
Original file line number Diff line number Diff line change 4040 if ($_.DisableExtensionList -eq ' Yes' ) {
4141 $Issue.Issue = @"
4242The Certification Authority (CA) $ ( $_.CAFullName ) has the szOID_NTDS_CA_SECURITY_EXT security extension disabled. When
43- this extension is disabled, every certificate issued by this CA will be unable to to reliably map a certificate to a
43+ this extension is disabled, every certificate issued by this CA will be unable to reliably map a certificate to a
4444user or computer account's SID for authentication.
4545
4646More info:
Original file line number Diff line number Diff line change 4646 } else {
4747 $SID = ($Principal.Translate ([System.Security.Principal.SecurityIdentifier ])).Value
4848 }
49- if ( ($SID -notmatch $SafeUsers ) -and ( ($entry.ActiveDirectoryRights -match ' ExtendedRight' ) -or ($entry.ActiveDirectoryRights -match ' GenericAll' ) ) ) {
49+ if (
50+ ($SID -notmatch $SafeUsers ) -and
51+ ( ( ($entry.ActiveDirectoryRights -match ' ExtendedRight' ) -and
52+ ( $entry.ObjectType -match ' 0e10c968-78fb-11d2-90d4-00c04f79dc55|00000000-0000-0000-0000-000000000000' ) ) -or
53+ ($entry.ActiveDirectoryRights -match ' GenericAll' ) )
54+ ) {
5055 $Issue = [pscustomobject ]@ {
5156 Forest = $_.CanonicalName.split (' /' )[0 ]
5257 Name = $_.Name
Original file line number Diff line number Diff line change 4646 } else {
4747 $SID = ($Principal.Translate ([System.Security.Principal.SecurityIdentifier ])).Value
4848 }
49- if ( ($SID -notmatch $SafeUsers ) -and ( ($entry.ActiveDirectoryRights -match ' ExtendedRight' ) -or ($entry.ActiveDirectoryRights -match ' GenericAll' ) ) ) {
49+ if (
50+ ($SID -notmatch $SafeUsers ) -and
51+ ( ( ($entry.ActiveDirectoryRights -match ' ExtendedRight' ) -and
52+ ( $entry.ObjectType -match ' 0e10c968-78fb-11d2-90d4-00c04f79dc55|00000000-0000-0000-0000-000000000000' ) ) -or
53+ ($entry.ActiveDirectoryRights -match ' GenericAll' ) )
54+ ) {
5055 $Issue = [pscustomobject ]@ {
5156 Forest = $_.CanonicalName.split (' /' )[0 ]
5257 Name = $_.Name
Original file line number Diff line number Diff line change 4747 } else {
4848 $SID = ($Principal.Translate ([System.Security.Principal.SecurityIdentifier ])).Value
4949 }
50- if ( ($SID -notmatch $SafeUsers ) -and ( ($entry.ActiveDirectoryRights -match ' ExtendedRight' ) -or ($entry.ActiveDirectoryRights -match ' GenericAll' ) ) ) {
50+ if (
51+ ($SID -notmatch $SafeUsers ) -and
52+ ( ( ($entry.ActiveDirectoryRights -match ' ExtendedRight' ) -and
53+ ( $entry.ObjectType -match ' 0e10c968-78fb-11d2-90d4-00c04f79dc55|00000000-0000-0000-0000-000000000000' ) ) -or
54+ ($entry.ActiveDirectoryRights -match ' GenericAll' ) )
55+ ) {
5156 $Issue = [pscustomobject ]@ {
5257 Forest = $_.CanonicalName.split (' /' )[0 ]
5358 Name = $_.Name
You can’t perform that action at this time.
0 commit comments