0% found this document useful (0 votes)
9 views23 pages

Understanding SQL Injection Attacks

Uploaded by

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

Understanding SQL Injection Attacks

Uploaded by

hackerjani677
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

>> SQL INJECTION

Presenters:
>>Salman Mallah: 22BSCYS021
>>Kinza: 22BSCYS031

>> 25/03/2024
TABLE OF CONTENTS

01 What is SQL?

02 When SQL Injection started?

03 How web page works?

04 How SQL injection attack Work

05 Real Attack Demonstration!


WHAT ?
• SQL Injection (SQLi) is the most
common attack vector accounting for
over 50% of all web application
attacks nowadays.
WHAT ?
• SQL Injection (SQLi) is the most
common attack vector accounting for
over 50% of all web application
attacks nowadays.
• It is a web security vulnerability
that exploits insecure SQL code.
Using that, an attacker can
interfere with the queries an
application makes to its database.
WHAT ?
• SQL Injection (SQLi) is the most
common attack vector accounting for
over 50% of all web application
attacks nowadays.
• It is a web security vulnerability
that exploits insecure SQL code.
Using that, an attacker can
interfere with the queries an
application makes to its database.
• But it is not just "popular"; its
consequences are also nasty!
WHAT ?
• SQL Injection (SQLi) is the most
common attack vector accounting for
over 50% of all web application
attacks nowadays.
• It is a web security vulnerability
that exploits insecure SQL code.
Using that, an attacker can
interfere with the queries an
application makes to its database.
• But it is not just "popular"; its
consequences are also nasty!
• A successful SQL injection
attack can lead to
unauthorized access to
sensitive data. Such as
passwords, credit card
details, or personal user
information.
Impact of a Successful SQL Injection
Attack
•Stolen credentials—attackers can obtain credentials via SQLi and then
impersonate users and use their privileges.
•Unauthorized access to databases—attackers can gain access to the
sensitive data in database servers.
•Data alteration—attackers can alter or add new data to the accessed
database.
•Data deletion—attackers can delete database records or drop entire
tables.
Distribution of web application critical vulnerabilities
WHAT ? worldwide as of 2023
Registered attack in percentage
SQL injection
23.40%
Cross-site Scripting (store)

malicios file upload

authorisation issue

php multiple vuln

log4shell

spring4shell

weak password policy

Database Console exposure

file path traversal

0.00% 5.00% 10.00% 15.00% 20.00% 25.00%

-SOURCE
When ?
• SQLi was documented in 1998 by Jeff Forristal
• Jeff has been recognized as an industry expert in
web application security and was responsible for
the first publicized responsible security disclosure
policy (2000), the first publicized recognition of
SQL injection (Phrack, 1998)

-SOURCE
Famous attacks?
TJX Companies Attack
• Date: 2005-2007
• Loss: Over 45 million credit and debit
card numbers stolen, one of the largest
data breaches in history.

Heartland Payment Systems Attack


• Date: 2008-2009
• Loss: Over 130 million credit and
debit card numbers compromised,
one of the largest data breaches
ever reported.
Sony Pictures Entertainment Attack
• Date: 2014
• Loss: Sensitive data including employee information,
unreleased films, and internal emails stolen, causing
significant damage to Sony's reputation and financial losses.
Famous attacks?

Sony PlayStation Network Attack


1. Date: 2011
2. Loss: Personal information from over 77 million accounts
stolen, leading to a lengthy shutdown of the network and
significant financial losses for Sony.
HOW web page works? URL generated by login form

[Link]
userName=Salman&password=admin

Web server will


send SQL query
based on form
data TO SQL
SERVER
HOW web page works? URL generated by login form

[Link]
userName=Salman&password=admin

Now SQL server


read the query
and return the
matching result
back to web
server.
HOW web page works? URL generated by login form

[Link]
userName=Salman&password=admin
HOW web page works?

Web server sends back


data to web client

Web client
HOW web page works?

Web server sends back


data to web client

Web client
HOW SQLi works?
HOW SQLi works?

” OR 1=1 --
HOW SQLi works?

[Link] OR 1=1 --

” OR 1=1 --
HOW SQLi works?

[Link] OR 1=1 --

SELECT * FROM users WHERE Name='salman' AND pass='' OR 1=1 --'


HOW SQLi works?

Web server will


authenticate the
hacker as admin
of the Website
HOW SQLi works?

Web server will


authenticate the
hacker as admin
of the Website

LOL, I am now the owner of


your website.
Thanks.

Common questions

Powered by AI

To secure web applications against SQL Injection attacks, developers should implement several preventative measures: use parameterized queries and prepared statements to prevent SQL code manipulation; validate and sanitize all user inputs to ensure they don't contain malicious SQL code; employ web application firewalls to detect and block SQL Injection attempts; and regularly update and patch web frameworks and libraries to address known vulnerabilities. These strategies help mitigate risks and safeguard sensitive data .

As of 2023, SQL Injection remains a leading security issue, accounting for 23.40% of critical web application vulnerabilities worldwide. This prevalence underscores the persistent danger and commonality of SQLi, indicating a significant portion of web applications are still vulnerable to this type of attack despite awareness and available preventive measures. It highlights the need for continued focus on secure coding practices and regular security testing across web applications to mitigate this risk .

Since their recognition in 1998, SQL Injection attacks have profoundly influenced cybersecurity practices by emphasizing the need for secure coding standards, promoting the adoption of security testing tools, and fostering the development of secure frameworks. Awareness has led to the creation of many industry guidelines and tools aimed at minimizing vulnerabilities in applications. Despite this, SQL Injection remains a prevalent threat, highlighting ongoing challenges in ensuring all applications adhere to best practices and the necessity of continual education and vigilance in cybersecurity .

The TJX Companies attack, which occurred between 2005 and 2007, resulted in the theft of over 45 million credit and debit card numbers, illustrating the massive scale of financial and identity theft possible through SQL Injection attacks. Similarly, the Heartland Payment Systems attack of 2008-2009 compromised over 130 million card numbers. These examples highlight SQL Injection as a critical threat that can lead to significant financial losses and widespread data breaches .

Understanding how web pages interact with SQL databases is crucial for preventing SQL Injection attacks. It involves grasping how input data from users is processed and converted into SQL queries. By knowing this, developers can implement proper input validation, parameterized queries, and other security measures to ensure that malicious inputs do not alter the intended query execution, hence safeguarding against unauthorized database access .

A successful SQL Injection attack can lead to severe consequences such as stolen credentials, where attackers can impersonate users; unauthorized access to sensitive databases, allowing the theft of data like passwords and credit card details; data alteration, where attackers can change or insert data; and data deletion, including the possibility of dropping entire database tables, leading to significant disruption of services and data loss .

In a simple SQL Injection attack example, an attacker modifies a URL query by adding "OR 1=1 --" to bypass authentication checks. For instance, if a URL generated from a login form is altered to include "https://www.form.muet.com/?Name=salman&pass='' OR 1=1 --", the SQL query runs as: SELECT * FROM users WHERE Name='salman' AND pass='' OR 1=1 --'. This manipulation causes the condition 'OR 1=1' always to be true, thus granting unauthorized access as the web server authenticates the attacker as an admin .

Jeff Forristal played a pivotal role in the development of security best practices within the web application security field. He documented SQL Injection in 1998, marking one of the first public recognitions of this critical vulnerability. He is also noted for pioneering the first publicized responsible security disclosure policy in 2000. His contributions have been essential in raising awareness and developing methodologies to combat SQL Injection and other web-based vulnerabilities .

SQL Injection (SQLi) is a web security vulnerability that exploits insecure SQL code, allowing attackers to interfere with the queries an application makes to its database. It is considered the most common attack vector, accounting for over 50% of all web application attacks. The danger lies in its ability to lead to unauthorized access to sensitive data, such as passwords, credit card details, and personal user information. This can result in data theft, unauthorized access, data alteration, and even data deletion .

The Sony Pictures Entertainment attack in 2014 and the Sony PlayStation Network attack in 2011 demonstrated the vulnerabilities exploited by SQL Injection through their significant data breaches. In the Sony Pictures attack, attackers accessed and released sensitive data, causing reputational and financial damage. The PlayStation Network attack compromised personal information from over 77 million accounts, leading to a lengthy shutdown and substantial losses. These incidents underscore SQL Injection's potential to disrupt services and expose sensitive data .

You might also like