SlideShare a Scribd company logo
4
Most read
5
Most read
21
Most read
Asish Ku. Rath
Sr. Software Developer
 Introduction
 Types of SQL INJECTION
 Steps for performing SQL INJECTION
 How it Works
 Countermeasures
 Conclusion
 References
SQL Injection
 SQL Injection is a type of Security
Exploit in which the attacker
injects SQL statements to gain
access to restricted resources and
make changes.
 TARGET: Web Application with
backend database
 Uses client supplied SQL queries
to get unauthorized access to
database.
 SQL Manipulation
 Code Injection
 Function Call Injection
 Buffer Over Flow
 It means to manipulate and retrieve data in a
relational database.
 SQL Manipulation comprises the SQL-Data
change statements, which modify the stored
data but not the schema or database objects.
 Code injection is the exploitation of computer
application that is caused by processing
invalid data.
 It is always used malevolently which means it
is always used in an evil way to destroy a
database by exploiting the other codes.
 It is one of the most common type of
injection technique where functions are used
for injection.
 When a function call a parameter then the
attacker passes a different parameter to the
function resulting something different than
expected.
 It also one of the common technique used for
injection at the users input side.
 It is a mechanism of injection by input of data
exceeding the limits of the fields of the user
input resulting an error message using which
the SQL codes are injected.
 Input field to submit data
(e.g. a login page)
 Check for server pages if input field is absent
e.g. http://www.xsecurity.com/index.jsp?id=10
 In the above example attack will be like this:
e.g. http://www.xsecurity.com/index.jsp?id=debu’ or 1=1 –
 Look for errors: This can be done using single quotation
mark (‘). E.g.
Using single quote in the input
•sujit’ or 1=1 --
•login: shweta’ or 1=1 --
•http://search/index.asp?id=sql’ or 1=1 --
Depending on the error:
• ‘ or 1=1 --
• “ or 1=1 --
•‘ or ‘a’ = ‘a
• “ or “a” = “a
•‘) or (‘a’ = ‘a)
SQL Injection
SQL Injection
SQL Injection
 Minimize the Privilege of Database
Connection
 Disable Verbose Error Message
 Protect the system account “SA”
 Audit Source Code:
Escape Single Quotes
Input Validation
Reject Known Bad Input
Input Bound Checking
All user inputs should be filtered
SQLBlock
SQL Injection
SQL Injection
Now a days SQL injection is one of the
biggest nightmare among Database
administrators. Though we have a lot of way
for its prevention but still today’s most
website suffer from this attack.
 http://hack.er.org/sqlinjection
 http://hackercentre.com/sqlinjectioncheetsh
eet
22

More Related Content

PPTX
SQL Injection Introduction and Prevention
PDF
Advanced SQL injection to operating system full control (whitepaper)
PPTX
SQL Injections - A Powerpoint Presentation
PPTX
Sql Injection attacks and prevention
PPTX
Ppt on sql injection
PDF
Sql Injection - Vulnerability and Security
PPTX
Sql injections - with example
PPT
Sql injection
SQL Injection Introduction and Prevention
Advanced SQL injection to operating system full control (whitepaper)
SQL Injections - A Powerpoint Presentation
Sql Injection attacks and prevention
Ppt on sql injection
Sql Injection - Vulnerability and Security
Sql injections - with example
Sql injection

What's hot (20)

PPTX
Sql injection - security testing
PPT
Sql injection attack
PPTX
Sql injection
PPT
A Brief Introduction in SQL Injection
PPTX
SQL Injections (Part 1)
PPTX
SQL injection
PPTX
SQL INJECTION
PPT
SQL Injection
PPTX
Sql injection
PPTX
SQL injection prevention techniques
PDF
How to identify and prevent SQL injection
PPT
Sql injection
PPTX
SQL Injection
PPTX
Sql injection in cybersecurity
PPTX
Cross-Site Scripting (XSS)
PPTX
Cross Site Scripting ( XSS)
PPTX
Deep understanding on Cross-Site Scripting and SQL Injection
PPTX
A2 - broken authentication and session management(OWASP thailand chapter Apri...
PPTX
SQL INJECTION
PPT
Cross site scripting (xss)
Sql injection - security testing
Sql injection attack
Sql injection
A Brief Introduction in SQL Injection
SQL Injections (Part 1)
SQL injection
SQL INJECTION
SQL Injection
Sql injection
SQL injection prevention techniques
How to identify and prevent SQL injection
Sql injection
SQL Injection
Sql injection in cybersecurity
Cross-Site Scripting (XSS)
Cross Site Scripting ( XSS)
Deep understanding on Cross-Site Scripting and SQL Injection
A2 - broken authentication and session management(OWASP thailand chapter Apri...
SQL INJECTION
Cross site scripting (xss)
Ad

Viewers also liked (20)

PDF
An Anatomy of a SQL Injection Attack
PDF
Web Application Security 101 - 14 Data Validation
PDF
Cryptoghaphy
PDF
Defcon 17-joseph mccray-adv-sql_injection
PDF
SQL Injection - The Unknown Story
PPTX
Web Security: SQL Injection
PPT
Advanced SQL Injection
PPT
D:\Technical\Ppt\Sql Injection
PPTX
SQL Injection in action with PHP and MySQL
DOCX
Types of sql injection attacks
PDF
SQL injection: Not only AND 1=1
PPT
Advanced Sql Injection ENG
PPS
PHP Security
PDF
freeCodeCamp Tokyo meetup 19
PDF
Mgea 3-edicion-web1
PPT
introaspnet-3030384.ppt
PDF
February 2015 UK Commercial Bulletin
PDF
China Social Media Recruiting & Talent Management Summit 2012 - opening r...
PPTX
GUIDE TO E-LEARNING DESIGN FOR NON-DESIGNERS
PPTX
EN3604 Week 2: The West's Awake: Language and Location
An Anatomy of a SQL Injection Attack
Web Application Security 101 - 14 Data Validation
Cryptoghaphy
Defcon 17-joseph mccray-adv-sql_injection
SQL Injection - The Unknown Story
Web Security: SQL Injection
Advanced SQL Injection
D:\Technical\Ppt\Sql Injection
SQL Injection in action with PHP and MySQL
Types of sql injection attacks
SQL injection: Not only AND 1=1
Advanced Sql Injection ENG
PHP Security
freeCodeCamp Tokyo meetup 19
Mgea 3-edicion-web1
introaspnet-3030384.ppt
February 2015 UK Commercial Bulletin
China Social Media Recruiting & Talent Management Summit 2012 - opening r...
GUIDE TO E-LEARNING DESIGN FOR NON-DESIGNERS
EN3604 Week 2: The West's Awake: Language and Location
Ad

Similar to SQL Injection (20)

PPTX
Sql Injection
PPTX
SQL injection implementation and prevention
PPTX
Sql injections (Basic bypass authentication)
PPTX
Sql injection
PPTX
Code injection
PPT
SQL injection and buffer overflows are hacking techniques used to exploit wea...
PDF
IRJET- Detection of SQL Injection using Machine Learning : A Survey
PPSX
Web application security
PPTX
Sql injection
PPTX
cgbhjjjjjjjnmmmkmmmmmmkkkkkkTutorial5.pptx
PDF
Sql injection bypassing hand book blackrose
PPTX
Code injection and green sql
PPTX
Greensql2007
PPTX
Sql injection
PDF
Protect Your Database_ SQL Injection Attack Prevention.pdf
PPTX
Sql injection
PPTX
Sql injection
PDF
International Journal of Engineering Inventions (IJEI)
PDF
Sql injection
PPTX
Whatis SQL Injection.pptx
Sql Injection
SQL injection implementation and prevention
Sql injections (Basic bypass authentication)
Sql injection
Code injection
SQL injection and buffer overflows are hacking techniques used to exploit wea...
IRJET- Detection of SQL Injection using Machine Learning : A Survey
Web application security
Sql injection
cgbhjjjjjjjnmmmkmmmmmmkkkkkkTutorial5.pptx
Sql injection bypassing hand book blackrose
Code injection and green sql
Greensql2007
Sql injection
Protect Your Database_ SQL Injection Attack Prevention.pdf
Sql injection
Sql injection
International Journal of Engineering Inventions (IJEI)
Sql injection
Whatis SQL Injection.pptx

Recently uploaded (20)

PPTX
Spectroscopy.pptx food analysis technology
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Programs and apps: productivity, graphics, security and other tools
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
MYSQL Presentation for SQL database connectivity
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
Spectroscopy.pptx food analysis technology
NewMind AI Weekly Chronicles - August'25 Week I
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Review of recent advances in non-invasive hemoglobin estimation
Encapsulation_ Review paper, used for researhc scholars
Programs and apps: productivity, graphics, security and other tools
The AUB Centre for AI in Media Proposal.docx
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
sap open course for s4hana steps from ECC to s4
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
MYSQL Presentation for SQL database connectivity
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Network Security Unit 5.pdf for BCA BBA.
Chapter 3 Spatial Domain Image Processing.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Empathic Computing: Creating Shared Understanding
Digital-Transformation-Roadmap-for-Companies.pptx

SQL Injection

  • 1. Asish Ku. Rath Sr. Software Developer
  • 2.  Introduction  Types of SQL INJECTION  Steps for performing SQL INJECTION  How it Works  Countermeasures  Conclusion  References
  • 4.  SQL Injection is a type of Security Exploit in which the attacker injects SQL statements to gain access to restricted resources and make changes.  TARGET: Web Application with backend database  Uses client supplied SQL queries to get unauthorized access to database.
  • 5.  SQL Manipulation  Code Injection  Function Call Injection  Buffer Over Flow
  • 6.  It means to manipulate and retrieve data in a relational database.  SQL Manipulation comprises the SQL-Data change statements, which modify the stored data but not the schema or database objects.
  • 7.  Code injection is the exploitation of computer application that is caused by processing invalid data.  It is always used malevolently which means it is always used in an evil way to destroy a database by exploiting the other codes.
  • 8.  It is one of the most common type of injection technique where functions are used for injection.  When a function call a parameter then the attacker passes a different parameter to the function resulting something different than expected.
  • 9.  It also one of the common technique used for injection at the users input side.  It is a mechanism of injection by input of data exceeding the limits of the fields of the user input resulting an error message using which the SQL codes are injected.
  • 10.  Input field to submit data (e.g. a login page)
  • 11.  Check for server pages if input field is absent e.g. http://www.xsecurity.com/index.jsp?id=10  In the above example attack will be like this: e.g. http://www.xsecurity.com/index.jsp?id=debu’ or 1=1 –  Look for errors: This can be done using single quotation mark (‘). E.g.
  • 12. Using single quote in the input •sujit’ or 1=1 -- •login: shweta’ or 1=1 -- •http://search/index.asp?id=sql’ or 1=1 -- Depending on the error: • ‘ or 1=1 -- • “ or 1=1 -- •‘ or ‘a’ = ‘a • “ or “a” = “a •‘) or (‘a’ = ‘a)
  • 16.  Minimize the Privilege of Database Connection  Disable Verbose Error Message  Protect the system account “SA”  Audit Source Code: Escape Single Quotes Input Validation Reject Known Bad Input Input Bound Checking All user inputs should be filtered
  • 20. Now a days SQL injection is one of the biggest nightmare among Database administrators. Though we have a lot of way for its prevention but still today’s most website suffer from this attack.
  • 22. 22