-
-
Save H3LL0WORLD/8fa52855c2209da460ea9a0568d6d852 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Create registry Key | |
| New-Item -Path "HKCU:\Software\Locky" -ItemType Key | |
| # Setting ACL | |
| $a = whoami | |
| $acl = Get-Acl HKCU:\SOFTWARE\Locky | |
| $rule = New-Object System.Security.AccessControl.RegistryAccessRule ($a,"FullControl","Deny") | |
| $acl.SetAccessRule($rule) | |
| $acl | Set-Acl -Path HKCU:\SOFTWARE\Locky |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment