Database Security, Privacy & Blockchain Security (Week 10)
Database Security, Privacy & Blockchain Security (Week 10)
Now, database security is hard as the DBMS is complex; many options, and there are
different types of databases. Not to mention the complicated interaction protocol; SQL.
It is also a mismatch between database admin and security.
From above code, the OR 1=1 always return TRUE, so the query will always return a count
greater than zero, resulting in a successful login.
SQL attack typically works by prematurely terminating a text string & appending a new
command.
Example:
Countermeasures:
1) Defensive coding - put an input type checking/validation in code
2) Detection:
a. Signature based: match attack patterns
b. Anomaly based: detect behaviour beyond norm
3) Code analysis - test suit to detect SQL vulnerabilities, check queries at run time
Privacy of Databases
Inference Attack
The idea is, basically, performing queries to an non-sensitive data, where the attacker then
Privacy of Databases
Inference Attack
The idea is, basically, performing queries to an non-sensitive data, where the attacker then
make some deduction, which results in them obtaining the sensitive data.
Example:
Countermeasures
a. Cell suppression - some of the cells in a database are removed and left blank in the
published version
b. Generalization/Averaging - some values in a published database are replaced with more
general/averaged values (rather than the actual value)
c. Noise addition - values in a published database have random values (nonces) added to
them, so that the noise across all records for the same attribute averages out to zero.
Privacy
It is about how well we hiding the individual information.
k-anonymity
Often referred to as the power of 'hiding in the crowd'. Basically, just averaging;
combining sets of data with similar attributes and averaging it.
That way, the information within a group could correspond to any single member, hence
masking the identity of the individual data (within the group).
Example of k-anonymity
However, it somehow not secure enough as other private attributes still leak (if low
diversity/range of possibilities). Example:
However, it somehow not secure enough as other private attributes still leak (if low
diversity/range of possibilities). Example:
L-diversity
It is an extension of k-anonymization, which ensuring a sufficient diversity within each
equivalence class. Example:
General countermeasures
a. Inference detection at database design - alter database structure or access controls
b. Inference detection at query time - monitoring & altering/rejecting queries
c. Some inference detection algorithm <on-going research>
Security
◊ Some query restrictions
◊ Query set overlap control
○ Limit the overlap between new & previous queries
○ Has problems & overheads
Security
◊ Some query restrictions
◊ Query set overlap control
○ Limit the overlap between new & previous queries
○ Has problems & overheads
◊ Partitioning
○ Cluster records into number of mutually exclusive groups
○ Query the statistical properties of each group as a whole
◊ Query denial & information leakage
○ Denials can leak information, thus must track queries from user
◊ Security against inference
Perturbation
It is a data security technique that adds 'noise' to databases allowing individual record
confidentiality. Hence, cannot infer values for individual records.
The output from this technique will be a random-sample query, where the system generates
statistics that are modified from those that the original database would provide.
The goal her is to minimize differences between original results & perturbed results.
The main challenge, however, is to determine the average size of the error/difference to be used
given the bigger the noise is, the inaccurate the data become.
Searchable Encryption