Database Security: Kennesaw State University
Database Security: Kennesaw State University
Database Security: Kennesaw State University
Database Security
Kennesaw State University
Overview
Database Security
1) Introduction
2) DB Security Plan
3) Database Access Control
4) DBMS Security: Patching
5) DB Application: SQL injection, Inference Threats
6) Virtual Private Databases
7) Oracle Label Security
8) Inference Threats
9) Encryption
10) Auditing
11) Datawarehouse
12) Security Animations
1) Introduction - Motivation
Database Security
David C. Knox
“Effective Oracle Database 10g Security by Design”,
McGraw Hill, 2004.
ISBN 0-07-223130-0
1) Introduction - Scope
Database Security
Implementing
Natan, Ron Ben Database Elsevier Digital
1-5558-334-2
2005 Security and Press
Auditing
Effective Oracle
Database 10g
Knox, David (2004) Oracle Press 0072231300
Security by
Design
1) Introduction – Product Specific Books
Database Security
http://www.oreilly.com/catalog/orasec/chapter/ch07.html
2) DB Security Plan
Database Security
Subjects Objects
• DAC Versus MAC O1 Oj Om
• Access Matrix Model:
Harrison-Ruzzo-Ullman S1 A[S1,O1] A[S1,Oj] A[S1,Om]
– Authorized state: Q =
(S, O, A)
– Conditions (dependent) Si A[Si,O1] A[Si,Oj] A[Si,Om]
• Data
• Time
• Context Sn A[Sn,O1] A[Sn,Oj] A[Sn,Om]
• History
2) DB Security Plan - Document User
Administration
Database Security
• Easiest way to log into an Oracle database is to use a default account with a
known password [Finnigin]
• http://www.petefinnigan.com/default/default_password_checker.htm
• This site has scripts that will identify all default users and lets you know if they
still have their default passwords. You may download these scripts.
3) DB Access Control - Password Cracking
Database Security
• http://www.petefinnigan.com/find_all_privs.sql
Example
1) Create Role AcctDept;
2) Grant Select, Update on Orders to AcctDept;
3) Grant AcctDept to Smith, Jones;
4) Grant DBA to Smith;
• Choose stand-alone for personal Oracle and login to oracle using a dba
user/password
3) DB Access Control - Connect to a Database
Database Security
• Once you login, you may create users, roles and profiles as well
as granting privileges to them through a GUI interface.
3) DB Access Control - Profiles
Database Security
• PROFILE clause: indicates the profile used for limiting database resources and enforcing
password policies. Example:
• CREATE PROFILE app_user LIMIT
SESSIONS_PER_USER UNLIMITED
CPU_PER_SESSION UNLIMITED
CPU_PER_CALL 3000
CONNECT_TIME 45
LOGICAL_READS_PER_SESSION DEFAULT
LOGICAL_READS_PER_CALL 1000
PRIVATE_SGA 15K
COMPOSITE_LIMIT 5000000;
Data access via Virtual Private Database will perform the following
five steps:
1. User sends SQL to the database server.
2. The associated table triggers a pre-defined security policy.
3. The security policy returns a predicate.
4. The SQL statement is modified according to the security policy.
5. Secured data returns to user.
Table
Table
Package
Package
Security
Security
USER
USER Step
Step11 Step
Step 2
2
Policy
Step
Step55
Step
Step44
Where
Where Step
Step 3
3
Predicate
Predicate
6) VPD - Grant Execute on DBMS_RLS
Database Security
CONNECT AS SECMAN
SQL> connect secman/s;
VPD - Definition
Database Security
A VPD security model uses the Oracle dbms_rls package (RLS stands for
row-level security) to implement the security policies and application
contexts. This requires a policy that is defined to control access to tables and
rows
6) VPD – Update Example
Database Security
• OLS and VPD are the utilities which are used for FGAC.
• Encrypting Data-in-transit
As it is transmitted between client-server
• Encrypting Data-at-rest
Storing data in the database as encrypted
• Wireshark (http://www.wireshark.org/download.html):
world’s most famous NP Analyzer. Formerly Ethereal
(www.ethereal.com).
Implement Encryption,data-in-transit
Database Security
• Disadvantages ?
Encryption within Database
Database Security
• Need to be selective
2 main types of auditing:
Database Security
Auditing examples/scripts:
• http://www.securityfocus.com/infocus/1689
• http://www.petefinnigan.com/papers/audit.sql
Example of Audit command
Database Security
Referential Integrity
Security Matrix
Row level Security
SQL Injection
Database Inference
Database Auditing
Encryption
End of Lecture
Database Security
End
Of
Today’s
Lecture.