13. Operating System Security
13. Operating System Security
Read Chapter 12
1
OS Security Layers
Computer system is viewed as layered system:
− physical hardware at the bottom
− OS including privileged kernel code APIs, and services; in the middle
− and finally user applications and utilities in the top layer
BIOS and possibly other code that is external to, and largely not
visible from kernel but used when booting the system or to support
low-level hardware control
Each layer is vulnerable to attack from below if the lower layers are not
secured appropriately
2
OS Hardening Measures & Strategies
• The 2010 Australian Signals Directorate (ASD) lists the “Strategies to
Mitigate Cyber Security Incidents”.
• Over 85% of the targeted cyber intrusions investigated by ASD in 2009
could have been prevented if just the top four of these strategies are
implemented, which they are:
– White-list approved applications
– Patch third-party applications and operating system vulnerabilities
– Restrict administrative privileges
– Create a defense-in-depth system
• In 2017, the updated list “Essential Eight” added the following items:
• Configure Microsoft Office macro settings
• User application hardening
• Multifactor authentication
• Regular backups
• Collectively these assist in creating a defense-in-depth system
3
Operating System Security
• It is possible for a system to be compromised during the installation
process before it can install the latest patches or implement other
hardening measures.
• Building and deploying a system should be a planned process
designed to counter this threat and to maintain security during its
operational lifetime
• Process must:
– assess risks and plan the system deployment
– secure the underlying operating system and then the key applications
– ensure any critical content is secured
– ensure appropriate network protection mechanisms are used
– ensure appropriate processes are used to maintain security
4
System Security Planning
• The first step in deploying a
new system is planning
6
Operating Systems Hardening
• First critical step in securing a system is to secure the base OS
• Basic steps that should be used to secure an OS
– Install and patch the OS
– Harden and configure the OS to adequately address the identified security needs
of the system by:
– Test the security of the basic OS to ensure that the steps taken adequately
address its security needs
7
Initial Setup Overall The integrity
and source of
boot
and Patching process
must also
any additional
device driver
be secured code must be
carefully
validated
System
security begins Initial
with the installation
installation of should install Critical that the
OS the minimum system be kept up
necessary for to date, with all
the desired critical security
system related patches
installed
Full installation
Ideally new and hardening
process should Should stage and
systems
occur before the validate all
should be
system is patches on the test
constructed
deployed to its systems before
on a protected
intended location deploying them in
network
production 8
Remove Unnecessary Services
• if fewer software packages are available to run the risk is reduced
• system planning process should identify what is actually required
for a given system
• when performing the initial installation the supplied defaults
should not be used
– default configuration is set to maximize ease of use and functionality rather
than security
– if additional packages are needed later they can be installed when they are
required
9
Configure Users and Privileges
• Not all users with access to a system will have the same access to all
data and resources on that system
• Elevated privileges should be restricted to only those users that
require them, and then only when they are needed to perform a task
• System planning process should consider:
– categories of users on the system
– privileges they have
– types of information they can access
12
Application Security- Application Configuration
• Once OS is installed and appropriately secured, services and
applications must next be installed and configured
• Application configuration may include:
– Creating and specifying appropriate data storage areas for application
– Making right changes to application or service default configuration details
• Some applications/services include default data, scripts, user accounts
– These should be reviewed, and only retained if required, and suitably secured.
• Of particular concern with remotely accessed services such as Web
and file transfer services
– should not be granted right to modify files, unless it is specifically required
– common configuration fault: all files supplied by the service owned by same
“user” account that server executes
• Attacker exploit some vulnerability in either server software or script executed (to
modify any of these files)
– Risk from this form of attack is reduced by ensuring that most of the files can
13
only be read, but not written, by the server
Application Security- Encryption Technology
• Encryption is a key enabling technology that may be used to secure
data both in transit and when stored
• Required Encryption technology must be configured and appropriate
cryptographic keys created, signed, and secured
• If secure network services are provided using TLS or IPsec suitable
public and private keys must be generated for each of them
• If secure remote access is provided using SSH, appropriate server and
client keys must be created
• Cryptographic file systems are another use of encryption
14
Security Maintenance
• Once the system is appropriately built, secured, and deployed, the
process of maintaining security is continuous
• Security maintenance includes:
– Monitoring and analyzing logging information
15
Security Maintenance- Logging
• Logging reactive control that can only inform you about bad things
that have already happened
• Effective logging ensures that in event of a system breach or failure,
system administrators can more quickly identify what happened
• Key is to ensure you capture the correct data and then appropriately
monitor and analyze this data
• Information can be generated by the system, network and applications
• Range of data acquired should be determined during the system
planning stage
• Generates significant volumes of information and it is important that
sufficient space is allocated for them
• Automated analysis is preferred
16
Security Maintenance- Data Backup and Archive
• Performing regular backups of data is a critical control that assists
with maintaining integrity of system and user data
– Also, there May be legal or operational requirements for the retention of data
17
Linux/Unix Security: Patch/Configs
• Large range of resources are available to assist administrators
• Patch management: keeping security patches up to date is a widely
recognized and critical control for maintaining security
– Red Hat, Fedora, and CentOS include up2date or yum
– SuSE includes yast
– Debian uses apt-get
19
Linux/Unix Security
Remote access controls, Logging and log rotation, chroot jail
• Remote access controls
– Several host firewall programs (iptables to configure the netfilter
kernel module) or TCP Wrappers (tcpd daemon) may be used
– Most systems provide an administrative utility to select which services will be permitted
to access the system
• Logging and log rotation
– log levels of detail: ranging from debugging (maximum detail) to none
– Should not assume that the default setting is necessarily appropriate
– Applications allow to specify either a dedicated file or a syslog facility to use
when writing log data to /dev/log
• chroot jail: restricts the server’s view of file system to just a specified portion
– Many services (such as FTP) do not require access to full file-system
– uses chroot system call to confine a process by mapping the root of the
filesystem (“/”) to some other directory (e.g., /srv/ftp/public)
– file directories outside the chroot jail aren’t visible or reachable
– main disadvantage is added complexity 20
Windows Security
Patch management, Users administration and access controls
• Patch management: “Windows Update” and “Windows Server Update
Service” assist with regular maintenance and should be used
– Third party applications also provide automatic update support
• Users administration and access controls
– Users and groups are defined with a Security ID (SID).
– Systems implement discretionary access controls (DAC) resources
– ACL has many entries that may grant or deny access rights to a specific SID
– Vista and later systems include mandatory integrity controls
– Objects are labeled as being of low, medium, high, or system integrity level
– System ensures the subject’s integrity is equal or higher than the object’s level
– Implements a form of the Biba Integrity model
– User Account Control (UAC)
• Assists with ensuring users with administrative rights only use them when required,
otherwise accesses the system as a normal user
– Low Privilege Service Accounts
• Used for long-lived service processes such as file, print, and DNS services 21
Windows Security: Application and Service
Configuration, Other security controls, Security Testing
• Application and Service Configuration
– Much of configuration information is centralized in Registry, which forms
database of keys and values that may be queried and interpreted by applications
– Registry keys can be directly modified using the “Registry Editor”: useful for
making bulk changes; changes may also be recorded in a central repository
• Other security controls
– Essential that anti-virus, anti-spyware, personal firewall, and other malware and
attack detection and handling software packages are installed and configured
– Windows include basic firewall and malware countermeasure capabilities
– Important to ensure the set of products in use are compatible
– Windows systems also support a range of cryptographic functions:
• Encrypting files and directories using the Encrypting File System (EFS)
• Full-disk encryption with AES using BitLocker
• Security Testing: “Microsoft Baseline Security Analyzer”
• Free, easy to use tool that checks for compliance with Microsoft’s security
recommendation 22
Virtualization
• Refers to a technology that provides an abstraction of the resources
used by some software which runs in a simulated environment called a
virtual machine (VM)
– provides support for multiple distinct operating systems and associated
applications on one physical system
25
Full Virtualization Variations
• Hosted virtualization systems
– hypervisor executes as just another application on a host OS that is running on
the underlying hardware,
– Seen in clients, where they run along side other applications on the host OS
– Used to support applications for alternate operating system versions or types
Hosted OS run along other apps
26
Container virtualization or application virtualization
• In this recent approach, software known as a virtualization
container, runs on top of the host OS kernel and provides an isolated
execution environment for applications
• Unlike hypervisor-based VMs, containers do not aim to emulate
physical servers
• All containerized applications on a host share a common OS kernel
• For containers, only a small container engine is required as support
for the containers
• Containerization sits in between the OS
and applications and incurs lower
overhead, but potentially introduces
greater security vulnerabilities
27
Virtualization Systems
• In virtualized systems, the available hardware resources must be
appropriately shared among the various guest OS’s
– These include CPU, memory, disk, network, and other attached devices
– CPU and memory are generally partitioned between these, and scheduled as
required
– Disk storage may be partitioned, with each guest having exclusive use of some
disk resources
– Alternatively, a “virtual disk” may be created for each guest, which appears to
it as a physical disk with a full file-system, but is viewed externally as a single
”disk image” file on the underlying file-system
30
• Virtualized systems manage access to hardware resources such as
disk storage and network interfaces.
– This access must be limited to just the appropriate guest OSs that use any
resource
31
32
34