Protect against execution of uncontrolled files or libraries
Common steps for all models
Identify all directories containing executables and all single executables in other directories. Also, identify all directories containing dynamically linked libraries and all such single library files in other directories. As long as the most important directories, e.g. /sbin, /bin, /usr/sbin, /usr/bin, and files, e.g. /lib/*.so* and /usr/lib/*.so* are included, you can find the rest with trial and error later.
Attention: If you miss an important directory or file during identification or attribute setting, the system might become unaccessible, because important programs cannot be executed or important libraries cannot be mmapped for execution!
FF solution
Remove add_inherited flag for all identified directories.
Remove add_inherited flag for all identified separate executables and libraries
Set no_execute flag on top dir
Without add_inherited, the no_execute flag is not inherited and thus not applied to the identified dirs and separate executables
RC solution
Perform steps 1-5 from RC solution 2. Make a similar setup for library directories and files with another type 'Libraries'.
Remove EXECUTE and MAP_EXEC rights to all types other than 'Executables' and 'Libraries' from all roles. For setup checking, remove the right for your Role Admin last and first try other roles.
ACL solution
Grant rights SEARCH and EXECUTE to group 0 ('Everyone') for all identified directories and files.
If you need to READ_OPEN the files, e.g. libraries or scripts, add rights READ_OPEN and CLOSE.
For filename completion in the shell, you need READ right, possibly also GET_STATUS_DATA or GET_PERMISSIONS_DATA.
Remove right EXECUTE from the inheritance mask of the root dir / or from all entries in the default FD acl.
If you have individual ACL entries at any directory or file other than the identified ones, revoke EXECUTE right from them. You can find all ACL entries with acl_tlist -r.
As the SUPERVISOR right includes all other rights and can (usually) not be masked out, all subjects with SUPERVISOR still have full access. In the standard setup, only user 400 (Security Officer etc.) has this right to the FD default ACL (and thus to all files, fifos and directories).
//
documentation/administration_examples/protection_against_execution.txt · Last modified: 2006/05/02 13:40 by 127.0.0.1
documentation/administration_examples/protection_against_execution.txt · Last modified: 2006/05/02 13:40 by 127.0.0.1
This website is kindly hosted by m-privacy