Skip to content

Commit 691a6fc

Browse files
committed
Fixing osqueryd permissions on windows
1 parent 46b114f commit 691a6fc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pkg/windows/osqueryd_safe_permissions.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@
2727
$acl.RemoveAccessRuleAll($accessrule)
2828
set-acl -aclobject $acl $osqueryd_path
2929

30+
$group = "ALL APPLICATION PACKAGES"
31+
$acl = Get-Acl $osqueryd_path
32+
$inherit =[system.security.accesscontrol.InheritanceFlags]"ContainerInherit,ObjectInherit"
33+
$propagation =[system.security.accesscontrol.PropagationFlags]"None"
34+
$accessrule = New-Object System.Security.AccessControl.FileSystemAccessRule($group,"Write", $inherit, $Propagation ,,,"Deny")
35+
$acl.AddAccessRule($accessrule)
36+
set-acl -aclobject $acl $osqueryd_path
37+
3038
$group = "ALL RESTRICTED APPLICATION PACKAGES"
3139
$acl = Get-Acl $osqueryd_path
3240
$inherit =[system.security.accesscontrol.InheritanceFlags]"ContainerInherit,ObjectInherit"

0 commit comments

Comments
 (0)