Security CPSC 356 Database Ellen Walker Hiram College (Includes figures from Database Systems by Connolly & Begg, © Addison Wesley 2002)

Slides:



Advertisements
Similar presentations
Chapter 10 Encryption: A Matter of Trust. Awad –Electronic Commerce 1/e © 2002 Prentice Hall 2 OBJECTIVES What is Encryption? Basic Cryptographic Algorithm.
Advertisements

Chapter 23 Database Security and Authorization Copyright © 2004 Pearson Education, Inc.
Spring 2000CS 4611 Security Outline Encryption Algorithms Authentication Protocols Message Integrity Protocols Key Distribution Firewalls.
Topic 8: Secure communication in mobile devices. Choice of secure communication protocols, leveraging SSL for remote authentication and using HTTPS for.
SECURITY IN E-COMMERCE VARNA FREE UNIVERSITY Prof. Teodora Bakardjieva.
Database Administration and Security Transparencies 1.
1 Supplement III: Security Controls What security services should network systems provide? Confidentiality Access Control Integrity Non-repudiation Authentication.
Database Management System
Part 5:Security Network Security (Access Control, Encryption, Firewalls)
Principles of Information Security, 2nd edition1 Cryptography.
Client/Server Computing Model of computing in which very powerful personal computers (clients) are connected in a network with one or more server computers.
Electronic Transaction Security (E-Commerce)
Security Dale-Marie Wilson, Ph.D.. Why Database Security? Data Valuable resource Must be strictly controlled and managed Corporate resource Have strategic.
1 Minggu 7, Pertemuan 13 Security Matakuliah: T0206-Sistem Basisdata Tahun: 2005 Versi: 1.0/0.0.
Chapter 8 Security Transparencies © Pearson Education Limited 1995, 2005.
Chapter 16 Security. 2 Chapter 16 - Objectives u The scope of database security. u Why database security is a serious concern for an organization. u The.
Database Features Lecture 2. Desirable features in an information system Integrity Referential integrity Data independence Controlled redundancy Security.
Chapter 19 Security.
Chapter 19 Security Transparencies © Pearson Education Limited 1995, 2005.
Alter – Information Systems 4th ed. © 2002 Prentice Hall 1 E-Business Security.
DATABASE SECURITY By Oscar Suciadi CS 157B Prof. Sin-Min Lee.
Chapter 19 Security Transparencies. 2 Chapter 19 - Objectives Scope of database security. Why database security is a serious concern for an organization.
1 Introduction to Security and Cryptology Enterprise Systems DT211 Denis Manley.
Chapter 13 Network Security. Contents Definition of information security Role of network security Vulnerabilities, threats and controls Network security.
Lecture 12 Electronic Business (MGT-485). Recap – Lecture 11 E-Commerce Security Environment Security Threats in E-commerce Technology Solutions.
Chapter 19 Security Integrity Security Control –computer-based –non-computer-based PC security DBMS and Web security Risk Analysis Data protection and.
D ATABASE A DMINISTRATION L ECTURE N O 4 Muhammad Abrar.
ISOM MIS3150 Data and Info Mgmt Database Security Arijit Sengupta.
Chapter 14 Encryption: A Matter Of Trust. Awad –Electronic Commerce 2/e © 2004 Pearson Prentice Hall 2 OBJECTIVES What is Encryption? Basic Cryptographic.
Jim McLeod MyDBA  SQL Server Performance Tuning Consultant with MyDBA  Microsoft Certified Trainer with SQLskills Australia 
1 Chapter 9 E- Security. Main security risks 2 (a) Transaction or credit card details stolen in transit. (b) Customer’s credit card details stolen from.
E-Commerce Security Technologies : Theft of credit card numbers Denial of service attacks (System not availability ) Consumer privacy (Confidentiality.
Chapter 37 Network Security. Aspects of Security data integrity – data received should be same as data sent data availability – data should be accessible.
Dr. L. Christofi1 Local & Metropolitan Area Networks ACOE322 Lecture 8 Network Security.
SEC835 Practical aspects of security implementation Part 1.
Protecting Internet Communications: Encryption  Encryption: Process of transforming plain text or data into cipher text that cannot be read by anyone.
Cryptography, Authentication and Digital Signatures
E-commerce What are the relationships among: – Client (i.e. you) – Server – Bank – Certification authority Other things to consider: – How to set up your.
E-Commerce Security Professor: Morteza Anvari Student: Xiaoli Li Student ID: March 10, 2001.
Certificate-Based Operations. Module Objectives By the end of this module participants will be able to: Define how cryptography is used to secure information.
Web Security : Secure Socket Layer Secure Electronic Transaction.
Types of Electronic Infection
Internet Security. 2 PGP is a security technology which allows us to send that is authenticated and/or encrypted. Authentication confirms the identity.
Section 3 Database Security. 3-2 CA306 Introduction Section Content 3.1 Security Overview 3.2 Security Controls 3.3 Views 3.4 Security in Oracle 3.5 Web.
Chapter 8 – Network Security Two main topics Cryptographic algorithms and mechanisms Firewalls Chapter may be hard to understand if you don’t have some.
CSCI 3140 Module 6 – Database Security Theodore Chiasson Dalhousie University.
11/4/2012ISC239 Isabelle Bichindaritz1 Database Security.
Database Security Tampere University of Technology, Introduction to Databases. Oleg Esin.
Encryption. Introduction The incredible growth of the Internet has excited businesses and consumers alike with its promise of changing the way we live.
IT Security. What is Information Security? Information security describes efforts to protect computer and non computer equipment, facilities, data, and.
Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.
Deck 10 Accounting Information Systems Romney and Steinbart Linda Batch March 2012.
Secure Transactions Chapter 17. The user's machine No control over security of user's machine –Might be in very insecure: library, school, &c. Users disable.
Web Database Security Session 12 & 13 Matakuliah: Web Database Tahun: 2008.
@Yuan Xue Case Study (Mid-term question) Bob sells BatLab Software License Alice buys BatLab Credit card information Number of.
PAYMENT GATEWAY Presented by SHUJA ASHRAF SHAH ENROLL: 4471
Security and Administration Transparencies
By Oscar Suciadi CS 157B Prof. Sin-Min Lee
By Oscar Suciadi CS 157B Prof. Sin-Min Lee
By Oscar Suciadi CS 157B Prof. Sin-Min Lee
Module 4 System and Application Security
Presentation transcript:

Security CPSC 356 Database Ellen Walker Hiram College (Includes figures from Database Systems by Connolly & Begg, © Addison Wesley 2002)

Database Security: Definitions Security –The mechanisms that protect the database against intentional or accidental threats Threat –Any situation or event, whether intentional or accidental, that may adversely affect a system and consequently the organization

Why Security Data is a valuable resource Corporate data can be strategic –Trade secrets –Customer relationship information –Details of financials (costs, profits, etc.) Personal data can be sensitive –Medical records –Financial records

Aspects of Security Risk Theft and fraud Loss of confidentiality Loss of privacy Loss of integrity Loss of availability

Examples of Threats & Risks Using another person’s access –Theft/fraud, confidentiality, privacy Unauthorized changes to data –Theft/fraud, integrity, availability Theft of data, programs, and equipment –Theft/fraud, confidentiality, privacy, availability Power loss or surge; fire; physical damage –Integrity, availability Inadequate staff training –Confidentiality, privacy, integrity, availability

Sources of Threats (p. 521)

Who can use the data? Authorization –Granting a user rights or privileges to access the system or some data Controlling privileges –Discretionary Access Control SQL grant & revoke statements –Mandatory Access Control Clearance attributes in tuples themselves

SQL GRANT / REVOKE –GRANT SELECT ON Hotel, Room, Booking TO Users –GRANT SELECT, UPDATE on Hotel, Room, Booking TO Managers WITH GRANT OPTION –REVOKE ALL PRIVILEGES from User256

… Are You Who You Say You Are? Authentication –Secret passwords (most common) –Physical “keys” (e.g. dongles) –Biometrics Fingerprint Voiceprint Retinal scan Iris measurements

Risks of Passwords Guessable passwords –Name, address, significant other, ssn –Dictionary words (or slight variations) –No special characters –Short passwords Shared passwords –Sharing with friends –Sticky note on monitor –Fraud

DBMS Account/Passwords Separate passwords for the DBMS –Some degree of safety –Users need to remember multiple passwords Use OS accounts / passwords –DB is only as secure as OS –User can’t be one account on OS and another on DB

Users & Groups DBA can set up users and groups; assign users to groups –E.g. Administrators, Managers, Users Users and Groups can have various authorizations –SELECT, UPDATE, DELETE, INSERT, ALL Access control matrix –Rows are users / groups –Columns are attributes –Values are privileges

Views Views allow attributes to be hidden from users User has access to view, but not to base table –Faculty sees class list, but cannot access complete student records –Department members see total salary budget, but not individual salaries

Statistical Database Security Careful use of aggregates can reveal “hidden” information! –Min and max of salaries of dept. with 2 individuals –Average salaries of two sets of employees that overlap by exactly one individual –Careful construction of conditions that select one individual

Countermeasures Don’t report small sets –Still doesn’t solve “difference” problem Add random “noise” to each result –Aggregate data will be “close enough” for most valid purposes –Differences won’t be accurate anymore –Many databases do this

Encryption Prevents data from being useful if it is stolen… –Theft of media (disks, backup tapes) –Eavesdropping (wiretapping, network “sniffing”) Unauthorized user sees gibberish Authorized access through DB gets decrypted –Requires extra time for every access

Encryption Definitions Plaintext –The original information Ciphertext –Information as stored or passed on a public line (unintelligible) Encryption Key, Algorithm –Transforms plaintext into ciphertext Decryption Key, Algorithm –Transforms ciphertext into plaintext

Encryption Ideas Use a secret algorithm to transform the data. Only authorized recipients know the algorithm. Use an algorithm that takes data and a key and performs math on it. For example, multiply data by key. –With the key, divide to get the data –Without the key, try all factors?

Very Simple Encryption The Caesar cipher: each letter is replaced by one 13 steps ahead (with wrap) in the alphabet. –“Database” becomes “Qngnonfr” –“Qngnonfr” becomes “Database” No specific key; encryption and decryption algorithm are the same –Can generalize to arbitrary shift; key is number of letters to shift.

Private Key Encryption Algorithm does encryption and decryption with a single key Sender and recipient of message must both have the key Problem: transmitting the key securely! Example: –Data Encryption Standard (DES) 56-bit key –PGP 128-bit key –The longer the key, the harder to break.

Public Key Encryption Pair of keys: public and private Message encrypted by public key can be decrypted by private key & vice versa (asymmetric) Algorithm is public. All public keys are in a “phone book”. If I want to send you a message, I encrypt it using your public key. Only you (with your private key) can decrypt it To sign the message, I encrypt a signature with my private key. You verify it’s me by decrypting it with my public key. Example: RSA Algorithm (initials of authors)

Public vs. Private Key Private key encryption / decryption is usually faster Private keys can be exchanged using a public key method.

RAID: Data Storage Redundancy Addresses risks of data loss, loss of integrity RAID = Redundant Array of Independent Disks Levels 0 through 6 include combinations of: –Striping: data is divided into equal-size partitions distributed among multiple disks –Error-detecting (parity) and correcting codes –Mirroring: copying data to multiple disks (see p. 530)

Error-Detecting & Correcting Codes Add extra bits to the data, so every bit combination isn’t valid Error detection –When the code is invalid we know it –Example: add a 9th bit to each group of 8 (parity bit) so that the group of 9 bits has an even number of 0’s. Error correction –Add more extra bits to each group –If one bit is wrong, there is only one change that makes the group valid –Example: Hamming Code

Web Security Internet traffic is “in the clear” – applications must encrypt/decrypt if desired Servers must be protected from external attacks across the networks Systems must be protected from executable web programs

Mechanisms for Web Security Proxy servers –Filter requests and improve performance Firewalls –May include packet filters, application gateways, and proxy servers Certificates –Include digital signatures, message digests Secure Socket Layer (and shttp)

Security on the Web Many web sites are backed by databases –Must keep database safe! The Internet is notoriously insecure We want customers to buy stuff! –Keep credit card information confidential –Convince the customer the site is authentic. –Make sure customer “matches” credit card –Make sure credit card is “real” –Make sure purchase is charged exactly once!

SQL Injection Attack Source:

SQL Injection Attack Website collects information and inserts into query, e.g. –SELECT * FROM students where name = ‘$name’; Malicious user puts SQL code into the “name” field, e.g. –Robert’; DROP TABLE students; -- Result legal SQL, but not quite what we wanted: –SELECT * FROM students where name = ‘Robert’; –DROP TABLE students; -- ‘;

Protecting against User Input Attacks Validate inputs –If it’s supposed to be a number, make sure it’s a number Verify input length (avoid “buffer overflow”) Sanitize inputs before constructing a query –Remove dangerous characters –Or escape them: ‘ becomes \’ and ; becomes \; –Mysql addslashes / stripslashes $query = “select * from table where name = ‘”. addslashes($name). “’”

Requirements for a Safe Transaction Information is inaccessible to all but sender and receiver (privacy) Information does not change between sending and receiving (integrity) Recipient knows information came from sender (authenticity) Sender knows recipient is genuine (non-fabrication) Sender cannot deny the purchase was made (non- repudiation)

Web Security Proxy server –Intercept all requests, serve local file if possible –Recent requests are saved in cache –Improves both security and performance Firewall –Examines all messages; blocks any that don’t meet security criteria Message Digest Algorithm & Digital Signature –Ensures the message is received as sent & who sent it Digital Certificates –“Authentication” of site from external authority (3rd party trust model) –Based on public key mechanism

Secure Sockets Layer, Secure HTTP SSL: protocol developed by Netscape –Creates a secure session using private key –Browser & server not involved; SSL is at a lower level –Packets are encrypted before they’re sent; decrypted when received –Complete “session” (conversation) is secure SHTTP: now owned by Verifone –Transmits individual messages securely –Browser & server involved in encryption / decryption SSL and SHTTP are complementary; many sessions use both.

Secure Electronic Transactions (SET) Open standard for processing credit card transactions on the Internet –Created by Netscape, Microsoft, Visa, Mastercard, GTE, SAIC, Terisa Systems, and Verisign Splits transaction information –Merchant sees what is purchased, how much, & payment approval –Card issuer sees purchase price but not items purchased Heavy use of certificates & encryption