Dbsecurity
Dbsecurity
Dbsecurity
Database Security
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
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) Topics versus Books
Database Security
1) DB security books
Database Security
• [1] Knox, David (2004), Effective Oracle Database 10g Security by Design, McGraw-Hill. ISBN
0-07-223130-0
• [5] Afyouni, Hassan A. (2006), Database Security and Auditing, Thompson Course Technology,
0-619-21559-4.
• [6] Litchfield, “The Database Hacker’s Handbook: Defending Database Servers”,
http://www.amazon.com/gp/reader/0764578014/ref=sib_dp_pop_toc?ie=UTF8&p=S00C#
• [7] Marlene Theriault & William Heney , http://oreilly.com/catalog/orasec/chapter/ch07.html
Oracle Security.
• [8] Charles P. Pfleeger, Shari Lawrence Pfleeger, Security in Computing, Prentice Hall, ISBN-10:
0132390779, October 2006. 4th ed.
• [9] Michael Howard , David LeBlanc, Writing Secure Code, Microsoft Press, 2nd edition, 2003,
2nd edition, ISBN n. 0-7356-1722-8.
• [10] Natan, Ron Ben (2005), Implementing Database Security and Auditing, Elsevier Digital
Press, 1-5558-334-2, 2005.
• [11] Finnigan, Pete. Oracle Security Step-by-Step, SANS Press, v. 2, 2004.
• You may also go to http://adbc.kennesaw.edu (Database Courseware) and select the Security
Module
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
End
Of
Today’s
Lecture.