Operating Systems Unit 5 Removed
Operating Systems Unit 5 Removed
UNIT – 5
SYSTEM PROTECTION & SECURITY
System Protection: Goals of protection, Principles and domain of protection, Access matrix,
Access control, Revocation of access rights.
System Security: Introduction, Program threats, System and network threats, Cryptography
for security, User authentication, implementing security defenses, firewalling to protect
systems and networks, Computer security classification.
Case Studies: Linux, Microsoft Windows.
NOTE:
The main difference between protection and security is that the “Protection” focuses on
internal threats in a computer system while “Security” focuses on external threats to a
computer system.
SYSTEM PROTECTION
GOALS OF PROTECTION
Operating system consists of a collection of objects, hardware or software. Each object
has a unique name and can be accessed through a well-defined set of operations.
Protection problem - ensure that each object is accessed correctly and only by those
processes that are allowed to do so.
1. Obviously to prevent malicious misuse of the system by users or programs.
2. To ensure that each shared resource is used only in accordance with system
policies, which may be set either by system designers or by system administrators.
3. To ensure that errant programs cause the minimal amount of damage possible.
Note:
Protection systems only provide the mechanisms for enforcing policies and ensuring
reliable systems. It is up to administrators and users to implement those mechanisms
effectively.
PRINCIPLES OF PROTECTION
Programs, users and systems should be given just enough privileges to perform their
tasks-
1. The principle of least privilege dictates that programs, users, and systems should be
given just enough privileges to perform their tasks. This ensures that failures do the
least amount of harm and allow the least of harm to be done.
For example, if a program needs special privileges to perform a task, it is better to
make it a SGID program with group ownership of "network" or "backup" or some
other pseudo group, rather than SUID with root ownership. This limits the amount
of damage that can occur if something goes wrong.
DOMAIN OF PROTECTION
A computer can be viewed as a collection of processes and objects (both Hardware &
Software).
The need to know principle states that a process should only have access to those
objects it needs to accomplish its task, and furthermore only in the modes for which it
needs access and only during the time frame when it needs access.
The modes available for a particular object may depend upon its type.
Domain Structure
A protection domain specifies the resources that a process may access.
Each domain defines a set of objects and the types of operations that may be invoked
on each object.
An access right is the ability to execute an operation on an object.
A domain is defined as a set of < object, {access_right_set} > pairs.
Example,
ACCESS MATRIX
General model of protection can be viewed abstractly as a matrix, called as Access
Matrix. The rows of the access matrix represent domains and the columns represent
objects.
Each entry in the matrix consists of a set of access rights.
The entry access(i, j) defines the set of operations that a process executing in domain D i
can invoke on object Oj.
Example 1,
Consider four domains D1 through D4 and four objects – three files F1 through F3 and one laser
printer.
Here, a process executing in domain D 1 can read files F1 and F3. A process executing in domain
D4 has the same privileges as one executing in domain D 1, in addition it can also write onto
files F1 and F3. The laser printer can be accessed only by a process executing in domain D 2.
Access Matrix
The access matrix scheme provides a mechanism for specifying a variety of policies.
Policies of access matrix concerning protection involve which rights should be included
in the (i, j)th entry.
We must also decide the domain in which each process executes. This policy is usually
decided by the operating system.
The Users decide the contents of the access-matrix entries.
Access matrix provides an appropriate mechanism for defining and implementing
strict control for both static and dynamic association between domain and processes.
When we switch a process from one domain to another, we execute an operation
(switch) on an object (the domain).
We can control domain switching by including domains among the objects of the
access matrix.
Processes should be able to switch from one domain (D i) to another domain (Dj) if and
only if a switch right is given to access(i, j).
Example 2,
ACCESS CONTROL
V PRANAV DEPT. OF CSE
ASST. PROFESSOR Sir CRRCOE
SYSTEM SECURITY
INTRODUCTION
THE SECURITY PROBLEM
The most common types of violations include -
PROGRAM THREATS
Program threats are the threats that attack specific programs or are carried and
distributed in programs.
1. Trojan horse
A Trojan horse is a program that secretly performs some maliciousness in addition to
its visible actions.
Some Trojan horses are deliberately written as such, and others are the result of
legitimate programs that have become infected with viruses.
One dangerous opening for Trojan horses is long search paths, and in particular paths
which include the current directory (“.”) as part of the path. If a dangerous program
having the same name as a legitimate program (or a common mis-spelling, such as "sl"
instead of "ls") is placed anywhere on the path, then an unsuspecting user may be
fooled into running the wrong program by mistake.
Another classic Trojan horse is a login emulator, which records a users account name
and password, issues a "password incorrect" message, and then logs off the system. The
user then tries again (with a proper login prompt), logs in successfully, and doesn't
realize that their information has been stolen.
Two solutions to Trojan Horses are to have the system print usage statistics on logouts,
and to require the typing of non-trappable key sequences such as Control-Alt-Delete in
order to log in.
Spyware is a version of a Trojan horse that is often included in "free" software
downloaded off the Internet. Spyware programs generate pop-up browser windows,
and may also accumulate information about the user and deliver it to some central
site. Another common task of spyware is to send out spam e-mail messages, which then
purportedly come from the infected user.
2. Trap Door
A Trap Door is when a designer or a programmer (or hacker) deliberately inserts a
security hole that they can use later to access the system.
Because of the possibility of trap doors, once a system has been in an untrustworthy
state, that system can never be trusted again. Even the backup tapes may contain a
copy of some cleverly hidden back door.
3. Denial of Service
USER AUTHENTICATION
Most authentication methods are based on three general principles –
1. Something the user knows.
2. Something the user has.
3. Something the user is.
Protection, dealt with making sure that only certain users were allowed to perform
certain tasks, i.e. that a users privileges were dependent on his or her identity.
Authentication using Passwords
The most widely used form of authentication is to require the user to type a login name
and a password.
Password protection is easy to understand and easy to implement.
V PRANAV DEPT. OF CSE
ASST. PROFESSOR Sir CRRCOE