This post explains some aspects of IT security on databases.
It is part of the main post about introduction to IT security.
Database Concurrency Issues
Lost updates occur when one transaction writes a value to the database that overwrites a value needed by transactions that have earlier precedence, causing those transactions to read an incorrect value.
Dirty reads occur when one transaction reads a value from a database that was written by another transaction that did not commit.
Incorrect summaries occur when on transaction is using an aggregate function to summarize data stored in a database while a second transaction is making modifications to the database, causing the summary to include incorrect information.
Database Controls
Database controls featured on this post:
- Server-side input validation
- Escaping
- Limiting database permissions
- Polyinstantiation
Server-side input validation
Please remind that client-side input validation is not an effective control against any type of attack because the attacker can easily bypass the validation by altering the code on the client.
Escaping is a method to avoid the user to use restricted characters that are used in SQL injections. It involves using an escape character (usually \) that is added to the beginning of each restricted character. The escape character would also be escaped itself (e.g., \\).
Limiting database permissions prevents dangerous code from executing.
Polyinstantiation allows the storage of multiple different pieces of information in a database at different classification levels to prevent attackers from inferring anything about thee absence of information.
A Database activity monitoring (DAM) tool combine network data and database audit information in real time to analyze database activity for unwanted, anomalous, or unexpected behaviour.
Transparent Data Encryption (TDE) or transparent encryption is a form of encrypting and protect data at rest. It operates in the background, making the encryption and decryption processes invisible or “transparent” to users and applications. The primary goal of transparent encryption is to ensure that data is securely encrypted without requiring any changes to existing workflows, applications, or user behavior.
It is developed by Microsoft. You can read more about it on this external link.
Database Attacks
Database attacks featured on this post:
- SQL injection
- Inference
SQL Injection
SQL injection is a common web application security flaw, where web users are able to communicate directly to database.
You can find SQL injection examples on this post.
You can find SQL injection tools on this post.
You can find SQL detection tools on this post.
Tools to detect SQL injection vulnerabilities
Inference
Inference is a database system technique used to attack databases where malicious users infer sensitive information from complex databases at a high level. In basic terms, inference is a data mining technique used to find information hidden from normal users.