CSCI262 Database Security
CSCI262 Database Security
1
2
3
Now, assume the following sequences of grants:
1. A: GRANT READ, INSERT ON EMPLOYEE TO B WITH GRANT
OPTION
2. A: GRANT READ ON EMPLOYEE TO X WITH GRANT OPTION
3. B: GRANT READ, INSERT ON EMPLOYEE TO X
What will happen after each grant execution?
Grant Failure/s why
operation uccess
X X X X
X X X
Cascading Authorizations
What happens if Ann revokes the access rights to Bob
& Chris?
SYSAUTH table
Example
at time t=35,
B issues the command REVOKE ALL RIGHTS
ON EMPLOYEE FROM X.
Clearly the (X, EMPLOYEE, B) tuple must be
deleted from SYSAUTH.
Example –more
In order to determine which of X’s grants of EMPLOYEE must be
revoked, we form a list of X’s remaining incoming grants:
• application owner
• an end user who owns database objects as part of an application
• end user
• an end user who operates on database objects via a particular
application but does not own any of the database objects
• administrator
• user who has administrative responsibility for part or all of the
database
a database RBAC needs to provide the following capabilities:
create and delete roles
define permissions for a role
assign and cancel assignment of users to roles
Role-Based Access Control
DB RBAC must manage roles and their users (cf.
RBAC on Microsoft’s SQL Server)
1. Fixed server roles (roles defined at the server
level)- independent of any user database.; meant
for administrative tasks.
2. Fixed database roles. Roles operating at the level
of an individual user database.
Table 5.2
Fixed Roles
in
Microsoft
SQL
Server
Inference
the process of
performing queries
and deducing
unauthorized
information from
the legitimate
responses received
inference channel
is the information
transfer path by
which unauthorized
data is obtained
Inference techniques
Two inference techniques can be used to
derive additional information:
1. Analyzing functional dependencies between
attributes within a table or across tables;
2. Merging views with the same constraints.
Inference across tables
Protecting
Against
Inference in
SDB
Query restriction
1. Rejects a query that can lead to a compromise.
2. The answers provided are accurate.
3. Restriction in this context simply means that
some queries are denied.
Query restriction
The simplest form of query restriction is query size
restriction.
For a database of size N (number of rows, or records),
a query q(C) is permitted only if the number of records
that match C satisfies:
k <= |X(C)| <= N-k, where k is a fixed integer greater
than 1.
Thus, the user may not access any query set of less
than k records.
Why an upper bound?
Query restriction
The upper bound of N – k guarantees that the
user does not have access to statistics on query
sets of less than k records.
In practice, queries of the form q(All) are
allowed, enabling users to easily access
statistics calculated on the entire database.
Assume that the restriction is only k <= |X(C)|
Assume no upper bound limit
Query restriction
What happens when you compute: q(all),
then q(~C)
q(C)= q(all)-q(~C)
Query size restriction counters attacks based
on very small query sets
Formal query answer Informal statement
Negative compromise
Positive compromise
k X C n k
k ; k 1;
Query size restriction can prevent trivial
compromise attacks
C=AB
T
A B
T= A~B
Individual tracker compromise
COUNT (C ) COUNT ( A) COUNT (T )
COUNT (C a) COUNT (T A a) COUNT (T )
COUNT(C.a)=?
0 1
Negative COUNT(C )
Arbitrary statistics about
compromise I can be computed from
I does not have Positive q(C )=q( A) – q(T)
characteristic a compromise
I does have
characteristic a
Individual tracker
Compromise (proof)
Q(A)?
Q(T+A.a)?
Example of individual tracker with k=2, n=12
table 1
Query set size restriction
2 ≤ COUNT (C) ≤ 12-2=10
x1
x
2
x 3
q
1
x1
x
2
x 4
q
2
x1
x 3
x 4
q
3
x1
x 3
x 4
q
4
1
x1
q q q 2 q
1 2 3 4
3
Perturbation
Add noise to statistics generated from data
– will result in differences in statistics
Data perturbation techniques
– data swapping
– generate statistics from probability distribution
Output perturbation techniques
– random-sample query
– statistic adjustment
Must minimize loss of accuracy in results
– Too little an error: user can infer a close approximation to
protected values
– Too great an error: resulting statistics are unusable
Data swapping
D D'
Disadvantages to encryption:
a. Key management
• Users who are authorized to access the database need the
encryption/decryption key
• Several categories of users and several applications may need
to access the database
• Secure keys must be provided to each categories of users or
applications
b. Inflexibility
• if an entire database, or part of a database is encrypted,
• How would you perform a search??
• What happens when a record is updated?
One example of database
encryption scheme
As a small or medium sized organization,
Outsourcing the DBMS and the database to a
service provider can be a cost/effective
solution.
But what about the confidentiality of your
data?
Encrypting the entire database?
How feasible a solution is it?
One example of database
encryption scheme
Your data is secure
The service provider will
not be able to access the
confidential data
If you encrypt the entire
database
and you don’t provide the
decryption key(s) to the BUT ……….
service provider
One example of database
encryption scheme
Your data is secure
The service provider will
not be able to access the
If you encrypt the entire confidential data
database
and you don’t provide the
decryption key(s) to the
service provider BUT
Authorized users will not
be able to access
individual data based on
searches or indexing on
key parameters
One example of database
encryption scheme
Every time the need to use the database
They would have to:
1. Download the entire database,
2. Decrypt the tables,
3. And work with the decrypted tables
What if the database gets updated?
What may happen?
Inflexible solution
An alternate solution
Data owner
User
Client
server
Data owner –
organization that
produces data to be
Database
made available for
controlled release Encryption
User – human entity
that presents queries to
the system
Server – an
organization that
receives the encrypted
data from a data owner
and makes them
available for distribution
to clients
Scenario
1. The user issues an SQL query for fields from one or
more records with a specific value of the primary key.
2. The query processor at the client encrypts the
primary key, modifies the SQL query accordingly, and
transmits the query to the server.
3. The server processes the query using the encrypted
value of the primary key and returns the appropriate
record or records.
4. The query processor decrypts the data and returns
the results.
5. Are we done yet?
Example - look at following query
SELECT Ename, Eid, Ephone
FROM Employee
WHERE Did 15
Figure 5.13
shared
data loss or account or
technology
leakage service hijacking
issues
unknown risk
profile
Cloud computing Risks
Abuse and nefarious use of cloud computing:
it is relatively easy to register and begin using cloud services,
anyone with a valid credit card can register and immediately
begin using cloud services
Some CP even offering free limited trial periods.
Attackers can get inside the cloud to conduct various attacks,
such as spamming, malicious code attacks, and denial of service.
Cloud computing Risks
Insecure interfaces and APIs:
CPs expose a set of software interfaces or APIs that customers
use to manage and interact with cloud services.
The security and availability of general cloud services is
dependent upon the security of these basic APIs.
From authentication and access control to encryption and
activity monitoring, these interfaces must be designed to protect
against both accidental and malicious attempts to circumvent
policy.
CP risks
Malicious insiders:
Under the cloud computing paradigm, an organization
relinquishes direct control over many aspects of security
It confers an unprecedented level of trust onto the CP.
One grave concern is the risk of malicious insider activity.
Cloud architectures necessitate certain roles that are extremely
high-risk.
Examples include CP system administrators and
managed security service providers.
Shared technology issues:
IaaS vendors deliver their services in a scalable way by
sharing infrastructure.
Often, the underlying components that make up this
infrastructure (CPU caches, GPUs, etc.) were not
designed to offer strong isolation properties for a multi-
tenant architecture.
CPs typically approach this risk by the use of isolated
virtual machines for individual clients.
This approach is still vulnerable to attack, by both insiders
and outsiders, and so can only be a part of an overall
security strategy.
Data loss or leakage:
For many clients, the most devastating impact from a
security breach is the loss or leakage of data.
Account or service hijacking:
Account and service hijacking, usually with stolen
credentials, remains a top threat.
With stolen credentials, attackers can often access
critical areas of deployed cloud computing services,
Allowing them to compromise the confidentiality, integrity,
and availability of those services.
Unknown risk profile:
In using cloud infrastructures, the client necessarily
cedes control to the cloud provider on a number of
issues that may affect security.
Thus the client must pay attention to and clearly define
the roles and responsibilities involved for managing
risks.
For example, employees may deploy applications and
data resources at the CP without observing the normal
policies and procedures for privacy, security, and
oversight.
Data Protection in the Cloud