• No results found

ch12 DatabaseSecurity

N/A
N/A
Protected

Academic year: 2020

Share "ch12 DatabaseSecurity"

Copied!
24
0
0

Loading.... (view fulltext now)

Full text

(1)

Computer Security:

Computer Security:

Principles and Practice

Principles and Practice

First Edition First Edition

by William Stallings and Lawrie Brown by William Stallings and Lawrie Brown

Lecture slides by Lawrie Brown Lecture slides by Lawrie Brown

Chapter 5 –

(2)

Database Security

(3)

Relational Databases

Relational Databases

constructed from tables of data

constructed from tables of data

 each column holds a particular type of dataeach column holds a particular type of data  each row contains a specific value theseeach row contains a specific value these

 ideally has one column where all values are ideally has one column where all values are

unique, forming an identifier/key for that row unique, forming an identifier/key for that row

have multiple tables linked by identifiers

have multiple tables linked by identifiers

use a query language to access data

use a query language to access data

items meeting specified criteria

(4)

Relational Database Example

(5)

Relational Database Elements

Relational Database Elements

relation / table / file

relation / table / file

tuple / row / record

tuple / row / record

attribute / column / field

attribute / column / field

primary key

primary key

 uniquely identifies a rowuniquely identifies a row

foreign key

foreign key

 links one table to attributes in anotherlinks one table to attributes in another

(6)

Relational Database Elements

(7)

Structured Query Language

Structured Query Language

Structure Query Language (SQL)

Structure Query Language (SQL)

 originally developed by IBM in the mid-1970soriginally developed by IBM in the mid-1970s  standardized language to define, manipulate, standardized language to define, manipulate,

and query data in a relational database and query data in a relational database

 several similar versions of ANSI/ISO standardseveral similar versions of ANSI/ISO standard CREATE TABLE department (

Did INTEGER PRIMARY KEY, Dname CHAR (30),

Dacctno CHAR (6) ) CREATE TABLE employee (

Ename CHAR (30), Did INTEGER,

SalaryCode INTEGER,

Eid INTEGER PRIMARY KEY, Ephone CHAR (10),

FOREIGN KEY (Did) REFERENCES department (Did) )

CREATE VIEW newtable (Dname, Ename, Eid, Ephone) AS SELECT D.Dname E.Ename, E.Eid, E.Ephone

(8)

Database Access Control

Database Access Control

 DBMS provide access control for databaseDBMS provide access control for database  assume have authenticated userassume have authenticated user

 DBMS provides specific access rights to portions DBMS provides specific access rights to portions

of the database of the database

 e.g. create, insert, delete, update, read, writee.g. create, insert, delete, update, read, write

 to entire database, tables, selected rows or columnsto entire database, tables, selected rows or columns

 possibly dependent on contents of a table entrypossibly dependent on contents of a table entry

 can support a range of policies:can support a range of policies:

 centralized administrationcentralized administration

 ownership-based administrationownership-based administration

(9)

SQL Access Controls

SQL Access Controls

 two commands:two commands:

 GRANT { privileges | role } [ON table] GRANT { privileges | role } [ON table]

TO { user | role | PUBLIC } [IDENTIFIED TO { user | role | PUBLIC } [IDENTIFIED

BY password] [WITH GRANT OPTION] BY password] [WITH GRANT OPTION]

• e.g. GRANT SELECT ON ANY TABLE TO ricflaire.g. GRANT SELECT ON ANY TABLE TO ricflair

 REVOKE { privileges | role } [ON table] REVOKE { privileges | role } [ON table]

FROM { user | role | PUBLIC } FROM { user | role | PUBLIC }

• e.g. REVOKE SELECT ON ANY TABLE FROM ricflaire.g. REVOKE SELECT ON ANY TABLE FROM ricflair

 typical access rights are:typical access rights are:

 SELECT, INSERT, UPDATE, DELETE, SELECT, INSERT, UPDATE, DELETE,

(10)

Cascading Authorizations

(11)

Role-Based Access Control

Role-Based Access Control

role-based access control work well for DBMS

role-based access control work well for DBMS

 eases admin burden, improves securityeases admin burden, improves security

categories of database users:

categories of database users:

 application ownerapplication owner

 end userend user

 administratoradministrator

DB RBAC must manage roles and their users

DB RBAC must manage roles and their users

(12)

Inference

(13)

Inference Example

(14)

Inference Countermeasures

Inference Countermeasures

inference detection at database design

inference detection at database design

 alter database structure or access controlsalter database structure or access controls

inference detection at query time

inference detection at query time

 by monitoring and altering or rejecting queriesby monitoring and altering or rejecting queries

need some inference detection algorithm

need some inference detection algorithm

 a difficult problema difficult problem

(15)

Statistical Databases

Statistical Databases

provides data of a statistical nature

provides data of a statistical nature

 e.g. counts, averagese.g. counts, averages

two types:

two types:

 pure statistical databasepure statistical database

 ordinary database with statistical accessordinary database with statistical access

• some users have normal access, others statisticalsome users have normal access, others statistical

access control objective to allow statistical

access control objective to allow statistical

use without revealing individual entries

(16)

Statistical Database Security

Statistical Database Security

use a characteristic formula C

use a characteristic formula C

 a logical formula over the values of attributesa logical formula over the values of attributes  e.g.e.g. (Sex=Male) AND ((Major=CS) OR (Major=EE))

query set X(

query set X(

C

C

) of characteristic formula

) of characteristic formula

C

C

,

,

is the set of records matching C

is the set of records matching C

a statistical query is a query that produces

a statistical query is a query that produces

a value calculated over a query set

(17)

Statistical Database Example

(18)

Protecting

Protecting

Against

Against

Inference

(19)

Tracker Attacks

Tracker Attacks

divide queries into parts

divide queries into parts

 C = C1.C2C = C1.C2

 count(C.D) = count(C1) - count (C1. ~count(C.D) = count(C1) - count (C1. ~C2)C2)

combination is called a tracker

combination is called a tracker

each part acceptable query size

each part acceptable query size

(20)

Other Query Restrictions

Other Query Restrictions

query set overlap control

query set overlap control

 limit overlap between new & previous querieslimit overlap between new & previous queries  has problems and overheadshas problems and overheads

partitioning

partitioning

 cluster records into exclusive groupscluster records into exclusive groups  only allow queries on entire groupsonly allow queries on entire groups

query denial and information leakage

query denial and information leakage

 denials can leak informationdenials can leak information

(21)

Perturbation

Perturbation

 add noise to statistics generated from dataadd noise to statistics generated from data

 will result in differences in statisticswill result in differences in statistics

 data perturbation techniquesdata perturbation techniques

 data swappingdata swapping

 generate statistics from probability distributiongenerate statistics from probability distribution

 output perturbation techniquesoutput perturbation techniques

 random-sample queryrandom-sample query

 statistic adjustmentstatistic adjustment

(22)

Database Encryption

Database Encryption

 databases typical a valuable info resourcedatabases typical a valuable info resource

 protected by multiple layers of security: firewalls, protected by multiple layers of security: firewalls,

authentication, O/S access control systems, DB

authentication, O/S access control systems, DB

access control systems, and database encryption

access control systems, and database encryption

can encryptcan encrypt

 entire database - very inflexible and inefficiententire database - very inflexible and inefficient

 individual fields - simple but inflexible individual fields - simple but inflexible

 records (rows) or columns (attributes) - bestrecords (rows) or columns (attributes) - best

• also need attribute indexes to help data retrievalalso need attribute indexes to help data retrieval

(23)

Database Encryption

(24)

Summary

Summary

introduced databases and DBMS

introduced databases and DBMS

relational databases

relational databases

database access control issues

database access control issues

 SQL, role-basedSQL, role-based

inference

inference

statistical database security issues

statistical database security issues

References

Related documents

City of Traverse City Climate Action Plan 27 WORKING TO CREATE A CULTURE OF ENERGY CONSERVATION AND ENVIRONMENTAL STEWARDSHIP With concerns over energy costs and climate

The product type of the Target of Evaluation (TOE) described in this ST is a database management system (DBMS) with the capability to limit TOE access to

• Washington State Department of Social and Health Services, Division of Alcohol and Substance Abuse. Improving the statewide adolescent treatment system of care, strategic

The purpose of this research study was to use PRA as a tool to involve community members in improving the road safety status in the area of Blaauwbosch.. The outcomes of

Android platform includes the popular open source SQLite database which has been used with great success as on-disk file format that allows the developer to handle data in a

The Shaping the Future research identifies measurement, assessment and evaluation – gathering information to assess the impact of actions and inform decision-making – as a

Interestingly, during this time, the mPFC and HC are also expressing 5-HTT and can thus take up, store and potentially release 5-HT, a feature which may be important in

Preliminary EM-DAT data for 2014 show that even fewer than average people were affected by disasters worldwide last year (102 million in total), extending the declining trend in