0% found this document useful (0 votes)
3 views56 pages

System Security Chapter

The document discusses various aspects of system security, focusing on operating system security, memory protection methods, file system protection, authentication types, vulnerabilities, and database security. It outlines techniques for memory protection like fences, segmentation, and paging, as well as access control methods and the importance of authentication in safeguarding systems. Additionally, it highlights common vulnerabilities, particularly those listed by OWASP, and suggests preventive measures to enhance security across different system components.

Uploaded by

flowercent485
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views56 pages

System Security Chapter

The document discusses various aspects of system security, focusing on operating system security, memory protection methods, file system protection, authentication types, vulnerabilities, and database security. It outlines techniques for memory protection like fences, segmentation, and paging, as well as access control methods and the importance of authentication in safeguarding systems. Additionally, it highlights common vulnerabilities, particularly those listed by OWASP, and suggests preventive measures to enhance security across different system components.

Uploaded by

flowercent485
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

UNIT NO: 5

System Security
operating system security
• The process of ensuring OS availability, confidentiality, integrity is
known as operating system security.
• OS security refers to the processes or measures taken to protect the
operating system from dangers, including viruses, worms, malware,
and remote hacker intrusions.
• Operating system security comprises all preventive-control
procedures that protect any system assets that could be stolen,
modified, or deleted if OS security is breached.
Various ways of memory and address protection
• Memory protection includes protection for the memory that the OS
itself uses as well as the memory of user processes.
• Major challenge in multi-programming system is to prevent one
program from affecting the data and programs in the memory space
of other users.
[Link]
[Link] and Bounds registers
[Link]
[Link]
[Link]
[Link]
• A fence or fence address is simplest form of memory protection
which can be used only for single user operating system.
• A fence is a particular address that users and their processes cannot
cross. Only the OS can operate on one side of the fence and users are
restricted to the other side.
• A fence could be static, in which case there is a fixed fence address.
Alternatively, a dynamic fence can be used, which can be
implemented using a fence register to specify the current fence
address.
• Another implementation used a hardware register, often called a
fence register, containing the address of the end of the operating
system.
• In contrast to a fixed fence, in this scheme the location of the fence
could be changed.
• Each time a user program generated an address for data
modification, the address was automatically compared with the fence
address.
• If the address was greater than the fence address (that is, in the user
area), the instruction was executed; if it was less than the fence
address (that is, in the operating system area), an error condition was
raised.
• A fence register protects only in one direction. In other words, an
operating system can be protected from a single user, but the fence
cannot protect one user from another user.
• Similarly, a user cannot identify certain areas of the program as
inviolable (such as the code of the program itself or a read-only data
area).
2. Relocation
• If the operating system can be assumed to be of a fixed size,
programmers can write their code assuming that the program begins
at a constant address.
• This feature of the operating system makes it easy to determine the
address of any object in the program.
• However, it also makes it essentially impossible to change the starting
address if, for example, a new version of the operating system is
larger or smaller than the old.
• If the size of the operating system is allowed to change, then
programs must be written in a way that does not depend on
placement at a specific location in memory.
• Relocation is the process of taking a program written as if it began at
address 0 and changing all addresses to reflect the actual address at
which the program is located in memory.
• In many instances, this effort merely entails adding a constant
relocation factor to each address of the program. That is, the
relocation factor is the starting address of the memory assigned for
the program.
[Link] and Bounds registers
• This type of protection can be used in multi- user environment where
one users program needs to be protected from the other.
• Each user has a base register which is the lower address and a Bound
register which is the upper address limit.
• The base and bounds register approach implicitly assumes that the
user or process space is contiguous in memory. The OS must
determine what protection to apply to a specific memory location.
• In some cases it might be sufficient to apply the same protection to
all of a user's memory.
• The disadvantage is that the registers confine access to consecutive
range of addresses.
[Link]:
• This specifies the protection for each individual address. In this
method of protection every word of machine memory has one or
more extra bits to identify the access rights to that word.
• Only privileged instructions can set these access bits. While this is as
fine-grained protection as possible, it introduces significant overhead.
• The overhead can be reduced by tagging sections of the address
space instead of each individual address. Another drawback to
tagging is compatibility, since tagging schemes are not in common
use.
[Link]:
• This method divides the memory into logical units such as individual
procedures or the data in one array.
• Once they are divided, appropriate access control can be enforced on each
segment.
• A benefit of segmentation is that any segment can be placed in any memory
location provided the location is large enough to hold it. The OS must keep
track of the locations of all segments, which is accomplished using
<segment,offset> pairs, where the named segment specifies the segment,
and the offset is the starting address of the specified segment.
• With segmentation, all address references must go through the OS, so the OS
can, in this respect, achieve complete mediation. Depending on the access
control applied to particular segments, users can share access to some
segments or users can be restricted to specific segments.
6. Paging:
• Paging discards the disadvantage of segmentation. In paging all
segments are of a fixed size called as pages and the memory divided
is known as page frames.
• In paging a particular page can be accessed using a pair of the form
<page, offset=""> where page is the page number and offset is
location within a page.
• The advantages of paging over segmentation include no
fragmentation, improved efficiency, and the fact that there are no
variable sizes to worry about.
• The disadvantages are that there is, in general, no logical unity to
pages, which makes it more difficult to determine the proper access
control to apply to a given page.
Protection in File System
• In computer systems, alot of user’s information is stored, the
objective of the operating system is to keep safe the data of the user
from the improper access to the system.
• Protection can be provided in number of ways. For a single laptop
system, we might provide protection by locking the computer in a
desk drawer or file cabinet.
• For multi-user systems, different mechanisms are used for the
protection.
Types of Access
• Read – Reading from a file.
• Write – Writing or rewriting the file.
• Execute – Loading the file and after loading the execution process
starts.
• Append – Writing the new information to the already existing file,
editing must be end at the end of the existing file.
• Delete – Deleting the file which is of no use and using its space for the
another data.
• List – List the name and attributes of the file.
Access Control :
• There are different methods used by different users to access any file.
The general way of protection is to associate identity-dependent
access with all the files and directories an list called access-control list
(ACL)
• Owner – Owner is the user who has created the file.
• Group – A group is a set of members who has similar needs and they
are sharing the same file.
• Universe – In the system, all other users are under the category called
universe.
Authentication
• User authentication verifies the identity of a user attempting to gain
access to a network or computing resource by authorizing a
human-to-machine transfer of credentials during interactions on a
network to confirm a user's authenticity.
• user authentication consists of three tasks:
• Identification. Users have to prove who they are.
• Authentication. Users have to prove they are who they say they are.
• Authorization. Users have to prove they're allowed to do what they
are trying to do.
Single-factor authentication
• Single-factor authentication (SFA) requires verification of one piece of
information from a user, such as a password.
• Because SFA commonly employs knowledge factors, which require
only a single piece of information, it can't stop an attacker who has
stolen a user's password from accessing a user's system.
Multifactor authentication
• Multifactor authentication (MFA) uses more than one method of
authentication to verify the identity of a user.
• For example, a user may be required to provide a password in
combination with a security question.
• Two-factor authentication (2FA) uses factors from two of the
authentication categories, while four-factor authentication (4FA) uses
at least one factor from four categories of factors.
• The latter is considered far more secure due to the additional layers
of security that come with more factors.
Vulnerabilities
• Vulnerabilities are weaknesses in a system that gives threats the
opportunity to compromise assets.
• All systems have vulnerabilities. Even though the technologies are
improving but the number of vulnerabilities are increasing such as
tens of millions of lines of code, many developers, human
weaknesses, etc.
• Vulnerabilities mostly happened because of Hardware, Software,
Network and Procedural vulnerabilities.
1. Hardware Vulnerability:
• A hardware vulnerability is a weakness which can used to attack the
system hardware through physically or remotely.
• For examples:

• Old version of systems or devices


• Unprotected storage
• Unencrypted devices, etc.
2. Software Vulnerability:
• A software error happen in development or configuration such as the
execution of it can violate the security policy. For examples:

• Lack of input validation


• Unverified uploads
• Cross-site scripting
• Unencrypted data, etc.
3. Network Vulnerability:
• A weakness happen in network which can be hardware or software.
• For examples:
• Unprotected communication
• Malware or malicious software (e.g.:Viruses, Keyloggers, Worms, etc)
• Social engineering attacks
• Misconfigured firewalls
4. Procedural Vulnerability:
• A weakness happen in an organization operational methods.
• For examples:

• Password procedure – Password should follow the standard password


policy.
• Training procedure – Employees must know which actions should be
taken and what to do to handle the security. Employees must never
be asked for user credentials online. Make the employees know social
engineering and phishing threats.
The top 10 OWASP vulnerabilities
• Injection
• Broken Authentication
• Sensitive Data Exposure
• XML External Entities (XXE)
• Broken Access control
• Security misconfigurations
• Cross-Site Scripting (XSS)
• Insecure Deserialization
• Using Components with known vulnerabilities
• Insufficient logging and monitoring.
1. Injection
• Injection vulnerabilities occur when an attacker uses a query or
command to insert untrusted data into the interpreter via SQL, OS,
NoSQL, or LDAP injection.
• The data that is injected through this attack vector makes the
application do something it is not designed for.
• Not all applications are vulnerable to this attack, only the applications
that accept parameters as input are vulnerable to injection attacks.
Injection attacks can be prevented by

• Using safer API which avoids the use of the interpreter


• Using parameterized queries when coding
• Segregating commands from data to avoid exposure to attacks
2. Broken Authentication
• Broken Authentication is a vulnerability that allows an attacker to use
manual or automatic methods to try to gain control over any account
they want in a system.
• In worse conditions, they could also gain complete control over the
system.
• This vulnerability is also more dangerous because websites with
broken authentication vulnerabilities are very common on the web.
• Broken authentication normally occurs when applications incorrectly
execute functions related to session management allowing intruders
to compromise passwords, security keys, or session tokens.
Broken authentication attacks can be prevented
by
• Implementing multi-factor authentication
• Protecting user credentials
• Sending passwords over encrypted connections
3. Sensitive Data Exposure
• This vulnerability is one of the most widespread vulnerabilities on the
OWASP list and it occurs when applications and APIs don’t properly
protect sensitive data such as financial data, social security numbers,
usernames, and passwords, or health information, and this enables
attackers to gain access to such information and commit fraud or
steal identities.
Sensitive data exposure attacks can be prevented
by
• Using the secure URL’s
• Using strong and unique passwords
• Encrypting all sensitive information that does need to be stored
4. XML External Entities (XXE)
• This vulnerability occurs for web applications that parse XML input. It
happens when poorly configured XML processors evaluate external
entity references within the XML documents and send sensitive data
to an unauthorized external entity, i.e., a storage unit such as a hard
drive. By default, most XML parsers are vulnerable to XXE attacks.
XXE attacks can be prevented by
• Using less complex data formats such as JSON
• Keeping XML processors and libraries upgraded
• Using SAST tools
5. Broken Access Controls
• This vulnerability occurs when there is broken access to resources, it
means there are some improperly configured missing restrictions on
authenticated users which allows them to access unauthorized
functionality or data like access to others accounts, confidential
documents, etc. For this attack, attackers take the help of session
management and try to access data from the unexpired session
tokens, which gives them access to many valid IDs and passwords.
Broken access control attacks can be prevented by
• Deleting accounts that are no longer needed or are not active
• Shutting down unnecessary services to reduce the burden on servers
• Using penetration testing
6. Security Misconfiguration
• It is estimated that up to 95% of cloud breaches are the result of
human errors and this fact leads us to the next vulnerability called
security misconfiguration. This vulnerability refers to the improper
implementation of security intended to keep application data safe. As
we know that developer’s work is basically to work on the
functionality of websites and not on security and this flaw allows
hackers to keep track of the configuration of the security and find
new possible ways to enter websites. The most common reason for
this vulnerability is not patching or upgrading systems, frameworks,
and components.
Security misconfiguration attacks can be
prevented by
• Using Dynamic application security testing (DAST)
• Disabling the use of default passwords
• Keeping an eye on cloud resources, applications, and servers.
7. Cross-Site Scripting (XSS)
• This is also a widespread vulnerability that almost affects 53% of all
web applications. XSS vulnerability allows a hacker to inject malicious
client-side scripts into a website and then use the web application as
an attack vector to hijack user sessions, or redirecting the victim to
malicious websites.
Cross-site scripting attacks can be prevented by

• Using appropriate response headers


• Filtering the input and encoding the output
• Using the content security policy
• Applying a zero-trust approach to user input
8. Insecure Deserialization
• Insecure Deserialization vulnerability allows an attacker to remotely
execute code in the application, tamper or delete serialized (written
to disk) objects, conduct injection attacks, replay attacks, and elevate
privileges. This attack is also known as untrusted Deserialization. It is
a serious application security issue that affects most of the modern
systems.
Insecure Deserialization attacks can be prevented
by

• Implementing digital signatures


• Using penetration testing
• Isolating the code that deserializes and running it in low privilege
environments to prevent unauthorized actions
9. Using Components with known vulnerabilities
• Nowadays there are many open-source and freely available software
components (libraries, frameworks) that are available to developers
and if there occurs any component which has got a known
vulnerability in it then it becomes a weak link that can impact the
security of the entire application. It also occurs because developers
frequently don’t know which open source and third-party
components are present in their applications and this makes it
difficult for developers to update components when new
vulnerabilities are discovered in their current versions.
This attack can be prevented by
• Removing all unnecessary dependencies
• Using virtual patching
• Using components only from official and verified sources
10. Insufficient Logging and Monitoring
• It is estimated that the time from attack to detection can take up to
200 days, and often longer. In the meantime, attackers can tamper
with servers, corrupt databases, and steal confidential information.
Insufficient logging and ineffective integration of the security systems
allow attackers to pivot to other systems and maintain persistent
threats.
Insufficient logging and monitoring attacks can be
prevented by
• Implementing logging and audit software
• Establishing an effective monitoring system
• Thinking like an attacker and use a pen testing approach
Database Security
• Database Security means keeping sensitive information safe and prevent the loss of
data. Security of data base is controlled by Database Administrator (DBA).
• The following are the main control measures are used to provide security of data in
databases:
• 1. Authentication
• 2. Access control
• 3. Inference control
• 4. Flow control
• 5. Database Security applying Statistical Method
• 6. Encryption
[Link] :
• Authentication is the process of confirmation that whether the user
log in only according to the rights provided to him to perform the
activities of data base.
• A particular user can login only up to his privilege but he can’t access
the other sensitive data. The privilege of accessing sensitive data is
restricted by using Authentication.
[Link] Control :
• The security mechanism of DBMS must include some provisions for
restricting access to the data base by unauthorized users. Access
control is done by creating user accounts and to control login process
by the DBMS. So, that database access of sensitive data is possible
only to those people (database users) who are allowed to access such
data and to restrict access to unauthorized persons.
• The database system must also keep the track of all operations
performed by certain user throughout the entire login time.
[Link] Control :
• This method is known as the countermeasures to statistical database
security problem. It is used to prevent the user from completing any
inference channel. This method protect sensitive information from
indirect disclosure.
• Inferences are of two types, identity disclosure or attribute
disclosure.
[Link] Control :
• This prevents information from flowing in a way that it reaches
unauthorized users. Channels are the pathways for information to
flow implicitly in ways that violate the privacy policy of a company are
called convert channels.
[Link] Security applying Statistical Method :
• Statistical database security focuses on the protection of confidential
individual values stored in and used for statistical purposes and used
to retrieve the summaries of values based on categories. They do not
permit to retrieve the individual information.
• This allows to access the database to get statistical information about
the number of employees in the company but not to access the
detailed confidential/personal information about the specific
individual employee.
[Link] :
• This method is mainly used to protect sensitive data (such as credit
card numbers, OTP numbers) and other sensitive numbers. The data
is encoded using some encoding algorithms.
• An unauthorized user who tries to access this encoded data will face
difficulty in decoding it, but authorized users are given decoding keys
to decode data.
Database security requirements
• Data Encryption
• Secure Communication
• Access Control
• Integrity Verification
• Key Management
• Authentication and Authorization
• Auditing and Logging

You might also like