From 8969184998a077719c27e9df483b28b7ea77179b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 03:10:53 +0000 Subject: [PATCH 1/9] Bump System.Text.RegularExpressions in /winPEAS/winPEASexe/winPEAS Bumps System.Text.RegularExpressions from 4.3.0 to 4.3.1. --- updated-dependencies: - dependency-name: System.Text.RegularExpressions dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- winPEAS/winPEASexe/winPEAS/App.config | 160 +++++++++++++++++++++ winPEAS/winPEASexe/winPEAS/packages.config | 2 +- winPEAS/winPEASexe/winPEAS/winPEAS.csproj | 5 +- 3 files changed, 163 insertions(+), 4 deletions(-) mode change 100755 => 100644 winPEAS/winPEASexe/winPEAS/App.config mode change 100755 => 100644 winPEAS/winPEASexe/winPEAS/winPEAS.csproj diff --git a/winPEAS/winPEASexe/winPEAS/App.config b/winPEAS/winPEASexe/winPEAS/App.config old mode 100755 new mode 100644 index 2177a05..bd32e42 --- a/winPEAS/winPEASexe/winPEAS/App.config +++ b/winPEAS/winPEASexe/winPEAS/App.config @@ -14,6 +14,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/winPEAS/winPEASexe/winPEAS/packages.config b/winPEAS/winPEASexe/winPEAS/packages.config index 5504070..df86cc8 100644 --- a/winPEAS/winPEASexe/winPEAS/packages.config +++ b/winPEAS/winPEASexe/winPEAS/packages.config @@ -56,7 +56,7 @@ - + diff --git a/winPEAS/winPEASexe/winPEAS/winPEAS.csproj b/winPEAS/winPEASexe/winPEAS/winPEAS.csproj old mode 100755 new mode 100644 index bfb8d5f..fb97ebf --- a/winPEAS/winPEASexe/winPEAS/winPEAS.csproj +++ b/winPEAS/winPEASexe/winPEAS/winPEAS.csproj @@ -284,9 +284,8 @@ ..\packages\System.Text.Encodings.Web.8.0.0\lib\net462\System.Text.Encodings.Web.dll - - ..\packages\System.Text.RegularExpressions.4.3.0\lib\net463\System.Text.RegularExpressions.dll - True + + ..\packages\System.Text.RegularExpressions.4.3.1\lib\net463\System.Text.RegularExpressions.dll True From bc732d64580c4da2d2bd6b8da9a44695dd251d88 Mon Sep 17 00:00:00 2001 From: SirBroccoli Date: Tue, 1 Oct 2024 05:13:26 +0200 Subject: [PATCH 2/9] Update CI-master_tests.yml --- .github/workflows/CI-master_tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI-master_tests.yml b/.github/workflows/CI-master_tests.yml index 2ae5658..83eee4d 100644 --- a/.github/workflows/CI-master_tests.yml +++ b/.github/workflows/CI-master_tests.yml @@ -47,12 +47,12 @@ jobs: run: nuget restore $env:Solution_Path # build - #- name: run MSBuild - # run: msbuild $env:Solution_Path + - name: run MSBuild + run: msbuild $env:Solution_Path # Execute all unit tests in the solution - #- name: Execute unit tests - # run: dotnet test $env:Solution_Path + - name: Execute unit tests + run: dotnet test $env:Solution_Path # Build & update all versions - name: Build all versions From c5775dda5931654925d26684f777ce0c13551878 Mon Sep 17 00:00:00 2001 From: SirBroccoli Date: Tue, 1 Oct 2024 05:20:42 +0200 Subject: [PATCH 3/9] Update CI-master_tests.yml --- .github/workflows/CI-master_tests.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI-master_tests.yml b/.github/workflows/CI-master_tests.yml index 83eee4d..2611535 100644 --- a/.github/workflows/CI-master_tests.yml +++ b/.github/workflows/CI-master_tests.yml @@ -51,8 +51,8 @@ jobs: run: msbuild $env:Solution_Path # Execute all unit tests in the solution - - name: Execute unit tests - run: dotnet test $env:Solution_Path + #- name: Execute unit tests + # run: dotnet test $env:Solution_Path # Build & update all versions - name: Build all versions @@ -66,6 +66,9 @@ jobs: echo "build Any CPU" msbuild -m $env:Solution_Path /t:Rebuild /p:Configuration=$env:Configuration /p:Platform="Any CPU" + - name: Execute winpeas + run: winPEAS\winPEASexe\winPEAS\bin\$env:Configuration\winPEAS.exe + # Copy the built versions - name: Copy all versions run: | From d37ebda1b5252d0ffb76c349d5e45702fa1ded85 Mon Sep 17 00:00:00 2001 From: SirBroccoli Date: Tue, 1 Oct 2024 05:27:30 +0200 Subject: [PATCH 4/9] Update CI-master_tests.yml --- .github/workflows/CI-master_tests.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI-master_tests.yml b/.github/workflows/CI-master_tests.yml index 2611535..a100260 100644 --- a/.github/workflows/CI-master_tests.yml +++ b/.github/workflows/CI-master_tests.yml @@ -66,8 +66,16 @@ jobs: echo "build Any CPU" msbuild -m $env:Solution_Path /t:Rebuild /p:Configuration=$env:Configuration /p:Platform="Any CPU" - - name: Execute winpeas - run: winPEAS\winPEASexe\winPEAS\bin\$env:Configuration\winPEAS.exe + - name: Execute winPEAS + shell: pwsh + run: | + $Configuration = "Release" + $exePath = "winPEAS/winPEASexe/winPEAS/bin/$Configuration/winPEAS.exe" + if (Test-Path $exePath) { + & $exePath + } else { + Write-Error "winPEAS.exe not found at $exePath" + } # Copy the built versions - name: Copy all versions From e6e1145be6bd706fbe82ac3309fbcda5e3853bf9 Mon Sep 17 00:00:00 2001 From: SirBroccoli Date: Tue, 1 Oct 2024 11:29:39 +0200 Subject: [PATCH 5/9] Update CI-master_tests.yml --- .github/workflows/CI-master_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI-master_tests.yml b/.github/workflows/CI-master_tests.yml index a100260..433ce33 100644 --- a/.github/workflows/CI-master_tests.yml +++ b/.github/workflows/CI-master_tests.yml @@ -72,7 +72,7 @@ jobs: $Configuration = "Release" $exePath = "winPEAS/winPEASexe/winPEAS/bin/$Configuration/winPEAS.exe" if (Test-Path $exePath) { - & $exePath + & $exePath -h } else { Write-Error "winPEAS.exe not found at $exePath" } From 6fa12e07f10232b6074ce3e9355a400083ccff75 Mon Sep 17 00:00:00 2001 From: SirBroccoli Date: Tue, 1 Oct 2024 11:57:11 +0200 Subject: [PATCH 6/9] Update CI-master_tests.yml --- .github/workflows/CI-master_tests.yml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI-master_tests.yml b/.github/workflows/CI-master_tests.yml index 433ce33..cf97d24 100644 --- a/.github/workflows/CI-master_tests.yml +++ b/.github/workflows/CI-master_tests.yml @@ -66,7 +66,7 @@ jobs: echo "build Any CPU" msbuild -m $env:Solution_Path /t:Rebuild /p:Configuration=$env:Configuration /p:Platform="Any CPU" - - name: Execute winPEAS + - name: Execute winPEAS -h shell: pwsh run: | $Configuration = "Release" @@ -76,6 +76,28 @@ jobs: } else { Write-Error "winPEAS.exe not found at $exePath" } + + - name: Execute winPEAS domain + shell: pwsh + run: | + $Configuration = "Release" + $exePath = "winPEAS/winPEASexe/winPEAS/bin/$Configuration/winPEAS.exe" + if (Test-Path $exePath) { + & $exePath domain + } else { + Write-Error "winPEAS.exe not found at $exePath" + } + + - name: Execute winPEAS systeminfo + shell: pwsh + run: | + $Configuration = "Release" + $exePath = "winPEAS/winPEASexe/winPEAS/bin/$Configuration/winPEAS.exe" + if (Test-Path $exePath) { + & $exePath systeminfo + } else { + Write-Error "winPEAS.exe not found at $exePath" + } # Copy the built versions - name: Copy all versions From 6854d3ae30c73a9650b289540eb03b7bd89aca40 Mon Sep 17 00:00:00 2001 From: SirBroccoli Date: Tue, 1 Oct 2024 13:16:13 +0200 Subject: [PATCH 7/9] Update CI-master_tests.yml --- .github/workflows/CI-master_tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI-master_tests.yml b/.github/workflows/CI-master_tests.yml index cf97d24..06354bf 100644 --- a/.github/workflows/CI-master_tests.yml +++ b/.github/workflows/CI-master_tests.yml @@ -77,13 +77,13 @@ jobs: Write-Error "winPEAS.exe not found at $exePath" } - - name: Execute winPEAS domain + - name: Execute winPEAS cloudinfo shell: pwsh run: | $Configuration = "Release" $exePath = "winPEAS/winPEASexe/winPEAS/bin/$Configuration/winPEAS.exe" if (Test-Path $exePath) { - & $exePath domain + & $exePath cloudinfo } else { Write-Error "winPEAS.exe not found at $exePath" } From ac6b5a9add2ad7862d3b4048d970ec37d583ad8b Mon Sep 17 00:00:00 2001 From: RandolphConley <66429499+RandolphConley@users.noreply.github.com> Date: Tue, 1 Oct 2024 09:18:48 -0400 Subject: [PATCH 8/9] Updated code to strip first column and add "group name" header Line 70 comment: This should now work for any language. Command runs whoami group, removes the first two line of output, converts from csv to object, but adds "group name" to the first column. --- winPEAS/winPEASps1/winPEAS.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/winPEAS/winPEASps1/winPEAS.ps1 b/winPEAS/winPEASps1/winPEAS.ps1 index 58bf2eb..9e90302 100644 --- a/winPEAS/winPEASps1/winPEAS.ps1 +++ b/winPEAS/winPEASps1/winPEAS.ps1 @@ -67,7 +67,8 @@ Function Start-ACLCheck { $Identity = @() $Identity += "$env:COMPUTERNAME\$env:USERNAME" if ($ACLObject.Owner -like $Identity ) { Write-Host "$Identity has ownership of $Target" -ForegroundColor Red } - whoami.exe /groups /fo csv | ConvertFrom-Csv | Select-Object -ExpandProperty 'group name' | ForEach-Object { $Identity += $_ } + # This should now work for any language. Command runs whoami group, removes the first two line of output, converts from csv to object, but adds "group name" to the first column. + whoami.exe /groups /fo csv | select-objet -skip 2 | ConvertFrom-Csv -Header 'group name' | Select-Object -ExpandProperty 'group name' | ForEach-Object { $Identity += $_ } $IdentityFound = $false foreach ($i in $Identity) { $permission = $ACLObject.Access | Where-Object { $_.IdentityReference -like $i } @@ -1225,7 +1226,8 @@ Write-Host "Will enumerate SMB Shares and Access if any are available" Get-SmbShare | Get-SmbShareAccess | ForEach-Object { $SMBShareObject = $_ - whoami.exe /groups /fo csv | ConvertFrom-Csv | Select-Object -ExpandProperty 'group name' | ForEach-Object { +# see line 70 for explanation of what this does + whoami.exe /groups /fo csv | select-objet -skip 2 | ConvertFrom-Csv -Header 'group name' | Select-Object -ExpandProperty 'group name' | ForEach-Object { if ($SMBShareObject.AccountName -like $_ -and ($SMBShareObject.AccessRight -like "Full" -or "Change") -and $SMBShareObject.AccessControlType -like "Allow" ) { Write-Host -ForegroundColor red "$($SMBShareObject.AccountName) has $($SMBShareObject.AccessRight) to $($SMBShareObject.Name)" } From 8032abdbfc5791e28ba14547e2924b84d8c81137 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 13:30:11 +0000 Subject: [PATCH 9/9] Bump System.Net.Http from 4.3.0 to 4.3.4 in /winPEAS/winPEASexe/winPEAS Bumps System.Net.Http from 4.3.0 to 4.3.4. --- updated-dependencies: - dependency-name: System.Net.Http dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- winPEAS/winPEASexe/winPEAS/App.config | 2 +- winPEAS/winPEASexe/winPEAS/packages.config | 2 +- winPEAS/winPEASexe/winPEAS/winPEAS.csproj | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/winPEAS/winPEASexe/winPEAS/App.config b/winPEAS/winPEASexe/winPEAS/App.config index bd32e42..1548729 100644 --- a/winPEAS/winPEASexe/winPEAS/App.config +++ b/winPEAS/winPEASexe/winPEAS/App.config @@ -108,7 +108,7 @@ - + diff --git a/winPEAS/winPEASexe/winPEAS/packages.config b/winPEAS/winPEASexe/winPEAS/packages.config index df86cc8..1009216 100644 --- a/winPEAS/winPEASexe/winPEAS/packages.config +++ b/winPEAS/winPEASexe/winPEAS/packages.config @@ -33,7 +33,7 @@ - + diff --git a/winPEAS/winPEASexe/winPEAS/winPEAS.csproj b/winPEAS/winPEASexe/winPEAS/winPEAS.csproj index fb97ebf..2dcd1fd 100644 --- a/winPEAS/winPEASexe/winPEAS/winPEAS.csproj +++ b/winPEAS/winPEASexe/winPEAS/winPEAS.csproj @@ -217,9 +217,8 @@ ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll - - ..\packages\System.Net.Http.4.3.0\lib\net46\System.Net.Http.dll - True + + ..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll True