1 / 36

Database Security

Database Security. Floris Geerts. Course organization. One introductory lecture (this one) Then, a range of db security topics presented by you

sybil
Download Presentation

Database Security

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DatabaseSecurity Floris Geerts

  2. Course organization • One introductory lecture (this one) • Then, a range of db security topics presented by you • You will be graded on the quality of presentation, technical depth, critical assessment of the topic and ability to answer questions raised in class • No exam.

  3. Course organization • Today, after this lecture: • Send me an email floris.geerts@ua.ac.be • with your name and at most two partners (in case we need to assign multiple persons to the same topic) • A ranked list of the top 10 topics (11 topics) • Then I will assign the topics. • You’ll get time to study and prepare presentations • You send the slides to me, and incorporate comments

  4. Topics • Access control • Getting access • Access control mechanisms • Safety & integrity • Redundancy • Data integrity • Intrusion • DB specific • Software specific

  5. Topics • Cryptography • Symmetric • Asymmetric • Quantum (optional) • Privacy & Security • Statistical DB • Privacy preservation

  6. Data Security Dorothy Denning, 1982: • Data Security is the science and study of methods of protecting data (...) from unauthorized disclosure and modification • Data Security = Confidentiality + Integrity

  7. Data Security • Distinct from systems and network security • Assumes these are already secure • Tools: • Cryptography, information theory, statistics, … • Applications: • Everywhere

  8. Topic 1Access methods: “Getting in” • It is all about passwords and authentication • How are passwords used for authentication in DBMS? • What kind of password control mechanisms do DBMS have? (e.g., Oracle,…) • What makes a password good or bad? • Techniques to check this • Techniques to generate one • Alternatives to passwords (e.g., captcha)

  9. Captcha • CAPTCHA stands for Completely Automated Public Turing test to tell Computers and Humans Apart • A.K.A. Reverse Turing Test, Human Interaction Proof • The challenge: develop a software program that can create and grade challenges most humans can pass but computers cannot

  10. Topic 2:Access methods: control mechanisms • How do DBMS control access to different users? • How do DBMS assure that users can only change/query data to which they have access? • As an example

  11. Discretionary Access Control (DAC) 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

  12. Examples 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 SELECT Customer.address FROM Customer WHERE name = ‘Joe Blow’ Queries denied to Yuppy:

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

  14. Examples 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

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

  16. 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

  17. David says CREATE VIEW PublicCustomers SELECT Name, Address FROM Customers GRANT SELECT ON PublicCustomers TO Fred Views and Security David owns Fred is notallowed tosee this Customers:

  18. David says CREATE VIEW BadCreditCustomers SELECT * FROM Customers WHERE Balance > 0 GRANT SELECT ON BadCreditCustomers TO John David owns Views and Security John isallowed tosee only >0balances Customers:

  19. Revocation 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

  20. 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 ??

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

  22. Other approaches Discretionary Access Control (DAC) Label-based Access Control (LBAC) Role-based Access Control (RBAC) Mandatory Access Control (MAC) Pro’s and con’s of these control mechanisms?

  23. Topic:Safety & Integrity • It is about keeping our precious bits safe from harm. • Disk failure which mostly goes together with data loss • System failure which can cause data inconsistency. • (For example a Denial-Of-Service attack can result in system failures because of the exhaustion of system resources.

  24. Topic 3: Recovery • Mostly solved by redundancy: • having and organizing redundant information so that the data stored can be recovered in case there is a disk failure. • Where and how to store? Secondary storage, RAIDs • How to assure that all the data has a copy somewhere

  25. Topic 4: Integrity • How to assure that all data is consistent • The same data in all copies • How to assure that nothing gets corrupted during transmission • Error correcting codes • How to keep track of changes and possible unauthorized access • Transaction log/data auditing

  26. Topic 5: DB intrusion • Intrusion prevention • detecting ongoing attacks in real time in order to prevent damage to the database. • Intrusion detection • Use of database auditing • Example: SQL injection

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

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

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

  30. SQL Injection • The DBMS works perfectly. So why is SQL injection possible so often ?

  31. Topic 6: Software intrusion • Leveraging Stack and Buffer overflow in programs • How to prevent/detect such intrusions?

  32. Topic 7: Cryptography - symmetric Commonly used techniques Same encryption and decryption key DES, AES

  33. Topic 8: Cryptography – asymmetric • Different encoding and decoding keys • Public key • RSA

  34. Topic 9: Cryptography - Quantum • Newest methods based on quantum computing • You need to ask if you want this – it is a bit math heavy.

  35. Not OK SELECT name FROM Patient WHERE age=42 and sex=‘M’ and diagnostic=‘schizophrenia’ SELECT count(*) FROM Patients WHERE age=42 and sex=‘M’ and diagnostic=‘schizophrenia’ OK Topic 10: Security in Statistical DBs Goal: • Allow arbitrary aggregate SQL queries • Hide confidential data • Inference

  36. Topic 11: Privacy preservation k-Anonymity/Randomization Definition: each tuple is equal to at least k-1 others Anonymizing:

More Related