scipag / HardeningKitty

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

Check how to execute the function Create a Group Policy (experimental) added from v0.91 #50

Closed hitoshi-yamaguchi closed 3 weeks ago

hitoshi-yamaguchi commented 6 months ago

The function Create a Group Policy (experimental) has been added since v0.91. Could you please confirm how to execute it?

Invoke-HardeningKitty -Mode GPO -FileFindingList .\lists\finding_list_0x6d69636b_machine.csv -GPOName HardeningKitty-Machine-01

If you specify an appropriate name in the -GPOName part of the above command, the following error will occur. Get-GPRegistryValue: I get a message that there is no GPO named xxx in my domain.

Also, if you specify an existing GPO, a message will appear stating that you do not have access rights.

Is it actually a command that creates a domain policy? How should I specify how to apply it to local policy?

0x6d69636b commented 6 months ago

Please make sure that the user has the permission to create/modify group policies.

The command in your example is correct. Hardening Kitty has currently no support to create local group policies, see https://github.com/scipag/HardeningKitty/issues/41

hitoshi-yamaguchi commented 6 months ago

bummer, I wanted to change the local group policy all at once, but I'm thinking of another method.

0x6d69636b commented 6 months ago

You can change the settings locally on a system in Hail Mary mode, but your configuration will not be visible in the local Group Policy Editor

hitoshi-yamaguchi commented 6 months ago

exactry. If you change the local group policy in this state, the one you updated with HailMary will be reverted. I heared that Microsoft doesn't recommend changing the registry directly.