OS UNIT 5 Q and A
OS UNIT 5 Q and A
Principles of Protection
• The principle of least privilege dictates that programs, users, and systems 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.
• Typically each user is given their own account, and has only enough privilege to modify
their own files.
• The root account should not be used for normal day to day activities - The System
Administrator should also have an ordinary account, and reserve use of the root account
for only those tasks which need the root privileges
There are several goals of system security. Some of them are as follows:
1. Integrity
Unauthorized users must not be allowed to access the system's objects,
and users with insufficient rights should not modify the system's critical files
and resources.
2. Secrecy
The system's objects must only be available to a small number of
authorized users. The system files should not be accessible to everyone.
3. Availability
All system resources must be accessible to all authorized users, i.e., no single user/process should be
able to consume all system resources. If such a situation arises, service denial may occur. In this
case, malware may restrict system resources and preventing legitimate processes from accessing
them
• The principle of least privilege dictates that programs, users, and systems 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.
• Typically each user is given their own account, and has only enough privilege to modify
their own files.
• The root account should not be used for normal day to day activities - The System
Administrator should also have an ordinary account, and reserve use of the root account
for only those tasks which need the root privileges
Domain of Protection
• A computer can be viewed as a collection of processes and objects (both HW & SW).
• The need to know principle states that a process should only have access to those
objects it needs to accomplish its task,.
• The modes available for a particular object may depend upon its type.
Domain Structure
Access Matrix
The Access Matrix is a security model for a computer system's protection state.An
access matrix is used to specify the permissions of each process running in the domain for each
object. The rows of the matrix represent domains, whereas the columns represent objects.
Every matrix cell reflects a set of access rights granted to domain processes, i.e., each entry (i,
j) describes the set of operations that a domain Di process may invoke on object Oj.
There are various methods of implementing the access matrix in the operating system.
These methods are as follows:
1. Global Table
4. Lock-Key Mechanism
Global Table
It is the most basic access matrix implementation. A set of ordered triples <domain,
object, rights-set> is maintained in a file. When an operation M has been performed on an
object Oj within domain Di, the table is searched for a triple <Di, Oj, Rk>..
Every access matrix column may be used as a single object's access list. It is possible
to delete the blank entries. For each object, the resulting list contains ordered pairs <domain,
rights-set> that define all domains for that object and a nonempty set of access rights.
A domain's capability list is a collection of objects and the actions that can be done on
them. A capacity is a name or address that is used to define an object. If you want to perform
operation M on object Oj, the process runs operation M, specifying the capability for
object Oj. The simple possession of the capability implies that access is allowed.
Lock-Key Mechanism
It is a compromise between the access lists and the capability lists. Each object has a
list of locks, which are special bit patterns. On the other hand, each domain has a set of keys
that are special bit patterns. A domain-based process could only access an object if a domain
has a key that satisfies one of the locks on the object. The process is not allowed to modify its
keys.
In this example, there are 4 domains and objects in the above matrix, and also consider 3 files
(including F1, F2, and F3) and one printer. Files F1 and F3 can be read by a process running
in D1. A process running in domain D4 has the same rights as D1, but it may also write on
files.
Only one process running in domain D2 has access to the printer.
Access control
Access Control involves identifying a user based on their credentials and then
authorizing the appropriate level of access once they are authenticated.
Passwords, pins, security tokens—and even biometric scans—are all credentials
commonly used to identify and authenticate a user. Multifactor authentication (MFA) adds
another layer of security by requiring that users be verified by more than just one
verification method.
Access control
4 Discuss the types of Access and Access controls in Operating System[7M][SET
-2][Dec 2022]
Access control
Access Control involves identifying a user based on their credentials and then
authorizing the appropriate level of access once they are authenticated.
Passwords, pins, security tokens—and even biometric scans—are all credentials
commonly used to identify and authenticate a user. Multifactor authentication (MFA) adds
another layer of security by requiring that users be verified by more than just one
verification method.
Reacquisition - Capabilities are periodically revoked from each domain, which must then re-
acquire them.
Back-pointers - A list of pointers is maintained from each object to each capability which is
held for that object.
Indirection - Capabilities point to an entry in a global table rather than to the object. Access
rights can be revoked by changing or invalidating the table entry, which may affect multiple
processes, which must then re-acquire access rights to continue.
Keys - A unique bit pattern is associated with each capability when created, which can be
neither inspected nor modified by the process.
System security
System security may be threatened through two violations, and these are as follows:
1. Threat
A program that has the potential to harm the system seriously.
2. Attack
A breach of security that allows unauthorized access to a resource.
There are two types of security breaches that can harm the system: malicious and
accidental. Malicious threats are a type of destructive computer code or web script that is
designed to cause system vulnerabilities that lead to back doors and security breaches. On the
other hand, Accidental Threats are comparatively easier to protect against.
Security may be compromised through the breaches. Some of the breaches are as
follows:
1. Breach of integrity
This violation has unauthorized data modification.
2. Theft of service
It involves the unauthorized use of resources.
3. Breach of confidentiality
It involves the unauthorized reading of data.
4. Breach of availability
It involves the unauthorized destruction of data.
5. Denial of service
It includes preventing legitimate use of the system. Some attacks may be
accidental.
There are several goals of system security. Some of them are as follows:
1. Integrity
Unauthorized users must not be allowed to access the system's objects,
and users with insufficient rights should not modify the system's critical files
and resources.
2. Secrecy
The system's objects must only be available to a small number of
authorized users. The system files should not be accessible to everyone.
3. Availability
All system resources must be accessible to all authorized users, i.e., no
single user/process should be able to consume all system resources. If such a
situation arises, service denial may occur. In this case, malware may restrict
system resources and preventing legitimate processes from accessing them.
Program threats
7 Explain in detail about Program Threats[7M] [SET -2][Dec 2023]
Program threats
The operating system's processes and kernel carry out the specified task as directed.
Program Threats occur when a user program causes these processes to do malicious operations.
1.Virus
A virus may replicate itself on the system. Viruses are extremely dangerous and
can modify/delete user files as well as crash computers. A virus is a little piece of code
that is implemented on the system program. As the user interacts with the program, the
virus becomes embedded in other files and programs, potentially rendering the system
inoperable.
2. Trojan Horse
This type of application captures user login credentials. It stores them to transfer
them to a malicious user who can then log in to the computer and access system
resources.
3. Logic Bomb
A logic bomb is a situation in which software only misbehaves when particular
criteria are met; otherwise, it functions normally.
4. Trap Door
A trap door is when a program that is supposed to work as expected has a
security weakness in its code that allows it to do illegal actions without the user's
knowledge.
System Threats
System threats are described as the misuse of system services and network connections
to cause user problems. These threats may be used to trigger the program threats over an entire
network, known as program attacks.Some of them are as follows:
1.Port Scanning
It is a method by which the cracker determines the system's vulnerabilities for
an attack. It is a fully automated process that includes connecting to a specific port via
TCP/IP. To protect the attacker's identity, port scanning attacks are launched through
Zombie Systems, which previously independent systems now serve their owners while
being utilized for such terrible purposes.
2. Worm
The worm is a process that can choke a system's performance by exhausting all system
resources. A Worm process makes several clones, each consuming system resources
and preventing all other processes from getting essential resources. Worm processes
can even bring a network to a halt.
3. Denial of Service
Denial of service attacks usually prevents users from legitimately using the
system. For example, if a denial-of-service attack is executed against the browser's
content settings, a user may be unable to access the internet.
System and network threats
8Define threat. Explain in detail about System and Network Threats[7M] [SET -1][Dec 2023]
System Threats
System threats are described as the misuse of system services and network connections
to cause user problems. These threats may be used to trigger the program threats over an entire
network, known as program attacks.Some of them are as follows:
1.Port Scanning
It is a method by which the cracker determines the system's vulnerabilities for
an attack. It is a fully automated process that includes connecting to a specific port via
TCP/IP. To protect the attacker's identity, port scanning attacks are launched through
Zombie Systems, which previously independent systems now serve their owners while
being utilized for such terrible purposes.
2. Worm
The worm is a process that can choke a system's performance by exhausting all system
resources. A Worm process makes several clones, each consuming system resources
and preventing all other processes from getting essential resources. Worm processes
can even bring a network to a halt.
3. Denial of Service
Denial of service attacks usually prevents users from legitimately using the
system. For example, if a denial-of-service attack is executed against the browser's
content settings, a user may be unable to access the internet.
Network Threats
1. Unauthorized access
4. Authenticity: Authenticity ensures the sender and recipient can verify each
other’s identities and the destination of the message.
Types of Cryptography
Cryptography can be broken down into three different types:
Secret Key Cryptography, or symmetric cryptography, uses a single key to encrypt data.
Both encryption and decryption in symmetric cryptography use the same key, making this the
easiest form of cryptography. Secret Key Examples:
• AES
• DES
• Caesar Cipher
Public Key Cryptography, or asymmetric cryptography, uses two keys to encrypt data.
One is used for encryption, while the other key can decrypts the message. Unlike symmetric
cryptography, if one key is used to encrypt, that same key cannot decrypt the message, rather
the other key shall be used.
One key is kept private, and is called the “private key”, while the other is shared
publicly and can be used by anyone, hence it is known as the “public key”.
Examples:
• ECC
• Diffie-Hellman
• DSS
User authentication
10 How does User Authentication secure the system? Explain[7M] [SET -3][Dec 2023]
User Authentication
User authentication is a method that keeps unauthorized users from accessing sensitive
information. For example, User A only has access to relevant information and cannot see the
sensitive information of User B
1. Password-based authentication
2. Multi-factor authentication
3. Certificate-based authentication
Certificate-based authentication technologies identify users, machines or
devices by using digital certificates. A digital certificate is an electronic document
based on the idea of a driver’s license or a passport.
4. Biometric authentication
Eye scanners—include technologies like iris recognition and retina scanners. Iris
scanners project a bright light towards the eye and search for unique patterns in the colored
ring around the pupil of the eye. The patterns are then compared to approved information stored
in a database. Eye-based authentication may suffer inaccuracies if a person wears glasses or
contact lenses.
5. Token-based authentication
System security
System security may be threatened through two violations, and these are as follows:
1. Threat
A program that has the potential to harm the system seriously.
2. Attack
A breach of security that allows unauthorized access to a resource.
There are two types of security breaches that can harm the system: malicious and
accidental. Malicious threats are a type of destructive computer code or web script that is
designed to cause system vulnerabilities that lead to back doors and security breaches. On the
other hand, Accidental Threats are comparatively easier to protect against.
Security may be compromised through the breaches. Some of the breaches are as
follows:
1. Breach of integrity
This violation has unauthorized data modification.
2. Theft of service
It involves the unauthorized use of resources.
3. Breach of confidentiality
It involves the unauthorized reading of data.
4. Breach of availability
It involves the unauthorized destruction of data.
5. Denial of service
It includes preventing legitimate use of the system. Some attacks may be
accidental.
'firewall' that prevents unauthorized access and keeps our computers and data safe and
secure.
Firewalls are designed in such a way that they can react quickly to detect and counter-
attacks throughout the network.
1. Open Access
2. Network Crashes
In the absence of a firewall, anyone could access our network and shut it
down. It may lead us to invest our valuable time and money to get our network
working again.
Therefore, it is essential to use firewalls and keep our network, computer, and data safe
and secure from
.
Firewalls have become so powerful, and include a variety of functions and capabilities
with built-in features:
o Scalable Performance
o Access Validation
Limitations of Firewall
When it comes to network security, firewalls are considered the first line of defense.
But the question is whether these firewalls are strong enough to make our devices safe from
cyber-attacks. The answer may be "no". The best practice is to use a firewall system when
using the Internet. However, it is important to use other defense systems to help protect the
network and data stored on the computer. Because cyber threats are continually evolving, a
firewall should not be the only consideration for protecting the home network.
o Firewalls cannot protect against non-technical security risks, such as social engineering.
o Firewalls cannot stop or prevent attackers with modems from dialing in to or out of the
internal network.
Types of Firewall
Depending on their structure and functionality, there are different types of firewalls.
The following is a list of some common types of firewalls:
o Proxy Firewall
o Packet-filtering firewalls
1
Type A
Highest Level. Uses formal design specifications and verification techniques. Grants a high degre
of assurance of process security.
2 Type B
Provides mandatory protection system. Have all the properties of a class C2 system. Attaches
sensitivity label to each object. It is of three types.
• B1 − Maintains the security label of each object in the system. Label is used for makin
decisions to access control.
• B2 − Extends the sensitivity labels to each system resource, such as storage objects, support
covert channels and auditing of events.
• B3 − Allows creating lists or user groups for access-control to grant access or revoke acces
to a given named object.
3 Type C
Provides protection and user accountability using audit capabilities. It is of two types.
• C1 − Incorporates controls so that users can protect their private information and keep othe
users from accidentally reading / deleting their data. UNIX versions are mostly Cl class.
• C2 − Adds an individual-level access control to the capabilities of a Cl level system.
4 Type D
Lowest level. Minimum protection. MS-DOS, Window 3.1 fall in this category.
14 Compare and contrast Linux with Microsoft Windows[7M] [SET -1][Dec 2023]
Command Windows allows users to use the Linux command-line offers more features
Line command line, To open the command for administration and daily tasks, it does not
line, click on the Run dialog box and type offer much to end-users.
CMD in the run search bar and press
Enter key.
Reliability Windows has improved its reliability but Linux is more reliable and secure then
still it is less reliable as compared to Windows OS. It mainly focuses on system
Linux. security, process management, and up-time.
Usability Windows is easier to use as it provides a Although Linux has the ability to perform
simple user interface. But its installation complex tasks easier, its installation process
process can take more time. is complicated.
Security Microsoft Windows can be part of Linux is a more secure operating system as
developing malware and viruses. compared to Microsoft Windows. Even
attackers found difficulty in breaking the
security with the help of Linux.
Support It provides users the online and integrated A wide number of books are available to
help systems, as well as a large number offer help about Linux, including online
of informative books, are available to support.
provide help for people at all skill levels.
Updates Regular Windows update makes users Linux provides users full control over
frustrated by alerting the Windows updates. They can update it accordingly, and
update for inconvenient times. it takes less time to get an update as well as
Additionally, it takes more time to get an without any reboot the system.
update.
Licensing Microsoft Windows with license does not Linux operating system with a license offers
allow to modify the software (don't have users the benefit to re-use the source code on
access to the source code). It can be any number of systems. It is also allowed the
installed only on the systems with a users to modify the software and sell its
Windows license key. modified version.
Linux
It is secure
Favorable choice of Developers
We can use Linux through an interactive user interface as well as from the terminal (Command
Line Interface). To run Linux from the terminal, press the "CTRL+ALT+T" keys. And, to explore its
functionality, press the application button given on the left down corner of your desktop