Skip to content

Instantly share code, notes, and snippets.

View healeyio's full-sized avatar

Andrew Healey healeyio

View GitHub Profile
@healeyio
healeyio / locky.ps1
Last active March 26, 2016 14:55 — forked from x0rz/locky.ps1
$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)