Skip to content

Instantly share code, notes, and snippets.

@healeyio
Forked from x0rz/locky.ps1
Last active March 26, 2016 14:55
Show Gist options
  • Save healeyio/1b646298fc33cb5b7638 to your computer and use it in GitHub Desktop.
Save healeyio/1b646298fc33cb5b7638 to your computer and use it in GitHub Desktop.
$key = "HKCU:\SOFTWARE\Locky"
If ((Test-Path $key) -ne $true) {
# Create registry Key
New-Item -Path $key -ItemType Key
# Setting ACL
$a = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name
$acl = Get-Acl $key
$rule = New-Object System.Security.AccessControl.RegistryAccessRule ($a,"FullControl","Deny")
$acl.SetAccessRule($rule)
$acl | Set-Acl -Path $key
}
@healeyio
Copy link
Author

Probably not likely to work as locky (reportedly) now has an alternate registry key.
https://twitter.com/x0rz/status/713437408205926400

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment