Skip to content

Instantly share code, notes, and snippets.

@H3LL0WORLD
Forked from x0rz/locky.ps1
Created September 1, 2016 11:42
Show Gist options
  • Select an option

  • Save H3LL0WORLD/8fa52855c2209da460ea9a0568d6d852 to your computer and use it in GitHub Desktop.

Select an option

Save H3LL0WORLD/8fa52855c2209da460ea9a0568d6d852 to your computer and use it in GitHub Desktop.
# 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