Top Banner
Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng
32

Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.

Jan 18, 2016

Download

Documents

SYDNEY RILEY
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.

Database SecurityCmpe 226Fall 2015

By Akanksha Jain Jerry Mengyuan Zheng

Page 2: Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.

Overview

Why need of database security.

Threats to Database and counter-measures

Methods of securing database.❖Through firewall❖Database Abstraction

Page 3: Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.

The Importance of Security

- To prevent unauthorized data observation. - To prevent unauthorized data modification. - To ensure the data confidential. - To make sure the data integrity is preserved. - To make sure only the authorized user have access to the data.

Page 4: Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.

The Importance of Security

It is important to define who can access what data, who is allowed and who is restricted,

whether passwords are used and how to maintain it, what sort of firewalls and anti-malware

solutions to use, how to train the staff and to enforce data security.

Page 5: Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.

The Importance of Security The most interrupted system is Microsoft Windows NT, but UNIX based operating

systems have also been maltreated.

Page 6: Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.

The Importance of Security

Page 7: Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.

Database Security in E-commerce Database

Page 8: Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.

1. Operating System layer

Page 9: Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.

2. Network Layer

Page 10: Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.

3. Web Servers

Page 11: Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.

4. Firewalls

Page 12: Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.

● use multiple passwords to access multi-functions of a server such as

using one password to access the single system for administration;

● apply a different password for another operation;

● be audited for each and every transaction of the database;

● utilize application specific user name and password and should never

use a default user name or password;

● back up the system thoroughly for late recovery in case of

accidentally break down

5. Database Server

Page 13: Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.

Threats to database

SQL Injection.Unauthorized accessBrute Force cracking of Passwords / Usernames.Network EavesDroppingStolen backup (unencrypted) tapesTargeting Unpatched database vulnerabilities.

Page 14: Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.

SQL InjectionA form of attack on a database-driven Web site in which the attacker executes unauthorized SQL commands by taking advantage of insecure code on a system connected to the Internet , bypassing the firewall.

Page 15: Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.

Unauthorized Access

Page 16: Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.

Password cracking

Page 17: Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.

Network Eavesdropping

Page 18: Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.
Page 19: Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.

Authorization - Restricted privileges, views.Encryption - public key / private key, secure sockets.Authentication – passwords.Logical - firewalls, net proxies.Access ControlStored proceduresParameterised queries.

Methods of securing database

Page 20: Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.

Authorization

Read authorization - allows reading, but not modification of dataInsert authorization - allows insertion of new data, but not modification of existing data.Update authorization - allows modification, but not deletion of data.Delete authorization - allows deletion of data

Page 21: Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.

Security of the database through FIREWALLS

Page 22: Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.

How database firewall works

Page 23: Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.

Diagramatic representation

Page 24: Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.

Advantages of firewalls

Page 25: Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.

Security of the database Through Abstraction

Data encryption enables to encrypt sensitive data, such as credit card numbers, stored in table columns.

Encrypted data is decrypted for a database user who has access to the data.Data encryption helps protect data stored on media in the event that the storage

media or data file gets stolen.Using Stored Procedures adds an extra layer of abstraction.Parameterised Queries.

Page 26: Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.

Stored procedure

Is a group of one or more SQL statements

Accept input parameters and return multiple values in the form of output parameters to the calling program.

Using procedure parameters helps guard against SQL injection attacks.

When calling a procedure over the network, only the call to execute the procedure is visible. Therefore, malicious users cannot see table and database object names, embed Transact-SQL statements of their own, or search for critical data.

Page 27: Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.

Parameterised Queries(Prepared Statements)

Prepared statement is a feature used to execute the same SQL statements repeatedly with high efficiency.

Prepared statements are very useful against SQL injections, because parameter values, which are transmitted later using a different protocol, need not be correctly escaped. If the original statement template is not derived from external input, SQL injection cannot occur.

Page 28: Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.

How data Encryption Works

Data encryption is a key-based access control system. Even if the encrypted data is retrieved, it cannot be understood until authorized decryption occurs, which is automatic for users authorized to access the table.

When a table contains encrypted columns, a single key is used regardless of the number of encrypted columns. This key is called the column encryption key.

The column encryption keys for all tables, containing encrypted columns, are encrypted with the database server master encryption key and stored in a dictionary table in the database.

The master encryption key is stored in an external security module that is outside the database and accessible only to the security administrator.

Page 29: Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.

Case: Oracle Server

Page 30: Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.

Advantages of Data Encryption

Page 31: Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.

SummaryEncrypt sensitive data.

Access the database using an account with the least privileges necessary.

Install the database using an account with the least privileges necessary.

Ensure that data is valid.

Do a code review to check for the possibility of second-order attacks.

Use parameterised queries.

Use stored procedures.

Re-validate data in stored procedures.

Ensure that error messages give nothing away about the internal architecture of the application or the database.

Page 32: Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.

Thank You!!