Lecture 14: Security Friday, October 28, 2005.

Slides:



Advertisements
Similar presentations
Chapter 23 Database Security and Authorization Copyright © 2004 Pearson Education, Inc.
Advertisements

Jan. 2014Dr. Yangjun Chen ACS Database security and authorization (Ch. 22, 3 rd ed. – Ch. 23, 4 th ed. – Ch. 24, 6 th )
Database Security CS461/ECE422 Spring Overview Database model – Relational Databases Access Control Inference and Statistical Databases Database.
Security and Authorization. Introduction to DB Security Secrecy: Users shouldn’t be able to see things they are not supposed to. –E.g., A student can’t.
Database Security by Muhammad Waheed Aslam SIS Project Leader ITC/KFUPM.
Database Management System
Security and Authorization. Introduction to DB Security Secrecy: Users shouldn’t be able to see things they are not supposed to. –E.g., A student can’t.
Monday, 08 June 2015Dr. Mohamed Osman1 What is Database Administration A high level function (technical Function) that is responsible for ► physical DB.
1 Current Trends in Data Security Dan Suciu Joint work with Gerome Miklau.
1 Lecture 13: Security Wednesday, October 26, 2006.
System Administration Accounts privileges, users and roles
Security and Authorization. Introduction to DB Security Secrecy: Users shouldn’t be able to see things they are not supposed to. –E.g., A student can’t.
CSCI 5707: Database Security Pusheng Zhang University of Minnesota March 2, 2004.
About physical design After you have provided your scripts Understand the problems Present a template that can be used to report on the physical design.
Utility Service Database Design a database to keep track of service calls for a utility company: Customers call to report problems Call center manages.
ORACLE DATABASE SECURITY
1 Lecture 15-16: Security Wednesday, May 17, 2006.
1 Lecture 14: Midterm Review Security Friday, February 4, 2005.
1 Database Security Floris Geerts. Course organization One introductory lecture (this one) Then, a range of db security topics presented by you You will.
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 6 Virtual Private Databases.
CSIS 4310 – Advanced Databases Virtual Private Databases.
Switch off your Mobiles Phones or Change Profile to Silent Mode.
SEC835 Practical aspects of security implementation Part 1.
Computer Security: Principles and Practice
DCL/1 Data Control Language Objectives –To learn about the security mechanisms implemented in an RDBMS and how to use them Contents –Identifying Users.
Copyright © 2013 Curt Hill Database Security An Overview with some SQL.
Chapter No 4 Query optimization and Data Integrity & Security.
Dale Roberts 1 Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
Fine Grained Authorization Through Predicated Grants Surajit Chaudhuri, Tanmoy Dutta, S. Sudarshan (ICDE 2007) Presented By: Ahmad Abusalah
1 Lecture 16: Data Storage Friday, November 5, 2004.
Database Security Lesson Introduction ●Understand the importance of securing data stored in databases ●Learn how the structured nature of data in databases.
Academic Year 2014 Spring Academic Year 2014 Spring.
Chapter 5 : Integrity And Security  Domain Constraints  Referential Integrity  Security  Triggers  Authorization  Authorization in SQL  Views 
Chapter 9 Database Security and Authorization Copyright © 2004 Pearson Education, Inc.
Database Management Systems, 2 nd Edition, R. Ramakrishnan and J. Gehrke1 Security Lecture 17.
Oracle 11g: SQL Chapter 7 User Creation and Management.
Chapter 6 Virtual Private Databases
Database Security. Introduction to Database Security Issues (1) Threats to databases Loss of integrity Loss of availability Loss of confidentiality To.
Database Security Database System Implementation CSE 507 Some slides adapted from Navathe et. Al.
Database Security Advanced Database Dr. AlaaEddin Almabhouh.
IST 210 Security. IST 210 Introduction to DB Security Secrecy: Users should not be able to see things they are not supposed to. E.g., A student can’t.
Cosc 5/4765 Database security. Database Databases have moved from internal use only to externally accessible. –Organizations store vast quantities of.
What is Database Administration ?
Database and Cloud Security
Database System Implementation CSE 507
“Introduction To Database and SQL”
Managing Privileges.
Database Security and Authorization
Lecture 13: Midterm Review and Security
SQL: Advanced Options, Updates and Views Lecturer: Dr Pavle Mogin
OER- UNIT 3 Authorization
“Introduction To Database and SQL”
Database Fundamentals
The Relational Model Relational Data Model
Advanced SQL: Views & Triggers
אבטחת נתונים בסביבת SQL Data Security
Lecture 09: Functional Dependencies, Database Design
A Guide to SQL, Eighth Edition
Lecture 05 Views, Constraints
SQL .. An overview lecture3.
Access Control.
Relational Database Design
Copyright © 2013 – 2018 by Curt Hill
Access Control.
Database Design: Relational Model
Current Trends in Data Security
Presentation transcript:

Lecture 14: Security Friday, October 28, 2005

Outline SQL Security – 8.7 Two famous attacks Two new trends

Discretionary Access Control in SQL GRANT privileges ON object TO users [WITH GRANT OPTIONS] privileges = SELECT | INSERT(column-name) | UPDATE(column-name) | DELETE | REFERENCES(column-name) object = table | attribute

Examples Queries allowed to Yuppy: Queries denied to Yuppy: GRANT INSERT, DELETE ON Customers TO Yuppy WITH GRANT OPTIONS Queries allowed to Yuppy: INSERT INTO Customers(cid, name, address) VALUES(32940, ‘Joe Blow’, ‘Seattle’) DELETE Customers WHERE LastPurchaseDate < 1995 Queries denied to Yuppy: SELECT Customer.address FROM Customer WHERE name = ‘Joe Blow’

Examples Now Michael can SELECT, but not INSERT or DELETE GRANT SELECT ON Customers TO Michael Now Michael can SELECT, but not INSERT or DELETE

Examples Michael can say this: GRANT SELECT ON Customers TO Yuppi GRANT SELECT ON Customers TO Michael WITH GRANT OPTIONS Michael can say this: GRANT SELECT ON Customers TO Yuppi Now Yuppi can SELECT on Customers

Examples Leah can update, but only Product.price, but not Product.name GRANT UPDATE (price) ON Product TO Leah Leah can update, but only Product.price, but not Product.name

Examples Customer(cid, name, address, balance) Orders(oid, cid, amount) cid= foreign key Bill has INSERT/UPDATE rights to Orders. BUT HE CAN’T INSERT ! (why ?) GRANT REFERENCES (cid) ON Customer TO Bill Now Bill can INSERT tuples into Orders

Fred is not allowed to see this Views and Security David owns Fred is not allowed to see this Customers: Name Address Balance Mary Huston 450.99 Sue Seattle -240 Joan 333.25 Ann Portland -520 CREATE VIEW PublicCustomers SELECT Name, Address FROM Customers GRANT SELECT ON PublicCustomers TO Fred David says

John is allowed to see only <0 balances David owns Views and Security John is allowed to see only <0 balances Customers: Name Address Balance Mary Huston 450.99 Sue Seattle -240 Joan 333.25 Ann Portland -520 CREATE VIEW BadCreditCustomers SELECT * FROM Customers WHERE Balance < 0 GRANT SELECT ON BadCreditCustomers TO John David says

Views and Security . . . Each customer should see only her/his record David says Views and Security Each customer should see only her/his record CREATE VIEW CustomerMary SELECT * FROM Customers WHERE name = ‘Mary’ GRANT SELECT ON CustomerMary TO Mary Name Address Balance Mary Huston 450.99 Sue Seattle -240 Joan 333.25 Ann Portland -520 CREATE VIEW CustomerSue SELECT * FROM Customers WHERE name = ‘Sue’ GRANT SELECT ON CustomerSue TO Sue Doesn’t scale. Need row-level access control ! . . .

Revokation REVOKE [GRANT OPTION FOR] privileges ON object FROM users { RESTRICT | CASCADE } Administrator says: REVOKE SELECT ON Customers FROM David CASCADE John loses SELECT privileges on BadCreditCustomers

Same privilege, same object, GRANT OPTION Revocation Same privilege, same object, GRANT OPTION Joe: GRANT [….] TO Art … Art: GRANT [….] TO Bob … Bob: GRANT [….] TO Art … Joe: GRANT [….] TO Cal … Cal: GRANT [….] TO Bob … Joe: REVOKE [….] FROM Art CASCADE What happens ??

Revocation Admin Revoke 1 Joe Art 4 2 3 Cal Bob 5 1 Joe Art 4 2 3 Cal Bob 5 According to SQL everyone keeps the privilege

Summary of SQL Security Limitations: No row level access control Table creator owns the data: that’s unfair ! Access control = great success story of the DB community... … or spectacular failure: Only 30% assign privileges to users/roles And then to protect entire tables, not columns

Summary (cont) Most policies in middleware: slow, error prone: SAP has 10**4 tables GTE over 10**5 attributes A brokerage house has 80,000 applications A US government entity thinks that it has 350K Today the database is not at the center of the policy administration universe [Rosenthal&Winslett’2004]

Two Famous Attacks SQL injection Sweeney’s example

[Chris Anley, Advanced SQL Injection In SQL] Your health insurance company lets you see the claims online: User: Password: fred ******** First login: Now search through the claims : Search claims by: Dr. Lee SELECT…FROM…WHERE doctor=‘Dr. Lee’ and patientID=‘fred’

SQL Injection Now try this: Search claims by: Dr. Lee’ OR patientID = ‘suciu’; -- …..WHERE doctor=‘Dr. Lee’ OR patientID=‘suciu’; --’ and patientID=‘fred’ Better: Search claims by: Dr. Lee’ OR 1 = 1; --

SQL Injection When you’re done, do this: Search claims by: Dr. Lee’; DROP TABLE Patients; --

SQL Injection The DBMS works perfectly. So why is SQL injection possible so often ? Quick answer: Poor programming: use stored procedures ! Deeper answer: Move policy implementation from apps to DB

Latanya Sweeney’s Finding In Massachusetts, the Group Insurance Commission (GIC) is responsible for purchasing health insurance for state employees GIC has to publish the data: GIC(zip, dob, sex, diagnosis, procedure, ...)

Latanya Sweeney’s Finding Sweeney paid $20 and bought the voter registration list for Cambridge Massachusetts: GIC(zip, dob, sex, diagnosis, procedure, ...) VOTER(name, party, ..., zip, dob, sex)

Latanya Sweeney’s Finding zip, dob, sex William Weld (former governor) lives in Cambridge, hence is in VOTER 6 people in VOTER share his dob only 3 of them were man (same sex) Weld was the only one in that zip Sweeney learned Weld’s medical records !

Latanya Sweeney’s Finding All systems worked as specified, yet an important data has leaked How do we protect against that ? Some of today’s research in data security address breaches that happen even if all systems work correctly

Summary on Attacks SQL injection: A correctness problem: Security policy implemented poorly in the application Sweeney’s finding: Beyond correctness: Leakage occurred when all systems work as specified

Two Novel Techniques K-anonymity, information leakage Row-level access control

Information Leakage: k-Anonymity [Samarati&Sweeney’98, Meyerson&Williams’04] Information Leakage: k-Anonymity Definition: each tuple is equal to at least k-1 others Anonymizing: through suppression and generalization First Last Age Race * Stone 30-50 Afr-Am John R* 20-40 Afr-am First Last Age Race Harry Stone 34 Afr-Am John Reyser 36 Cauc Beatrice 47 Afr-am Ramos 22 Hisp Disease Flue Measels Pain Fever Hard: NP-complete for suppression only Approximations exists; but work poorly in practice

Information Leakage: Query-view Security [Miklau&S’04, Miklau&Dalvi&S’05,Yang&Li’04] Information Leakage: Query-view Security Have data: TABLE Employee(name, dept, phone) Secret Query View(s) Disclosure ? S(name) V(name,phone) total S(name,phone) V1(name,dept) V2(dept,phone) big S(name) V(dept) tiny S(name) where dept=‘HR’ V(name) where dept=‘RD’ none

Fine-grained Access Control Control access at the tuple level. Policy specification languages Implementation

Policy Specification Language No standard, but usually based on parameterized views. CREATE AUTHORIZATION VIEW PatientsForDoctors AS SELECT Patient.* FROM Patient, Doctor WHERE Patient.doctorID = Doctor.ID and Doctor.login = %currentUser Context parameters

Implementation SELECT Patient.name, Patient.age FROM Patient WHERE Patient.disease = ‘flu’ SELECT Patient.name, Patient.age FROM Patient, Doctor WHERE Patient.disease = ‘flu’ and Patient.doctorID = Doctor.ID and Patient.login = %currentUser e.g. Oracle

Two Semantics SELECT count(*) FROM Patients WHERE disease=‘flu’ The Truman Model = filter semantics transform reality ACCEPT all queries REWRITE queries Sometimes misleading results The non-Truman model = deny semantics reject queries ACCEPT or REJECT queries Execute query UNCHANGED May define multiple security views for a user SELECT count(*) FROM Patients WHERE disease=‘flu’ Suppose we allow SELECT count(*) FROM Patients WHERE Patient.disease = %d, but only when the count is > 10. Suppose that there are > 10 patients with flue, and the user knows that. Adopting an instance-independent definition, this query is invalid; but with an instance-dependent definition the query is valid. [Rizvi’04]

Summary on Information Disclosure The theoretical research: Exciting new connections between databases and information theory, probability theory, cryptography The applications: many years away [Abadi&Warinschi’05]

Summary of Fine Grained Access Control Trend in industry: label-based security Killer app: application hosting Independent franchises share a single table at headquarters (e.g., Holiday Inn) Application runs under requester’s label, cannot see other labels Headquarters runs Read queries over them Oracle’s Virtual Private Database [Rosenthal&Winslett’2004]