8000 Explicit permissions - remove inheritance/lock down to admins · Issue #398 · chocolatey/choco · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Explicit permissions - remove inheritance/lock down to admins #398
Closed
@ferventcoder

Description

@ferventcoder

This further restricts the default installation location by removing all permissions and inheritance of permissions, explicitly giving Administrator/LocalSystem to Full access, and Users are granted Read and Execute.
In prior installations, we ensured Modify access to the installing user, but that has been removed for security reasons. Should you need the previous behavior, set $env:ChocolateyInstallAllowCurrentUser="true".

  • If non-default install location, skip changing security entirely with a warning for user to do that themselves
  • If attempting to install to default location without administrative token, throw an error
  • Remove inheritance with no copy of existing inherited permissions
  • Remove all existing explicit permissions
  • Explicitly set permissions to Administrators/SYSTEM Full "(OI)(CI)(F)", Users Read/Execute "(OI)(CI)(RX)"
  • Replace ACL Owner with Administrators
  • Do not set user modify without an explicit environment variable - $env:ChocolateyInstallAllowCurrentUser="true".

I owe @jberezanski a debt of gratitude for his tireless work in providing code, examples and testing all the scenarios to find security holes.

Details

https://github.com/chocolatey/choco/blob/master/nuget/chocolatey/tools/chocolateysetup.psm1#L174-L186

http://stackoverflow.com/questions/10970957/changing-permissions-with-powershell-doesnt-propogate-to-children

A non-admin can write to the programdata folder, but they cannot modify or append to existing files. They are also not able to delete existing files they did not put there (and possibly not even those files).

Lock down the default folder even more so that by default, non-admins can not even write to the folder.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0