pdqcom / PowerShell-Scanners

A community repository of PowerShell Scanners for PDQ Inventory.
MIT License
182 stars 74 forks source link

TLS-and-SSL-Check-#89 #90

Closed AndrewPla closed 2 years ago

CaseyM-PDQ commented 2 years ago

Tested - Server 2016 returned:

AppDomain         : PDQInventoryConsole.exe
CLR Version       : 4.0.30319.42000
Comments          :  
Computer Name     : S16-CASEY-LAB.lab.adminarsenal.net
ComputerId        : 15
Current AppDomain : PDQInventoryConsole.exe
Database          : C:\ProgramData\Admin Arsenal\PDQ Inventory\Database.db
Date              : 2022-05-16T19:47:32.0860898Z
Email             :  
Entry             : C:\Program Files (x86)\Admin Arsenal\PDQ Inventory\PDQInventoryConsole.exe
Error             : Property Enabled does not exist at path HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Client.
                  :    At line:43 char:10
Error Type        : System.Exception
License Mode      : Enterprise Mode
Manufacturer      : VMware, Inc. (VMware Virtual Platform)
Memory            : 4 GB (206.4 MB free)
PID               : 3484
Process           : PDQInventoryConsole
Product           : PDQ Inventory
Scan Profile*     : Cipher Suite Detection
Scanner*          : detect_ciphers
SentryEnabled     : True
Service Mode      : Server
Service Version   : 19.3.83.0
Subject           : PDQ Inventory Diagnose Report
Version           : 19.3.83.0
Windows           : Microsoft Windows Server 2019 Standard (10.0.17763)

Property Enabled does not exist at path HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Client.
   At line:43 char:10
System.Exception
Scanner*: detect_ciphers
Computer Name: S16-CASEY-LAB.lab.adminarsenal.net
Scan Profile*: Cipher Suite Detection
Service Version: 19.3.83.0
ComputerId: 15
   at AdminArsenal.PDQInventory.PowerShellTargetScanner.ExecuteAndSaveResults(String script, SqliteConnection db)
   at AdminArsenal.PDQInventory.PowerShellTargetScanner.Scan()
   at AdminArsenal.PDQInventory.Program.Main(String[] args)

Server 2012r2 returned:

AppDomain         : PDQInventoryConsole.exe
CLR Version       : 4.0.30319.42000
Comments          :  
Computer Name     : s12r2-Casey-Lab.lab.adminarsenal.net
ComputerId        : 18
Current AppDomain : PDQInventoryConsole.exe
Database          : C:\ProgramData\Admin Arsenal\PDQ Inventory\Database.db
Date              : 2022-05-16T19:47:29.5072118Z
Email             :  
Entry             : C:\Program Files (x86)\Admin Arsenal\PDQ Inventory\PDQInventoryConsole.exe
Error             : The term 'Get-ItemPropertyValue' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
                  :    At line:43 char:10
Error Type        : System.Exception
License Mode      : Enterprise Mode
Manufacturer      : VMware, Inc. (VMware Virtual Platform)
Memory            : 4 GB (143.7 MB free)
PID               : 3484
Process           : PDQInventoryConsole
Product           : PDQ Inventory
Scan Profile*     : Cipher Suite Detection
Scanner*          : detect_ciphers
SentryEnabled     : True
Service Mode      : Server
Service Version   : 19.3.83.0
Subject           : PDQ Inventory Diagnose Report
Version           : 19.3.83.0
Windows           : Microsoft Windows Server 2019 Standard (10.0.17763)

The term 'Get-ItemPropertyValue' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
   At line:43 char:10
System.Exception
Scanner*: detect_ciphers
Computer Name: s12r2-Casey-Lab.lab.adminarsenal.net
Scan Profile*: Cipher Suite Detection
Service Version: 19.3.83.0
ComputerId: 18
   at AdminArsenal.PDQInventory.PowerShellTargetScanner.ExecuteAndSaveResults(String script, SqliteConnection db)
   at AdminArsenal.PDQInventory.PowerShellTargetScanner.Scan()
   at AdminArsenal.PDQInventory.Program.Main(String[] args)
CaseyM-PDQ commented 2 years ago

Instead of Get-ItemPropertyValue... try using Get-ItemProperty instead to avoid the second error. Check out this for an example: https://github.com/AutomatedLab/AutomatedLab/commit/578cb1c51dfc57136df7acd6ff09e742e024ece0

AndrewPla commented 2 years ago

Closing this because this scanner is being modified in #93 to address 2 issues.