CH05 CompSec4e
CH05 CompSec4e
Principles and
Practice
Fourth Edition
Security
the complexity of
modern database
management systems
(DBMS) and the
security technique Databases have
The increasing used to protect these a sophisticated
reliance on cloud critical systems interaction
technology to host protocol,
part or all of the Structured
corporate Reasons Query
database database Language
security has (SQL), which is
not kept pace complex
with the
Most enterprise increased
environments consist of a reliance on Effective
heterogeneous mixture of databases are: database
database platforms, security requires
enterprise platforms, and a strategy based
OS platforms, creating an on a full
additional complexity understanding of
hurdle for security the security
personnel The typical vulnerabilities of
organization lacks SQL
full-time database
security personnel
Databases
Structured collection of data
stored for use by one or more
applications
Database management
system (DBMS)
Contains the relationships
between data items and • Suite of programs for
groups of data items constructing and
maintaining the
database
Can sometimes contain • Offers ad hoc query
sensitive data that needs to be facilities to multiple
secured users and applications
Query language
Provides a uniform interface
to the database for users and
applications
Relational Databases
Table of data consisting of rows and columns
Each column holds a particular type of data
Each row contains a specific value for each column
Ideally has one column where all values are unique, forming an
identifier/key for that row
Server variables
• Attackers can forge the values that are placed in HTTP and network headers and
exploit this vulnerability by placing data directly into the headers
Second-order injection
• A malicious user could rely on data already present in the system or database to
trigger an SQL injection attack, so when the attack occurs, the input that modifies
the query to cause an attack does not come from the user, but from within the
system itself
Cookies
• An attacker could alter cookies such that when the application server builds an SQL
query based on the cookie’s content, the structure and function of the query is
modified
End-of-line Piggybacked
Tautology
comment queries
The attacker
This form of After injecting
adds additional
attack injects code into a
queries beyond
code in one or particular field,
the intended
more legitimate code
query, piggy-
conditional that follows are
backing the
statements so nullified through
attack on top of
that they always usage of end of
a legitimate
evaluate to true line comments
request
Inferential Attack
• There is no actual transfer of data, but the
attacker is able to reconstruct the information by
sending particular requests and observing the
resulting behavior of the Website/database server
• Include:
o Illegal/logically incorrect queries
• This attack lets an attacker gather important information
about the type and structure of the backend database of
a Web application
• The attack is considered a preliminary, information-
gathering step for other attacks
o Blind SQL injection
• Allows attackers to infer the data present in a database
system even when the system is sufficiently secure to not
display any erroneous information back to the attacker
Out-of-Band Attack
• Data are retrieved using a different channel
• Manual defensive
Detection • Check queries at
coding practices runtime to see if
• Parameterized • Signature based they conform to a
query insertion • Anomaly based model of expected
• SQL DOM • Code analysis queries
Defensive Run-time
coding prevention
Database Access
Control
Can support a
Database access
range of
control system
administrative
determines:
policies
Centralized administration
If the user has access to the entire • Small number of privileged users may
database or just portions of it grant and revoke access rights
Ownership-based administration
What access rights the user has • The creator of a table may grant and
(create, insert, delete, update, revoke access rights to the table
read, write)
Decentralized administration
• The owner of the table may grant and
revoke authorization rights to other users,
allowing them to grant and revoke access
rights to the table
SQL Access Controls
• Two commands for managing access rights:
• Grant
o Used to grant one or more access rights or can be
used to assign a user to a role
• Revoke
o Revokes the access rights
• An end user who owns • An end user who • User who has
database objects as part operates on database administrative
of an application objects via a particular responsibility for part or
application but does not all of the database
own any of the database
objects
Table
5.2
Fixed
Roles
in
Microso
ft
SQL
Server
(Table is on page 165 in
the textbook)
Inference Detection
Approach removes an
inference channel by
altering the database
structure or by changing
the access control regime
to prevent inference
Inference detection
during database design
Techniques in this
category often result in
unnecessarily stricter
access controls that
reduce availability
Two approaches
Approach seeks to
eliminate an inference
channel violation during
a query or series of
queries
Inference detection
at query time
If an inference channel is
detected, the query is
denied or altered
• Data center:
o An enterprise facility that houses a large number of servers,
storage devices, and network switches and equipment
o The number of servers and storage devices can run into the tens
of thousands in one facility
o Generally includes redundant or backup power supplies,
redundant network connections, environmental controls, and
various security devices
o Can occupy one room of a building, one or more floors, or an
entire building
• Examples of uses include:
o Cloud service providers
o Search engines
o Large scientific research facilities
o IT facilities for large enterprises
TIA-492
• The Telecommunications Industry Association (TIA)
• TIA-492 (Telecommunications Infrastructure Standard
for Data Centers) specifies the minimum requirements
for telecommunications infrastructure of data centers
• Includes topics such as:
• Network architecture
• Electrical design
• File storage, backup, and archiving
• System redundancy
• Network access control and security
• Database management
• Web hosting
• Application hosting
• Content distribution
• Environmental control
• Protection against physical hazards
• Power management
Table
5.4
Data
Center
Tiers
Defined in
TIA-942
(Table is on page 177 in textbook)
Summary
• The need for database • Database access
security control
• Database management • SQL-based access definition
systems • Cascading authorizations
• Role-based access control
• Relational databases
• Elements of a relational
• Inference
database system • Database encryption
• Structured Query Language
• Data center security
• SQL injection attacks • Data center elements
• A typical SQLi attack • Data center security
• The injection technique considerations
• SQLi attack avenues and types • TIA-492
• SQLi countermeasures