scipag / HardeningKitty

HardeningKitty - Checks and hardens your Windows configuration
MIT License
1.29k stars 158 forks source link

Update Invoke-HardeningKitty.ps1 for Windows server 2019 finding list #14

Closed flambye94 closed 2 years ago

flambye94 commented 2 years ago

I update the Powershell script. I update the comment and I verify with a function the $result. I am figuring out that $Result can appear null or empty and cause a bug. You can quickly debug with echo "$result" that will appear empty

The bug is in the Powershell script at line 1327:

"You cannot call a method on a null-valued expression.
-> Details here: 
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull"

This bug can be replicated using the finding list cis_microsoft_windows_server_2019_1809_1.2.1_machine.csv on a windows server 2019 environment. It will appear on the ID:

0x6d69636b commented 2 years ago

Thank you very much for the pull request. This is the stable branch of HardeningKitty and the script is signed, therefore we cannot accept pull requests. Please send it to the development branch on https://github.com/0x6d69636b/windows_hardening

flambye94 commented 2 years ago

Just added to the development branch https://github.com/0x6d69636b/windows_hardening