DBMS Unit - 5
DBMS Unit - 5
DBMS Unit - 5
Database Security means to keep sensitive information safe and prevent the
loss of data. Security of the database is controlled by Database Administrator
(DBA).
Database security is the technique that protects and secures the database
against intentional or accidental threats. Security concerns will be relevant not
only to the data residing in an organization's database: the breaking of security
may harm other parts of the system, which may ultimately affect the database
structure. Consequently, database security includes hardware parts, software
parts, human resources, and data. To efficiently do the uses of security needs
appropriate controls, which are distinct in a specific mission and purpose for the
system. The requirement for getting proper security while often having been
neglected or overlooked in the past days; is now more and more thoroughly
checked by the different organizations.
We consider database security about the following situations:
These listed circumstances mostly signify the areas in which the organization
should focus on reducing the risk that is the chance of incurring loss or damage
to data within a database. In some conditions, these areas are directly related
such that an activity that leads to a loss in one area may also lead to a loss in
another since all of the data within an organization are interconnected.
https://cgccollegespace.live
What is a Threat?
Any situation or event, whether intentionally or incidentally, can cause damage,
which can reflect an adverse effect on the database structure and, consequently,
the organization. A threat may occur by a situation or event involving a person
or the action or situations that are probably to bring harm to an organization and
its database.
The degree that an organization undergoes as a result of a threat's following
depends upon some aspects, such as the existence of countermeasures and
contingency plans. Let us take an example where you have a hardware failure
that occurs corrupting secondary storage; all processing activity must cease until
the problem is resolved.
Computer-Based Controls
The different forms of countermeasure to threats on computer systems range
from physical controls to managerial procedures. In spite of the range of
computer-based controls that are preexisting, it is worth noting that, usually, the
security of a DBMS is merely as good as that of the operating system, due to the
close association among them.
Most of the computer-based database security are listed below:
● Access authorization.
● Access controls.
● Views.
● Data integrity.
● Encryption of data.
● RAID technology.
https://cgccollegespace.live
The following are the main control measures are used to provide
1. Authentication
2. Access control
3. Inference control
4. Flow control
5. Database Security applying Statistical Method
6. Encryption
https://cgccollegespace.live
Authentication :
Authentication is the process of confirmation that whether the user
privilege but he can’t access the other sensitive data. The privilege
referred to as Verification.
Authorisation:
https://cgccollegespace.live
execute some database administrator commands such as restore or
upgrade a database.
● System Control - This is the highest control authorization for a
user. This allows maintenance operations on the database but not
direct access to data.
● System Maintenance - This is the lower level of system control
authority. It also allows users to maintain the database but within a
database manager instance.
● System Monitor - Using this authority, the user can monitor the
database and take snapshots of it.
https://cgccollegespace.live
Access Control :
The security mechanism of DBMS must include some provisions for
restricting access to the database by unauthorized users. Access
control is done by creating user accounts and to control the 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 track of all operations
performed by certain users throughout the entire login time.
Inference 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 protects the
sensitive information from indirect disclosure.
Inferences are of two types, identity disclosure or attribute
disclosure.
Flow 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 covert channels.
https://cgccollegespace.live
Database 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 access to the database to get statistical information
about the number of employees in the company but not to access
the detailed confidential/personal information about specific
individual employees.
Encryption :
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.
Access control regulates which users, applications, and devices can view, edit,
add, and delete resources in an organization’s environment. Controlling access is
one of the key practices to protect sensitive data from theft, misuse, abuse, and
any other threats. There are two levels of access control: physical and logical.
https://cgccollegespace.live
Access control helps to mitigate both insider and outsider threats. That’s why IT
regulations and standards — NIST, HIPAA, PCI DSS, and others — enforce
strict physical and logical access control measures. In this article, we discuss
models of logical access control.
Let’s find out when to use mandatory and discretionary access control models.
https://cgccollegespace.live
Access permissions for each piece of data are stored in an access-control list
(ACL). This list can be generated automatically when a user grants access to
somebody or can be created by an administrator. An ACL includes users and
groups that might access data and levels of access they might have. An ACL can
also be enforced by a system administrator. In this case, the ACL acts as a
security policy, and regular users can’t edit or overrule it.
Pros
https://cgccollegespace.live
● User-friendly — Users can manage their data and quickly access
administrators.
piece of data.
Cons
DAC allows for a lot of flexibility and decreases the load on system
administrators as users can manage access on their own. On the other hand, it
doesn’t provide a high level of security for several reasons:
https://cgccollegespace.live
● If user 1 shares access rights with user 2, there’s no guarantee
that user 2 needs this access to work or won’t steal or corrupt
data or grant access to a malicious user.
● It’s impossible to control information flows inside the network.
● It’s impossible to enforce the principles of least privilege, need to
know, and separation of duties.
Because of these limitations, DAC can’t be used by organizations that work with
extremely sensitive data (medical, financial, military, etc.).
At the same time, DAC is a good choice for small businesses with limited IT staff
and cybersecurity budgets. It allows for sharing information and ensures the
smooth operation of the business. This approach, when applied in an
organization with 10 to 20 employees, lacks the complexity and oversight
challenges associated with the use of DAC in organizations with hundreds or
thousands of employees.
MAC is considered the most secure of all access control models. Access rules are
manually defined by system administrators and strictly enforced by the
operating system or security kernel. Regular users can’t alter security attributes
even for data they’ve created.
https://cgccollegespace.live
With MAC, the process of gaining access looks like this:
● The administrator configures access policies and defines security
attributes: confidentiality levels, clearances for accessing
different projects and types of resources.
● The administrator assigns each subject (user or resource that
accesses data) and object (file, database, port, etc.) a set of
attributes.
● When a subject attempts to access an object, the operating
system examines the subject’s security attributes and decides
whether access can be granted.
For example, let’s consider data that has the “top secret” confidentiality level
and “engineering project” security label. It’s available to a set of users that have
“top secret” clearance and authorization to access engineering documents. Such
users can also access information that requires a lower level of clearance. But
employees with lower levels of clearance will not have access to information that
requires a higher level of clearance
https://cgccollegespace.live
Pros and cons of MAC
Pros
Cons
of data; they can’t configure access parameters for their own data.
https://cgccollegespace.live
When to use MAC
A pure MAC model provides a high and granular level of security. On the
other hand, it’s difficult to set up and maintain. That’s why it’s common to
combine MAC with other access control models.
https://cgccollegespace.live
https://cgccollegespace.live
ROLE-BASED ACCESS CONTROL (RBAC)
Role-based access control (RBAC) restricts network access based on a person's
role within an organization and has become one of the main methods for
advanced access control. The roles in RBAC refer to the levels of access that
employees have to the network.
What if an end-user's job changes? You may need to manually assign their role
to another user, or you can also assign roles to a role group or use a role
assignment policy to add or remove members of a role group.
https://cgccollegespace.live
By adding a user to a role group, the user has access to all the roles in that
group. If they are removed, access becomes restricted. Users may also be
assigned to multiple groups in the event they need temporary access to certain
data or programs and then removed once the project is complete.
BENEFITS OF RBAC
Managing and auditing network access is essential to information security.
Access can and should be granted on a need-to-know basis. With hundreds or
thousands of employees, security is more easily maintained by limiting
unnecessary access to sensitive information based on each user’s established
role within the organization. Other advantages include:
https://cgccollegespace.live
institutions, which manage lots of sensitive data such as PHI and
PCI data.
https://cgccollegespace.live
Intrusion : A network intrusion is any unauthorized activity on a
computer network. Detecting an intrusion depends on the defenders
having a clear understanding of how attacks work.
Intruder:
In relation to computers, an intruder is an individual or software
program that enters a computer system without authorization. An
example of an intruder would be a hacker. Another example would
be a software virus.
Types of Intruder:
Basically there are 3 types of intruder:
https://cgccollegespace.live
Intrusion Detection System (IDS)
network traffic for suspicious activity and issues alerts when such
https://cgccollegespace.live
Classification of Intrusion Detection System:
https://cgccollegespace.live
3. Protocol-based Intrusion Detection System (PIDS):
Protocol-based intrusion detection system (PIDS) comprises
a system or agent that would consistently reside at the
front end of a server, controlling and interpreting the
protocol between a user/device and the server. It is trying
to secure the web server by regularly monitoring the HTTPS
protocol stream and accept the related HTTP protocol. As
HTTPS is un-encrypted and before instantly entering its web
presentation layer then this system would need to reside in
this interface, between to use the HTTPS.
4. Application Protocol-based Intrusion Detection
System (APIDS):
Application Protocol-based Intrusion Detection System
(APIDS) is a system or agent that generally resides within a
group of servers. It identifies the intrusions by monitoring
and interpreting the communication on application specific
protocols. For example, this would monitor the SQL protocol
explicit to the middleware as it transacts with the database
in the web server.
5. Hybrid Intrusion Detection System :
Hybrid intrusion detection systems are made by the
combination of two or more approaches of the intrusion
detection system. In the hybrid intrusion detection system,
host agent or system data is combined with network
information to develop a complete view of the network
system. Hybrid intrusion detection systems are more
effective in comparison to the other intrusion detection
system. Prelude is an example of Hybrid IDS.
https://cgccollegespace.live
Detection Method of IDS:
1. Signature-based Method:
Signature-based IDS detects the attacks on the basis of the
specific patterns such as number of bytes or number of 1’s
or number of 0’s in the network traffic. It also detects on
the basis of the already known malicious instruction
sequence that is used by the malware. The detected
patterns in the IDS are known as signatures.
Signature-based IDS can easily detect the attacks whose
pattern (signature) already exists in the system but it is
quite difficult to detect the new malware attacks as their
pattern (signature) is not known.
2. Anomaly-based Method:
Anomaly-based IDS was introduced to detect the unknown
malware attacks as new malware are developed rapidly. In
anomaly-based IDS there is use of machine learning to
create a trustful activity model and anything coming is
compared with that model and it is declared suspicious if it
is not found in the model. Machine learning based methods
have a better generalized property in comparison to
signature-based IDS as these models can be trained
according to the applications and hardware configurations.
https://cgccollegespace.live
SQL Injection
https://cgccollegespace.live
Example of SQL Injection
Student id:
12222345 or 1=1.
STUDENT-ID == 12222345 or 1 = 1
Now this 1=1 will return all records for which this holds true. So
basically, all the student data is compromised. Now the malicious
https://cgccollegespace.live
USERNAME = “” and PASSWORD=””
Now the malicious can use the ‘=’ operator in a clever manner to
(Password=”” or 1=1).
The hacker can retrieve all the user-data present in the database
such as user details, credit card information, social security numbers
and can also gain access to protected areas like the administrator
portal. It is also possible to delete the user data from the tables.
https://cgccollegespace.live
Preventing SQL Injection
UNIT - 5 COMPLETED
https://cgccollegespace.live