itm4n / PrivescCheck

Privilege Escalation Enumeration Script for Windows
BSD 3-Clause "New" or "Revised" License
2.91k stars 422 forks source link

Error on Windows 11 #29

Closed init5-SF closed 2 years ago

init5-SF commented 2 years ago

hey, I got this when I ran the latest version of the script (with and without -extended):

Get-ItemProperty : Specified cast is not valid.
At line:787 char:26
+ ... roperties = Get-ItemProperty -Path "Registry::$ServiceRegPath" -Error ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-ItemProperty], InvalidCastException
    + FullyQualifiedErrorId : System.InvalidCastException,Microsoft.PowerShell.Commands.GetItemPropertyCommand

Powershell 5.1 Windows 11 (21H2) 64bit

Let me know if more details are needed! Cheers

itm4n commented 2 years ago

Hi! Thank you for reporting this issue. I haven't tested the script on Windows 11 yet to be honest. But it looks like it will be more painful than I anticipated.

itm4n commented 2 years ago

Hello, I tested the script on a freshly installed Windows 11 VM and it runs very smoothly. I think the problem you encountered is caused by a specific service configuration. It's not related to the version of the OS. Therefore, I will need more information. Maybe, if you use the -Verbose mode, you might be able to pinpoint exactly which service causes this error.

itm4n commented 2 years ago

No news, closing the issue.