|
1 | | -[CmdletBinding(HelpUri = 'https://jakehildreth.github.io/Locksmith/Invoke-Locksmith')] |
| 1 | +[CmdletBinding(HelpUri = 'https://jakehildreth.github.io/Locksmith/Invoke-Locksmith')] |
2 | 2 | param ( |
3 | 3 | # The mode to run Locksmith in. Defaults to 0. |
4 | 4 | [Parameter(Mandatory = $false)] |
@@ -2851,8 +2851,10 @@ function Invoke-Scans { |
2851 | 2851 | } |
2852 | 2852 | ESC3 { |
2853 | 2853 | Write-Host 'Identifying AD CS templates with dangerous ESC3 configurations...' |
2854 | | - [array]$ESC3 = Find-ESC3C1 -ADCSObjects $ADCSObjects -SafeUsers $SafeUsers -UnsafeUsers $UnsafeUsers |
2855 | | - [array]$ESC3 += Find-ESC3C2 -ADCSObjects $ADCSObjects -SafeUsers $SafeUsers -UnsafeUsers $UnsafeUsers |
| 2854 | + [array]$ESC3 = @( |
| 2855 | + Find-ESC3C1 -ADCSObjects $ADCSObjects -SafeUsers $SafeUsers -UnsafeUsers $UnsafeUsers |
| 2856 | + Find-ESC3C2 -ADCSObjects $ADCSObjects -SafeUsers $SafeUsers -UnsafeUsers $UnsafeUsers |
| 2857 | + ) |
2856 | 2858 | } |
2857 | 2859 | ESC4 { |
2858 | 2860 | Write-Host 'Identifying AD CS templates with poor access control (ESC4)...' |
@@ -2910,8 +2912,10 @@ function Invoke-Scans { |
2910 | 2912 | Write-Host 'Identifying AD CS templates with dangerous ESC2 configurations...' |
2911 | 2913 | [array]$ESC2 = Find-ESC2 -ADCSObjects $ADCSObjects -SafeUsers $SafeUsers -UnsafeUsers $UnsafeUsers |
2912 | 2914 | Write-Host 'Identifying AD CS templates with dangerous ESC3 configurations...' |
2913 | | - [array]$ESC3 = Find-ESC3C1 -ADCSObjects $ADCSObjects -SafeUsers $SafeUsers -UnsafeUsers $UnsafeUsers |
2914 | | - [array]$ESC3 += Find-ESC3C2 -ADCSObjects $ADCSObjects -SafeUsers $SafeUsers -UnsafeUsers $UnsafeUsers |
| 2915 | + [array]$ESC3 = @( |
| 2916 | + Find-ESC3C1 -ADCSObjects $ADCSObjects -SafeUsers $SafeUsers -UnsafeUsers $UnsafeUsers |
| 2917 | + Find-ESC3C2 -ADCSObjects $ADCSObjects -SafeUsers $SafeUsers -UnsafeUsers $UnsafeUsers |
| 2918 | + ) |
2915 | 2919 | Write-Host 'Identifying AD CS templates with poor access control (ESC4)...' |
2916 | 2920 | [array]$ESC4 = Find-ESC4 -ADCSObjects $ADCSObjects -SafeUsers $SafeUsers -DangerousRights $DangerousRights -SafeOwners $SafeOwners -SafeObjectTypes $SafeObjectTypes -Mode $Mode -UnsafeUsers $UnsafeUsers |
2917 | 2921 | Write-Host 'Identifying AD CS objects with poor access control (ESC5)...' |
|
0 commit comments