Discretionary Access ControlBased on
Granting and Revoking Privileges
• The typical method of enforcing discretionary
access control in a database system is based
on the granting and revoking of privileges. Let
us consider privileges in the context of a
relational DBMS.
3.
1. Types ofDiscretionary
Privileges
• The DBMS must provide selective access to
each relation in the database based on specific
accounts. Operations may also be controlled;
thus, having an account does not necessarily
entitle the account holder to all the
functionality provided by the DBMS.
Informally, there are two levels for assigning
privileges to use the database system:
4.
• The accountlevel. At this level, the DBA specifies the
particular privileges that each account holds
independently of the relations in the database.
• The relation (or table) level. At this level, the DBA can
control the privilege to access each individual relation or
view in the database.
• References privilege on R. This gives the account
the capability to reference (or refer to) a relation R when
specifying integrity constraints. This privilege can also be
restricted to specific attributes of R.
5.
Specifying Privileges throughthe Use of Views
• The mechanism of views is an
important discretionary authorization
mechanism in its own right. For example, if
the owner A of a relation R wants another
account B to be able to retrieve only some
fields of R, then A can create a view V of R that
includes only those attributes and then
grant SELECT on V to B
6.
Revoking of Privileges
•n some cases it is desirable to grant a privilege
to a user temporarily. For example, the owner
of a relation may want to grant
the SELECT privilege to a user for a specific
task and then revoke that privilege once the
task is completed. Hence, a mechanism
for revoking privileges is needed
7.
Propagation of PrivilegesUsing the GRANT
OPTION
• Whenever the owner A of a relation R grants a
privilege on R to another account B, the
privilege can be given to B
with or without the GRANT OPTION. If
the GRANT OPTION is given, this means
that B can also grant that privilege on R to
other accounts.
8.
Mandatory Access Controland Role-Based
Access Control for Multilevel Security
• The discretionary access control technique of
granting and revoking privileges on relations
has traditionally been the main security
mechanism for relational database systems.
This is an all-or-nothing method: A user either
has or does not have a certain privilege.
9.
• In manyapplications, an additional security
policy is needed that classifies data and users
based on security classes. This approach,
known as mandatory access control (MAC),
would typically be combined with the
discretionary access control mechanisms
10.
Comparing Discretionary AccessControl and
Mandatory Access Control
• Discretionary access control (DAC) policies are
characterized by a high degree of flexibility,
which makes them suitable for a large variety
of application domains. The main drawback of
DAC models is their vulnerability to malicious
attacks, such as Trojan horses embedded in
application programs
11.
• The reasonis that discretionary authorization
models do not impose any control on how
information is propagated and used once it
has been accessed by users authorized to do
so.
12.
SQL Injection
• SQLinjection is a code injection technique
that might destroy your database.
• SQL injection is one of the most common web
hacking techniques.
• SQL injection is the placement of malicious
code in SQL statements, via web page input.
13.
• SQL inWeb Pages
• SQL injection usually occurs when you ask a
user for input, like their username/userid, and
instead of a name/id, the user gives you an
SQL statement that you will unknowingly run
on your database.
14.
• SQL InjectionBased on 1=1 is Always True
• Look at the example above again. The original purpose
of the code was to create an SQL statement to select a
user, with a given user id.
• If there is nothing to prevent a user from entering
"wrong" input, the user can enter some "smart" input
like this:
• UserId:
• Then, the SQL statement will look like this:
• SELECT * FROM Users WHERE UserId = 105 OR 1=1
15.
• SQL InjectionBased on ""="" is Always True
• Here is an example of a user login on a web site:
• Username: John Doe
• Password: myPass
• Example
• uName = getRequestString("username");
uPass = getRequestString("userpassword");
sql = 'SELECT * FROM Users WHERE Name ="' + uName + '" AND
Pass ="' + uPass + '"'
16.
SQL Injection Basedon Batched SQL Statements
• Most databases support batched SQL
statement.
• A batch of SQL statements is a group of two or
more SQL statements, separated by
semicolons.
• The SQL statement below will return all rows
from the "Users" table, then delete the
"Suppliers" table.
17.
• Example
SELECT *FROM Users; DROP TABLE Suppliers
• Look at the following example:
Example
txtUserId = getRequestString("UserId");
txtSQL = "SELECT * FROM Users WHERE UserId = " + txtUserId;
• And the following input:
– User id: 105; DROP TABLE Suppliers
– The valid SQL statement would look like this:
Result
SELECT * FROM Users WHERE UserId = 105; DROP TABLE Suppliers;
18.
Statistical Database Security
•Statistical databases typically contain
parameter data and the measured data for
these parameters.
• There are different types of database security
such as encryption, authentication, backup,
application security and physical security
which should implement in your business.
• ...
19.
• Statistical databasesecurity techniques must
prohibit the retrieval of individual data. This
can be achieved by prohibiting queries that
retrieve attribute values and by allowing only
queries that involve statistical aggregate
functions such as COUNT, SUM, MIN, MAX,
AVERAGE, and STANDARD DEVIATION. Such
queries are sometimes called statistical
queries.
20.
Encryption and PublicKey Infrastructures
• Encryption is the conversion of data into a
form, called a ciphertext, which cannot be
easily understood by unauthorized persons. It
enhances security and privacy when access
controls are bypassed, because in cases of
data loss or theft, encrypted data cannot be
easily understood by unauthorized persons.
21.
• With thisbackground, we adhere to following standard definitions:
• · Ciphertext: Encrypted (enciphered) data.
• · Plaintext (or cleartext): Intelligible data that has meaning and can be read or acted upon
without the application of decryption.
• Encryption: The process of transforming plaintext into ciphertext.
•
• · Decryption: The process of transforming ciphertext back into plaintext.
22.
• Encryption consistsof applying an encryption
algorithm to data using some prespecified
encryption key. The resulting data has to be
decrypted using a decryption key to recover
the original data.
23.
The Data Encryptionand Advanced
Encryption Standards
• The Data Encryption Standard (DES) is a
system developed by the U.S. government for
use by the general public.
• The DES algorithm is a careful and complex
combination of two of the fundamental
building blocks of encryption: substitution and
permutation (transposition).
24.
Survivability
• Survivability ofa system is the capability of a system
to fulfill its mission in a timely manner in the
presence of attacks, failures, or accidents.
• Considering the vast growth in volume and speed of
threats to databases and information assets,
research efforts need to be devoted to the following
issues: data quality, intellectual property rights, and
database survivability. These are only some of the
main challenges that researchers in database
security are trying to address.
25.
Database Survivability
• Databasesystems need to operate and
continue their functions, even with reduced
capabilities, despite disruptive events such as
information warfare attacks. A DBMS, in
addition to making every effort to prevent an
attack and detecting one in the event of
occurrence, should be able to do the
following:
26.
• onfinement. Takeimmediate action to eliminate the attacker’s access to the system and to
isolate or contain the problem to prevent further spread.
• Damage assessment. Determine the extent of the problem, including failed functions and
corrupted data.
• Reconfiguration. Reconfigure to allow operation to continue in a degraded mode while
recovery proceeds.
• Repair. Recover corrupted or lost data and repair or reinstall failed system functions to
reestablish a normal level of operation.
• Fault treatment. To the extent possible, identify the weaknesses exploited in the attack and
take steps to prevent a recurrence.
•
27.
• Oracle LabelSecurity controls the display of individual table rows using labels
that are assigned to individual table rows and application users.
• Oracle Label Security is based on multi-level security (MLS) requirements that
are found in government and defense organizations. You can easily restrict
sensitive information to only authorized users. Oracle Label Security is based
on Oracle Virtual Private Database (VPD). However, unlike VPD, Oracle Label
Security provides the access mediation functions, data dictionary tables, and
policy based architecture out of the box, eliminating customized coding and
providing a consistent label based access control model that can be used by
multiple applications. Oracle Label Security policies can be applied to one or
more application tables. Oracle Label Security works by comparing the row
label with a user's label authorizations. Oracle Label Security software is
installed by default, but not automatically enabled.
28.
Benefits of OracleLabel Security
• Oracle Label Security provides several benefits for controlling row level management.
• It enables row level data classification and provides out of the box access mediation
based on the data classification and the user label authorization or security clearance.
• It enables you to assign label authorizations or security clearances to both database
users and application users.
• It provides both a graphical user interface and APIs for defining and storing data
classification labels and user label authorizations.
• It integrates with Oracle Database Vault and Oracle Advanced Security Data
Redaction, enabling security clearances to be use in both Database Vault command
rules and Data Redaction policy definitions.
29.
Components of OracleLabel Security
• An Oracle Label Security policy has a standard set of components.
• These components are as follows:
• Labels. Labels for data and users, along with authorizations for users and program units, govern access to
specified protected objects. Labels are composed of the following:
• Levels. Levels indicate the type of sensitivity that you want to assign to the row, for example, SENSITIVE or
HIGHLY SENSITIVE.
• Compartments. (Optional) Data can have the same level (Public, Confidential and Secret), but can belong
to different projects inside a company, for example ACME Merger and IT Security. Compartments represent
the projects in this example, that help define more precise access controls. They are most often used in
government environments.
• Groups. (Optional) Groups identify organizations owning or accessing the data, for example, UK, US, Asia,
Europe. Groups are used both in commercial and government environments, and frequently used in place
of compartments due to their flexibility.
• Policy. A policy is a name associated with these labels, rules, authorizations, and protected tables.