0% found this document useful (0 votes)
13 views44 pages

Databasecurity

The presentation covers database security, emphasizing the importance of protecting sensitive data from vulnerabilities such as weak passwords and identity theft. It outlines various levels of data security, access control methods (DAC, MAC, RBAC), and provides security checklists for securing database servers. Additionally, it discusses the vulnerability management lifecycle and issues related to data aggregation and inference.

Uploaded by

kristysta22
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views44 pages

Databasecurity

The presentation covers database security, emphasizing the importance of protecting sensitive data from vulnerabilities such as weak passwords and identity theft. It outlines various levels of data security, access control methods (DAC, MAC, RBAC), and provides security checklists for securing database servers. Additionally, it discusses the vulnerability management lifecycle and issues related to data aggregation and inference.

Uploaded by

kristysta22
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

Database security

Presentation for Information System Security course

Vysoké učenı́ technické v Brně, Fakulta informačnı́ch technologiı́ v Brně


Božetěchova 2, 612 66 Brno
[email protected]
Content of presentation

1 Introduction 4 Database vulnerabilities


Importance of Data Weak passwords
Identity theft 5 Securing database server
Ideas Security checklist
2 Levels of Data Security Vulnerability management lifecycle
Introduction Proactive Hardening
Physical level Real-Time Monitor
Network level 6 Data aggregation
Operating system level Inference
Database system level Statistické databáze
Application level Protiopatřenı́
Human level De-anonymizace uživatelů
3 Access control
Introduction
DAC
MAC
RBAC

BIS Introduction (03.11.2010) 2/44


Importance of Data

Data = crown jewels for organizations


easy access to information in DB
sensitivity of information stored in DB
bank accounts, credit card, salary, income tax data
university admissions, marks
Databases in
business
medicine
financial
national security
...
Recent headlines
Personal information of millions of credit card users stolen.
Hackers steal passwords of Facebook users.(15.5.2009)

BIS Introduction / Importance of Data (03.11.2010) 3/44


Identity theft

Pretend to be someone else and get credit cards in their name


Hurts victims even more than regular theft
Categories
Business/commercial identity theft
Criminal identity theft
Financial identity theft
Identity cloning
Medical identity theft

BIS Introduction / Identity theft (03.11.2010) 4/44


Ideas

Bad things only happen to other people.


Most web application vulnerable to SQL intejction attack
Database security - protection from malicious attempts to steal or
modify data.

BIS Introduction / Ideas (03.11.2010) 5/44


Content of presentation

1 Introduction 4 Database vulnerabilities


Importance of Data Weak passwords
Identity theft 5 Securing database server
Ideas Security checklist
2 Levels of Data Security Vulnerability management lifecycle
Introduction Proactive Hardening
Physical level Real-Time Monitor
Network level 6 Data aggregation
Operating system level Inference
Database system level Statistické databáze
Application level Protiopatřenı́
Human level De-anonymizace uživatelů
3 Access control
Introduction
DAC
MAC
RBAC

BIS Levels of Data Security (03.11.2010) 6/44


Levels of Data Security Introduction

Human - corrupt or carelees user


Database application program
Database system
Operating system
Network level
Physical level

BIS Levels of Data Security / Introduction (03.11.2010) 7/44


Physical level

Traditional lock & key security


Security services
Protection from floods, fire, . . .
Remote backup for disaster recovery
Archival backup - tabes

BIS Levels of Data Security / Physical level (03.11.2010) 8/44


Network level

Firewall, IDS, IPS, Honeypots


DMZ, ACL, . . .
Eavesdropping and Masqueradin
use encryption
ipsec, vpn, ..
Aviod man in the middle attack
Digital certificates
Three-Tier Design:
Internet - FW - Web - FW - Application - FW - Database

BIS Levels of Data Security / Network level (03.11.2010) 9/44


Operating system level

Protection from malware attack critical


System & services 0-day updates
Correct configuration

BIS Levels of Data Security / Operating system level (03.11.2010) 10/44


Database system level

Use encryption?
just user passwords
data stored in DB
encrypt data in transit
Integrity
User Authentication and Authorization

BIS Levels of Data Security / Database system level (03.11.2010) 11/44


Application level level

Application authenticates/authorizes users


Application itself authenticates into database
database password
using secure connection

BIS Levels of Data Security / Application level (03.11.2010) 12/44


Human system level

Users abuse passwords


easy to guess password
share password with others
social engineering
Smartcards
Use biometrics
Central authentication systems - ldap, kerberos, active directory

BIS Levels of Data Security / Human level (03.11.2010) 13/44


Content of presentation

1 Introduction 4 Database vulnerabilities


Importance of Data Weak passwords
Identity theft 5 Securing database server
Ideas Security checklist
2 Levels of Data Security Vulnerability management lifecycle
Introduction Proactive Hardening
Physical level Real-Time Monitor
Network level 6 Data aggregation
Operating system level Inference
Database system level Statistické databáze
Application level Protiopatřenı́
Human level De-anonymizace uživatelů
3 Access control
Introduction
DAC
MAC
RBAC

BIS Access control (03.11.2010) 14/44


Access control Introduction

DAC - Discretionary Access Control


means of restricting access to objects based on the identity of subjects
and/or groups to which they belong.
privileges to access to specific databases,tables, columns with specific
operation like select, insert, . . .
MAC - Mandatory Access Control
classified user and data to several levels of security and then enforce
corresponding access rules

BIS Access control / Introduction (03.11.2010) 15/44


MySQL Permission Model

GRANT, REVOKE command


MySQL does not automatically revoke any privileges when you drop a
database or table.
4 privilege levels
1 Global: these privileges apply to all databases on a server.
2 Database: these privileges apply to all tables in a database.
3 Table: these apply to all columns within a table.
4 Column: these apply to individual columns in a table.
5 Routine: these apply to stored routines
Privileges: Alter, Delete, Create, Drop, Execute, Select, Update, . . .

BIS Access control / DAC (03.11.2010) 16/44


MySQL Permission Model - examples

Global privileges

Database privileges

Table privileges
Column privileges
The WITH GRANT OPTION clause gives the user the ability to give
to other users any privileges the user has at the specified privilege
level.

BIS Access control / DAC (03.11.2010) 17/44


MySQL Permission Model - views

Relation owner can create view containing limited data and then make
access to another users
CREATE VIEW myview AS SELECT name, surname FROM employee

BIS Access control / DAC (03.11.2010) 18/44


DAC problems

BIS Access control / DAC (03.11.2010) 19/44


Mandatory Access Control

Every object and subject have assigned Confidentiality level


Top Secret, Secret, Confidential, Unclassified
Simple security property
Subject S can read object O only if class(S) ≥ class(O)
Subject S can write to object O only if class(S) ≤ class(O)
Problem of Hidden channels

BIS Access control / MAC (03.11.2010) 20/44


Role-based access control

permissions to perform certain operations are assigned to specific roles


members of staff (or other system users) are assigned particular roles
users are not assigned permissions directly
Three primary rules:
Role assignment: A subject can execute a transaction only if the
subject has selected or been assigned a role.
Role authorization: A subject’s active role must be authorized for the
subject. With rule 1 above, this rule ensures that users can take on
only roles for which they are authorized.
Transaction authorization: A subject can execute a transaction only if
the transaction is authorized for the subject’s active role. With rules 1
and 2, this rule ensures that users can execute only transactions for
which they are authorized.

BIS Access control / RBAC (03.11.2010) 21/44


Content of presentation

1 Introduction 4 Database vulnerabilities


Importance of Data Weak passwords
Identity theft 5 Securing database server
Ideas Security checklist
2 Levels of Data Security Vulnerability management lifecycle
Introduction Proactive Hardening
Physical level Real-Time Monitor
Network level 6 Data aggregation
Operating system level Inference
Database system level Statistické databáze
Application level Protiopatřenı́
Human level De-anonymizace uživatelů
3 Access control
Introduction
DAC
MAC
RBAC

BIS Database vulnerabilities (03.11.2010) 22/44


TOP 10 database vulnerabilities

1 Weak Authentication - Default, Blank & Weak Username/Password


2 SQL Injections
3 Extensive user and group privileges
4 Unnecessary Enabled DB Feature
5 Broken Configuration Management
6 Buffer Overflows
7 Privilege Escalation
8 Denial of Service Attack DoS
9 Unpatched Databases
10 Unencrypted sensitive data – at rest and in motion

BIS Database vulnerabilities (03.11.2010) 23/44


Weak passwords

Oracle Defaults (Over 200 of them)


User Account: internal / Password: oracle
User Account: system / Password: manager
User Account: sys / Password: change on install
User Account: dbsnmp / Password: dbsnmp
MySQL Defaults
User Account: root / Password: null
User Account: admin / Password: admin
User Account: myusername / Password: mypassword
Sybase Defaults
User Account: SA / Password: null
Microsoft SQL Server Defaults
User Account: SA / Password: null

BIS Database vulnerabilities / Weak passwords (03.11.2010) 24/44


Content of presentation

1 Introduction 4 Database vulnerabilities


Importance of Data Weak passwords
Identity theft 5 Securing database server
Ideas Security checklist
2 Levels of Data Security Vulnerability management lifecycle
Introduction Proactive Hardening
Physical level Real-Time Monitor
Network level 6 Data aggregation
Operating system level Inference
Database system level Statistické databáze
Application level Protiopatřenı́
Human level De-anonymizace uživatelů
3 Access control
Introduction
DAC
MAC
RBAC

BIS Securing database server (03.11.2010) 25/44


Oracle security checklist

1 Install only what is required


2 Lock and expire default user accounts
3 Change default user passwords
4 Enable data dictionary protection
5 Practice principle of least privilege
6 Enforce access controls effectively
7 Restrict network access
8 Apply security patches and workarounds

BIS Securing database server / Security checklist (03.11.2010) 26/44


SQL Server 2000 security checklist

1 Install the most recent service pack


2 Assess your server’s security with Microsoft Baseline Security Analyzer
3 Use Windows Authentication Mode
4 Isolate your server and back it up regularly
5 Assign a strong password
6 Limit privilege level of SQL Server Services
7 Disable SQL Server ports on your firewall
8 Use the most secure file system
9 Delete or secure old setup files
10 Audit connections to SQL Server

BIS Securing database server / Security checklist (03.11.2010) 27/44


Vulnerability management lifecycle

BIS Securing database server / Vulnerability management lifecycle (03.11.2010) 28/44


Complete Database Vulnerability Assessment

1 Database Discovery
2 Penetration Testing
3 Security Audit
4 Reporting
5 Remediation: Fix Scripts
6 Keep current: ASAP updates protect against latest threats

BIS Securing database server / Proactive Hardening (03.11.2010) 29/44


Real-Time Monitor

1 Who, What and When?


2 Activity Monitoring & Alerting
3 All User Activity and System Changes
4 Complex Attacks and Threats
5 Misuse and Malicious Behavior
6 Vulnerability scan feeding IDS monitoring

BIS Securing database server / Real-Time Monitor (03.11.2010) 30/44


Content of presentation

1 Introduction 4 Database vulnerabilities


Importance of Data Weak passwords
Identity theft 5 Securing database server
Ideas Security checklist
2 Levels of Data Security Vulnerability management lifecycle
Introduction Proactive Hardening
Physical level Real-Time Monitor
Network level 6 Data aggregation
Operating system level Inference
Database system level Statistické databáze
Application level Protiopatřenı́
Human level De-anonymizace uživatelů
3 Access control
Introduction
DAC
MAC
RBAC

BIS Data aggregation (03.11.2010) 31/44


Data aggregation

Seskupovánı́ (osobnı́ch) dat do rozsáhlých databázı́


Tı́mto kombinovánı́m dat o určité citlivosti lze zı́skat informace daleko
citlivějšı́, které jinak spadajı́ do kategorie s vyššı́mi požadavky na
ochranu.
Zákon o ochraně osobnı́ch údajů (101/2000 Sb.)
nesdružovat osobnı́ údaje, které byly zı́skány k rozdı́lným účelům,
pokud zvláštnı́ zákon nestanovı́ jinak
Přı́klad: Žadatel o investici
Chodil roky ke stejnému obvodnı́mu lékaři.
Uzavřel před měsı́cem vysokou živ. pojistku.
V minulém čtvrtletı́ byl u specialisty.
Přede dvěma měsı́ci změnil obvodnı́ho lékaře.

BIS Data aggregation (03.11.2010) 32/44


Inference

Odvozenı́ informacı́ o vyššı́ citlivosti zpracovánı́m a analýzou skupiny


informacı́ o nižšı́ citlivosti.
Nepřı́mý přı́stup k informacı́m bez přı́mého přı́stupu k datům, která
tyto informace reprezentujı́.
Musı́ se zabránit zı́skánı́ konkrétnı́ch dat pomocı́ statistických (nebo
agregovaných) operacı́ nad databázı́
Co když v Cincinnati žije jenom jedna nebo několik málo osob?

BIS Data aggregation / Inference (03.11.2010) 33/44


Situace

Co když máte informace o finančnı́ situaci a zdrav. stavu


1 Přı́tele/kyně, resp. manžela/ky.
2 Spolupracovnı́ka, nadřı́zeného...
3 Všech studentů/zaměstnanců FIT.
4 Všech obyvatel mı́sta, kde žijete.
5 Všech klientů určité firmy (banky,zdravotnı́ pojišt’ovny...).
6 Všech (většiny) občanů.

BIS Data aggregation / Inference (03.11.2010) 34/44


Pravděpodobnost neoprávněného použitı́

Počet osob, které majı́ k informacı́m přı́stup (operátoři, uživatelé


systému ap.).
Hodnota informacı́
Výše trestu těm, kdo data jiných řádně neohlı́dali a spolupodı́leli se tak
na jejich úniku.
Výše trestu těm, kdo s nimi neoprávněně manipulujı́.
Úroveň ochranných mechanismů.

BIS Data aggregation / Inference (03.11.2010) 35/44


Řešenı́?

1 U menšı́ch souborů osobnı́ch dat provádět agregaci jen v nutných


přı́padech.
2 U většı́ch souborů neprovádět agregaci.
3 Statistické databáze!
Řešenı́ problému inference
1 Zabránit statistickým dotazům pokud výsledná množina je menšı́ než
určitá hodnota
2 Zabránit posloupnosti opakovaných dotazů, které pracujı́ se stejnou
výslednou množinou
3 Rozdělit databáze do částı́ většı́ch než určitá hodnota a a povolit
statistické dotazy k části, nebo skupině částı́, ale nikoli k podmnožině
části

BIS Data aggregation / Inference (03.11.2010) 36/44


Statistické databáze

Obsahujı́ citlivé údaje o jednotlivcı́ch.


Jejich využitı́ má být jen pro statistické dotazy k vytvořenı́ obrazu o
celkových potřebách obyvatelstva a formulovánı́ (vládnı́) politiky
Výsledky dotazů v takovýchto databázı́ch nesmějı́ poskytnout údaje o
jednotlivcı́ch.
Studium statistických databázı́ - USA, 70. léta, databáze ze sčı́tánı́
lidu (Dorothy Denning)
Studium použı́vaných způsobů pro formulaci dotazů a zı́skávánı́
odpovědı́
Ty povolovaly (netriviálnı́!) dotazy, které umožnily zı́skat údajně tajné
informace o jednotlivci
Údajně nedůvěra ve zjistěnı́ Denningové – dokud nezjistila plat svého
šéfa sériı́ legitimnı́ch dotazů

BIS Data aggregation / Statistické databáze (03.11.2010) 37/44


Kritický dotaz

Kolik je měst s 15-16 000 obyvatel


& s muži, evangelı́ky, slovenské nár., 36-40 let
& jejich ženy, 28-30 let žijı́ mimo toto město
& 2 děti do 10 let žijı́ s těmito ženami
& 1 dı́tě nad 18 žije s těmito muži
& muž žije ve vlastnı́m domě, plocha nad 200m2
& domácnost má/použı́vá aspoň 2 automobily.

BIS Data aggregation / Statistické databáze (03.11.2010) 38/44


Kompromitace databáze

Výsledkem série dotazů je jeden záznam


Databáze byla pozitivně kompromitována
Následný pokus o zı́skánı́ dalšı́ch informacı́
Výsledkem je bud’ 1 nebo 0 záznamů
Pozitivnı́/částečná kompromitace databáze
Informace o entitě i když neznáme konkrétnı́ hodnotu
Částečná kompromitace

BIS Data aggregation / Statistické databáze (03.11.2010) 39/44


Protiopatřenı́

Omezenı́ dotazu i sledovánı́ předchozı́ch dotazů


Úmyslná změna zdrojových dat
orig. hodnoty nahrazeny novým vzorkem se stejným rozloženı́m
pravděpodobnosti hodnot
Úmyslná změna výsledku dotazu (zaokrouhlovánı́)
Cı́lem je zabránit situacı́m, kdy je možné zı́skat informace o jedné
entitě

BIS Data aggregation / Protiopatřenı́ (03.11.2010) 40/44


Protiopatřenı́ - Náhodný výběr

Každý dotaz je zodpovězen na základě vyhodnocenı́ náhodně


vybraných záznamů ze všech existujı́cı́ch záznamů
Kontrola překrytı́ množiny záznamů u vı́cenásobných dotazů na tutéž
informaci.
Má zabránit situaci, kdy několik uživatelů databáze začne spolupracovat
Technika nynı́ použı́vaná v americké databázi údajů ze sčı́tánı́ lidu

BIS Data aggregation / Protiopatřenı́ (03.11.2010) 41/44


Protiopatřenı́ - techniky

Minimálnı́ rozsah dotazu


Minimum celkového počtu záznamů použitých pro tvorbu odpovědı́
Minimum počtu záznamů použitých pro tvorbu odpovědı́ na každou
část dotazu
Perturbačnı́ (zmatečné) techniky - Přidánı́ pseudonáhodného šumu“

Odpovědi konzistentnı́, ale zı́skánı́ spolehlivé odpovědi na sérii
podobných dotazů nenı́ možné
K záznamům zahrnutým pro vyhodnocenı́ dotazů se přidajı́ dalšı́
náhodně vybrané podobné záznamy
Vypočtená hodnota nebo mezihodnoty jsou zaokrouhlovány nebo
mı́rně pozměněny

BIS Data aggregation / Protiopatřenı́ (03.11.2010) 42/44


De-anonymizace uživatelů

Narayanan a Shmatikov (2008) - Huge de-anonymization of large


sparse datasets (ACM)
Databáze hodnocenı́ filmů
Databáze zpřı́stupněna anonymizovaně“

Uživatel hodnotı́ filmy (filmů jsou stovky) na škále 1-10
Uživatele se podařilo de-anonymizovat,pokud vı́me jeho hodnocenı́ pro
5-8 filmů

BIS Data aggregation / De-anonymizace uživatelů (03.11.2010) 43/44


Questions

BIS Questions (03.11.2010) 44/44

You might also like