From 05f7b18808a106a693212482ea7b77ceae81bd9a Mon Sep 17 00:00:00 2001 From: Emanuel Duss Date: Sat, 18 Dec 2021 16:59:20 +0100 Subject: [PATCH] PowerShell script for finding CLSID --- Test/README.md | 2 +- Test/Test-CLSID.ps1 | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 Test/Test-CLSID.ps1 diff --git a/Test/README.md b/Test/README.md index 1f9fff7..f98896f 100644 --- a/Test/README.md +++ b/Test/README.md @@ -1,6 +1,6 @@ # Testing -To test a list of CLSIDs use [test_clsid.bat](test_clsid.bat). +To test a list of CLSIDs use [test_clsid.bat](test_clsid.bat) or [Test-CLSID.ps1](Test-CLSID.ps1). **NOTE** All our tests were conducted impersonating the `NT AUTHORITY\LOCAL SERVICE`. To have a shell as `NT AUTHORITY\Local Service`, use `psexec` (as Administrator) ``` diff --git a/Test/Test-CLSID.ps1 b/Test/Test-CLSID.ps1 new file mode 100644 index 0000000..e9bbbc8 --- /dev/null +++ b/Test/Test-CLSID.ps1 @@ -0,0 +1,12 @@ +$port = 1000 +$ids = Get-Content -Path "CLSID.list" +ForEach ($id in $ids){ + .\JuicyPotato.exe -z -l $port -c $id >> result.log + If ($?) { + Write-Host "[*] Success! Working CLSID: $id" + $port++ + } + Else { + Write-Host "[*] Sad, Non-working CLSID: $id" + } +}