0% found this document useful (0 votes)
1 views

Inference Dbms

SQL injection (SQLI) is a prevalent attack method that manipulates SQL code to access unauthorized information from databases, often targeting websites. There are three main types of SQL injections: In-band SQLi, Inferential SQLi, and Out-of-band SQLi, each with distinct methods and impacts. Additionally, the document discusses access control methods and inference rules in databases, as well as the concept of data encryption, which secures data by converting it into an unreadable format.

Uploaded by

pavithra.r
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

Inference Dbms

SQL injection (SQLI) is a prevalent attack method that manipulates SQL code to access unauthorized information from databases, often targeting websites. There are three main types of SQL injections: In-band SQLi, Inferential SQLi, and Out-of-band SQLi, each with distinct methods and impacts. Additionally, the document discusses access control methods and inference rules in databases, as well as the concept of data encryption, which secures data by converting it into an unreadable format.

Uploaded by

pavithra.r
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

SQL (Structured query language) Injection

SQL injection, also known as SQLI, is a common attack vector that uses malicious SQL code
for backend database manipulation to access information that was not intended to be
displayed. This information may include any number of items, including sensitive company
data, user lists or private customer details.
When calculating the potential cost of an SQLi, it’s important to consider the loss of customer
trust should personal information such as phone numbers, addresses, and credit card details
be stolen.
While this vector can be used to attack any SQL database, websites are the most frequent
targets.
SQL is a standardized language used to access and manipulate databases to build
customizable data views for each user. SQL queries are used to execute commands, such as
data retrieval, updates, and record removal. Different SQL elements implement these tasks,
e.g., queries using the SELECT statement to retrieve data, based on user-provided
parameters.
A typical eStore’s SQL database query may look like the following
SELECT ItemName, ItemDescription
FROM Item
WHERE ItemNumber = ItemNumber
From this, the web application builds a string query that is sent to the database as a single
SQL statement
sql_query= "
SELECT ItemName, ItemDescription
FROM Item
WHERE ItemNumber = " & Request.QueryString("ItemID")
A user-provided input http://www.estore.com/items/items.asp?itemid=999 can then generates
the following SQL query
SELECT ItemName, ItemDescription
FROM Item
WHERE ItemNumber = 999

Types of SQL Injections


SQL injections typically fall under three categories: In-band SQLi (Classic), Inferential SQLi (Blind) and Out-
of-band SQLi. You can classify SQL injections types based on the methods they use to access backend data and
their damage potential.
In-band SQLi
The attacker uses the same channel of communication to launch their attacks and to gather their results. In-band
SQLi’s simplicity and efficiency make it one of the most common types of SQLi attack. There are two sub-
variations of this method:
 Error-based SQLi—the attacker performs actions that cause the database to produce error messages.
The attacker can potentially use the data provided by these error messages to gather information about
the structure of the database.
 Union-based SQLi—this technique takes advantage of the UNION SQL operator, which fuses
multiple select statements generated by the database to get a single HTTP response. This response may
contain data that can be leveraged by the attacker.
Inferential (Blind) SQLi
The attacker sends data payloads to the server and observes the response and behavior of the server to learn
more about its structure. This method is called blind SQLi because the data is not transferred from the website
database to the attacker, thus the attacker cannot see information about the attack in-band.
Blind SQL injections rely on the response and behavioral patterns of the server so they are typically slower to
execute but may be just as harmful. Blind SQL injections can be classified as follows:
 Boolean—that attacker sends a SQL query to the database prompting the application to return a result.
The result will vary depending on whether the query is true or false. Based on the result, the
information within the HTTP response will modify or stay unchanged. The attacker can then work out
if the message generated a true or false result.
 Time-based—attacker sends a SQL query to the database, which makes the database wait (for a period
in seconds) before it can react. The attacker can see from the time the database takes to respond,
whether a query is true or false. Based on the result, an HTTP response will be generated instantly or
after a waiting period. The attacker can thus work out if the message they used returned true or false,
without relying on data from the database.
Out-of-band SQLi
The attacker can only carry out this form of attack when certain features are enabled on the database server used
by the web application. This form of attack is primarily used as an alternative to the in-band and inferential
SQLi techniques.
Out-of-band SQLi is performed when the attacker can’t use the same channel to launch the attack and gather
information, or when a server is too slow or unstable for these actions to be performed. These techniques count
on the capacity of the server to create DNS or HTTP requests to transfer data to an attacker.

There are FOUR TYPES of access control methods: Mandatory Access Control (MAC), Role-
Based Access Control (RBAC), Discretionary Access Control (DAC), and Rule-Based Access Control
(RBAC or RB-RBAC). A method is chosen based on the level of access needed by each user, security
requirement, infrastructure, etc.

INFERENCE RULES IN DBMS


Inference rules in databases are also known as Armstrong’s Axioms in Functional Dependency. These rules
govern the functional dependencies in a relational database. From inference rules a new functional dependency
can be derived using other FDs.
Prerequisites
 Attributes: When we talk about databases, we think of them as organized collections of information.
Imagine that you have a table called “Student.” Now, this table has columns, which we also call
“Attributes.” These columns define specific details about the students. For example:
o Student_name: This column stores the names of the students.
o Roll_no: Here, we keep track of their roll numbers.
o Marks: And finally, we record their exam scores.
 Functional Dependencies (FDs) are like the building blocks of a database. Imagine you have a bunch
of attributes (think of them as characteristics) in a table. These attributes can be related to each other in
interesting ways or say logically. For example, Roll_no → Marks means that from Roll_no we can get
the Marks of the student, which shows that they are Roll_no is logically related to Marks.
Inference Rules
There are 6 inference rules, which are defined below:

⊆ A then A → B.
 Reflexive Rule: According to this rule, if B is a subset of A then A logically determines B. Formally, B

o Example: Let us take an example of the Address (A) of a house, which contains so many
parameters like House no, Street no, City etc. These all are the subsets of A. Thus, address (A)
→ House no. (B).
 Augmentation Rule: It is also known as Partial dependency. According to this rule, If A logically
determines B, then adding any extra attribute doesn’t change the basic functional dependency.
o Example: A → B, then adding any extra attribute let say C will give AC → BC and doesn’t
make any change.
 Transitive rule: Transitive rule states that if A determines B and B determines C, then it can be said
that A indirectly determines B.
o Example: If A → B and B → C then A → C.
 Union Rule: Union rule states that If A determines B and C, then A determines BC.
o Example: If A → B and A → C then A → BC.
 Decomposition Rule: It is perfectly reverse of the above Union rule. According to this rule, If A
determined BC then it can be decomposed as A → B and A → C.
o Example: If A → BC then A → B and A → C.
 Pseudo Transitive Rule: According to this rule, If A determined B and BC determines D then BC
determines D.
o Example: If A → B and BC → D then AC → D.

What is data ENCRYPTION in DBMS? Encrypting data involves changing it from a readable
(plaintext) format to an unreadable, encoded one (ciphertext). Data that has been encrypted can
only be viewed or processed after it has been decrypted with a decryption key or password.

There are
two types of encryption in widespread use today: symmetric and asymmetric encryption. The
name derives from whether or not the same key is used for encryption and decryption. Encryption
is used to protect data from being stolen, changed, or compromised and works by scrambling data
into a secret code that can only be unlocked with a unique digital key.

You might also like