Skip to content

Commit

Permalink
7.4 fixed typo and FilterTrustee
Browse files Browse the repository at this point in the history
  • Loading branch information
canix1 committed Oct 3, 2022
1 parent 2e63e4f commit 6bd7598
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 23 deletions.
41 changes: 22 additions & 19 deletions ADACLScan.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,13 @@
https://github.com/canix1/ADACLScanner

.NOTES
**Version: 7.3**
**Version: 7.4**

**3 October, 2022**

**21 September, 2022**

**Fixed issues**
* Tried to pass credentials even when no credentials were applied for a recursive search
* Typo
* FilterTrustee parameter gets evaluated before the -RecursiveFind

#>
Param
Expand Down Expand Up @@ -764,7 +765,7 @@ $xamlBase = @"
<StackPanel Orientation="Horizontal" Margin="0,0,0,0">
<StackPanel Orientation="Vertical" >
<StackPanel Orientation="Horizontal" >
<Label x:Name="lblStyleVersion1" Content="AD ACL Scanner 7.3" HorizontalAlignment="Left" Height="25" Margin="0,0,0,0" VerticalAlignment="Top" Width="140" Foreground="White" Background="{x:Null}" FontWeight="Bold" FontSize="14"/>
<Label x:Name="lblStyleVersion1" Content="AD ACL Scanner 7.4" HorizontalAlignment="Left" Height="25" Margin="0,0,0,0" VerticalAlignment="Top" Width="140" Foreground="White" Background="{x:Null}" FontWeight="Bold" FontSize="14"/>
</StackPanel>
<StackPanel Orientation="Horizontal" >
<Label x:Name="lblStyleVersion2" Content="written by Robin Granberg " HorizontalAlignment="Left" Height="27" Margin="0,0,0,0" VerticalAlignment="Top" Width="150" Foreground="White" Background="{x:Null}" FontSize="12"/>
Expand Down Expand Up @@ -11750,18 +11751,6 @@ if(($global:GetSecErr -ne $true) -or ($global:secd -ne ""))
}
}

If ($FilterForTrustee)
{
if ($FilterTrustee.Length -gt 0)
{
$sd = @($sd | Where-Object{if($_.IdentityReference -like "S-1-*"){`
$(ConvertSidToName -server $global:strDomainLongName -Sid $_.IdentityReference -CREDS $CREDS) -like $FilterTrustee}`
else{$_.IdentityReference -like $FilterTrustee}})

}

}

}

if($FilterBuiltin)
Expand Down Expand Up @@ -11853,7 +11842,21 @@ if(($global:GetSecErr -ne $true) -or ($global:secd -ne ""))
$RecursiveData = $null
}

##REM
If (($FilterEna -eq $true) -and ($bolEffectiveR -eq $false))
{
If ($FilterForTrustee)
{
if ($FilterTrustee.Length -gt 0)
{
$sd = @($sd | Where-Object{if($_.IdentityReference -like "S-1-*"){`
$(ConvertSidToName -server $global:strDomainLongName -Sid $_.IdentityReference -CREDS $CREDS) -like $FilterTrustee}`
else{$_.IdentityReference -like $FilterTrustee}})

}

}
}

if($ReturnObjectType)
{
if($ReturnObjectType -ne "*")
Expand Down Expand Up @@ -16136,7 +16139,7 @@ if($base -or $GPO)
{
Write-host "Path:$OutputFolder was not found! Writting to current folder." -ForegroundColor red
$strFileHTM = $CurrentFSPath + "\"+"$global:strDomainShortName-$strNode-$global:SessionID"+".htm"
}D
}
}
else
{
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# AD ACL Scanner

## Current version
**Version: 7.3**

**21 September, 2022**
**Version: 7.4**

**SHA256:** 3ECA4B56CE358B13E1128A1E6149ED07CA0A8C55997B50A1E2C4EA46BD586B84
**3 October, 2022**

**SHA256:** 9AC25A8825407CCB6089BC7A2DF530D1830795B7E71A981ECEE4C5F48387B37A

**Fixed issues**
* Tried to pass credentials even when no credentials were applied for a recursive search
* Typo
* FilterTrustee parameter gets evaluated before the -RecursiveFind

*7.0 Features*
* Filter on permissions like "GenericAll" or multiple values like "WriteProperty | ExtendedRight"
Expand Down

0 comments on commit 6bd7598

Please sign in to comment.