OS Audit In General • Some common OS Audit topics: - Manage user accounts - OS update - Enable firewall - Disable guest account - Monitor logs - Check file permissions - Manage services - Hardening
Manage User Accounts • User Management becomes a critical consideration when you want to add multiple users to the system • If the user management on your system is not effective, you may have to compromise the security and access of the private and sensitive information residing on your system
User Database • Stored in /etc/passwd • Each line contains the account information for a single user: - Username - UID - GID - Home directory - Default shell
Linux Patching • As with Windows, patches for the Linux OS and its applications and libraries are released often • Tools: - Debian (including Ubuntu): apt-get/aptitude - RHEL, Fedora, CentOS: yum
Accounts • Delete/disable unnecessary accounts - Users settings GUI - useradd/userdel commands • Never have any account with no/default password - Change all passwords to good ones • Account policies: - /etc/pam.d/common-password – password policies -change command - used to view/set password expiration options of individual users
Logging • Most log files are text files located in /var/log: - auth.log- account log in and log out - lastlog- binary file used by lastlog program to display most recent log in of all users - wtmp- binary file used by last program to display listing of last users logged in • Certain applications also store their logs in subdirectories in /var/log: - Apache, mysql, etc
Services • Delete/disable unnecessary services and programs - The services GUI - Starting/stopping of all services is controlled by scripts in /etc/rcX.d (where X is a run level 0-6) - Use invoke-rc.d program to start/stop services immediately sudo invoke-rc.d apache2 stop - Use update-rc.d program to enable/disable a service at boot time
Host-based Firewall • Block all unnecessary/unauthorized traffic • Allow traffic to necessary services • Other network security options: - TCP Wrappers- network access control list - PortSentry- protect against port scans
Mandatory Access Controls • Users (thorough file permissions) can define discretionary access controls (DAC) on files • Mandatory Access Controls (MAC) are rules enforced by the system regardless of the users’ DAC • Several on-going projects: - Security-Enhanced Linux - GRSecurity - Linux Intrusion Detection System - Rule-Set Based Access Control
SELinux • Project originally developed by National Security Agency to implement Mandatory Access Controls within the Linux Kernel • Incorporated into 2.6 Linux kernel • System Checks DAC then MAC policy before granting access to a resource • Ubuntu supports SELinux (but it is not installed by default)
Software Containers: The Complete Guide to Virtualization Technology. Create, Use and Deploy Scalable Software with Docker and Kubernetes. Includes Docker and Kubernetes.