User:Misc/Hardening checklist

From FedoraProject

< User:Misc(Difference between revisions)
Jump to: navigation, search
Line 10: Line 10:
 
** block path ( like /home ) ( ReadOnlyDirectories= , InaccessibleDirectories= )
 
** block path ( like /home ) ( ReadOnlyDirectories= , InaccessibleDirectories= )
 
** block the number of process to run ( LimitNPROC=1 )
 
** block the number of process to run ( LimitNPROC=1 )
 +
** block capability to regain privileges ( NoNewPrivileges= )
  
 
* check if a daemon do not have a selinux policy or not
 
* check if a daemon do not have a selinux policy or not

Revision as of 10:59, 3 March 2013

List of check for security hardening of a package

  • inspect service file ( http://0pointer.de/blog/projects/security.html )
    • private tmp, ( PrivateTmp=true )
    • private network ( PrivateNetwork= )
    • block syscall ( SystemCallFilter= )
    • block device ( DeviceAllow= )
    • block path ( like /home ) ( ReadOnlyDirectories= , InaccessibleDirectories= )
    • block the number of process to run ( LimitNPROC=1 )
    • block capability to regain privileges ( NoNewPrivileges= )
  • check if a daemon do not have a selinux policy or not
    • check with ps faxZ if run with "system_u:system_r:initrc_t:s0" domain
  • inspect rpmlint error about insecure file usage & insecure API ( need git HEAD version )
    • check of initgroups/setuid/setgroup order
    • check for chdir before chroot
    • check for compile flags properly added
  • check if daemon is run as root with ps fax
  • check if daemon drop caps, with pscap, if run as root
    • use CapabilityBoundingSet= in service file to reduce them if possible
  • check if started by default if network facing
  • check if package is up to date
  • check file permission
    • check log file permission ( read )
    • check where the service can write
    • check if password are not readable