Week 07 Slides
Week 07 Slides
Computer Security I
<MEETING TIME AND INSTRUCTOR>
WEEK 7
1
Operating System
Security
CH. 12
What is “hardening”?
Hardening is the process of strengthening the security of an operating system and the services
that run on it.
◦ One of the primary duties of many security professionals.
◦ A multi-step process, requiring knowledge of many areas of system and network operation
◦ Will require us to integrate all the knowledge we have learned so far.
3
Big Picture
The security professional needs a good overall feel for the characteristic weak spots of each
operating system….
…in order to deploy the most
needful and effective defense
measures first.
Hardening activities are done at all
three layers.
Only the top layer may seem to be
exposed to direct attack; however,
a compromised lower layer can
make the upper layers an easy
target.
4
Planning
As emphasized throughout this course, security does not happen when we just deploy different
defensive measures at random.
In OS hardening, the watchword of planning is:
“What is the system used for?”
The set of factors for planning system hardening includes:
◦ Type of information to be stored on the system and its sensitivity level
◦ The applications and services provided and their security requirements
◦ Categories of users of the system and what types of access and privileges each will have.
◦ How users are authenticated
◦ What access the system has to information and services on other hosts
◦ Who will administer the system, and whether it will be managed remotely or locally.
5
The hardening process
We will discuss 6 types of activity, in the order they should be approached.
6
Hardening I: Initial Setup and Patching
A networked system is vulnerable to exploit during its
installation.
◦ A newly-installed system is in an unpatched state
◦ Many operations run with elevated privileges during installation.
7
Initial Setup and Patching (cont’d)
3) Install only the minimum number of services and software packages required for the system
to fulfill its role.
◦ An instance of minimizing the attack surface.
◦ Of course, this must be balanced against usability of the system.
4) As soon as the system can be brought online, update the OS and all installed applications to
the latest patches, and record and implement the system’s patching policy.
◦ Automatic install of every update may not always be the best policy, especially if the system has high
availability requirements.
8
Hardening II: Remove unnecessary
services, applications, and protocols
Oftentimes you will not have access to a system to harden it at the time of installation. That’s
where this step comes in.
Because any software package running on the machine may contain vulnerabilities, the fewer
there are, the more risk is reduced.
This is less secure than choosing not to install unnecessary software in the first place.
◦ The system may be compromised before a vulnerable application has been removed.
9
Hardening III: Configure Users, Groups,
and Authentication
This phase concerns the implementation of access control and authentication, the two pillars of
system security.
1) In the planning phase, should consider categories of users and the privileges they should and
should not have.
2) Decide whether users and groups are specified and authenticated locally or from a centralized
authentication server.
3) Restrict elevated privileges to users that require them.
4) Default accounts should be secured.
◦ Passwords changed from the defaults!
◦ Unnecessary default accounts should be disabled/deleted.
10
Hardening IV: Configure resource
controls
This is the resource-focused, rather than user-focused, aspect of access control.
◦ Limit which users can execute certain programs, especially system services.
◦ Limit which users can access, add, or remove system devices.
◦ Limit which users can read or write certain directory trees. (Example: web server
directories, shared data directories)
◦ If the system has databases, set which users can access these.
11
Hardening V: Install defensive tools
Host-based firewall
IDS
IPS
Anti-virus
The planning phase should determine which of these are appropriate for the system.
12
Hardening VI: Test the system’s security
Systematic records should be kept of each activity of the previous phases.
Then, a checklist should be assembled for testing each of the aspects of security.
While executing the list, make additional records of any unexpected behavior.
Use of scanning or vulnerability testing tools may be appropriate.
Penetration tests are sometimes called for, but can leave a production system in a less secure
state. They are usually done against whole networks.
A report of the process and test results should be produced and stored in a secure external
location.
13
Maintenance
The process of host-based security does not end after the initial hardening
procedure.
Security maintenance includes:
◦ Monitoring and analyzing logging information
◦ Performing regular backups
◦ Recovering from security compromises
◦ Regularly testing system security
◦ Using appropriate software maintenance processes to patch and update all critical software,
and to monitor and revise configurations as needed
14
Hardening through Encryption
Encryption is a key enabling technology that may be used to secure data both in transit and
when stored.
◦ However, encryption is not a “magic bullet” for security.
Messaging encryption 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 network services are provided using SSH, appropriate server and client keys must be created
Disk encryption is used to prevent physical access to the data on a locked or powered-
down machine.
15
Linux Security Overview
16
Aspects of securing Linux/Unix systems
Patching
◦ “Linux”, properly speaking, is just a kernel. A complete Linux-based operating system is an amalgam of
open-source software packages from a variety of sources, assembled into a distribution.
◦ Distribution maintainers have the responsibility to take security patches from “upstream” source and
push them as OS updates
◦ Important to choose a distribution with a good security record (and possibly paying for support).
17
Aspects of securing Linux/Unix systems (2)
Logging
Logging has been an intrinsic part of Unix operating systems from the beginning.
They are a great help to the security administrator, if you know how to use them.
18
Common Linux security weak points
Remote exploits through server programs written in C or C++.
Lax permission settings due to the coarse-grained nature of traditional Unix permissions may
leave the system vulnerable to attack, including insider attacks.
◦ Newer Unix systems use ACLs for more fine-grained permissions; but they are still not so commonly
used.
19
Unix Security Technology: chroot jails
Started from BSD operating system
• Restricts the server’s view of the file system to just a specified portion
• Uses chroot system call to confine a process by mapping the root of the filesystem to some
other directory
• File directories outside the chroot jail aren’t visible or reachable
• Main disadvantage is added complexity
20
SELinux
The SELinux (Security Enhanced Linux) project allows for increasing the default
security and implementing more sophisticated access control policies on Linux
installations.
It provides elements of Mandatory Access Control and RBAC.
https://selinuxproject.org/page/Main_Page
21
Windows
Security
Overview
22
Aspects of securing Windows systems
Application and Service Configuration
Windows stores application as well as OS configuration parameters in a centralized database
known as the registry.
◦ Changing application settings through its GUI will modify the registry
◦ Sets of configuration settings can be stored in .reg “hive files” and merged into the registry.
Defensive tools
Built-in firewall enabled by default, freely available anti-virus
◦ May need to augment these with more robust commercial solutions
◦ One possible concern is unpredictable/undesirable interactions between products from different
vendors.
23
Aspects of securing Windows systems (2)
Administration and Access Control
ACL-based permissions allow more fine-grained control and also have generally sensible defaults
regarding, e.g., permissions inheritance
User Account Control (UAC)
◦ Assists with ensuring users with administrative rights only use them when required, otherwise accesses
the system as a normal user
◦ Example of the principle of minimum privilege
Can also implement Mandatory Access Controls (MAC) with security labels.
24
Common Windows security weak points
Due to its prevalence as a desktop operating system, the majority of malware in existence
targets Windows.
◦ Recall that the Stuxnet malware targeted Windows machines controlling nuclear facilities.
25
Mobile Device Security
24.2
What makes mobile device security
difficult?
The threats involved are not essentially different (we have talked about many of them)
◦ Malware, data theft
But the nature mobile devices makes good security policy more difficult to enforce.
From the perspective of wireless networks, mobile devices are a particularly vulnerable
endpoint.
Once upon a time,
Prior to the widespread use of smartphones and tablets,…
Corporate IT security was more controllable.
◦ User devices were Windows desktop PCs
◦ A well-defined perimeter between the internal
network and outside networks
But Now….
More and more organizations implementing “BYOD” policies
Rapid introduction of new devices and new device types
Rapidly changing software stack
Notion of a static network perimeter is dissolving (Cloud-based applications)
Mobile Device Security Issues
Lack of Physical Security Controls
◦ Security policy must be based on the assumption that any
mobile device could be stolen at any time
Location Services
◦ GPS capability may allow attackers to track
devices containing sensitive data
33