SlideShare una empresa de Scribd logo
1 de 20
What is SQL injection ?
SQL injection is a cyber attack in which the attacker
injects malicious SQL query into an input field or the
parameter like =, allowing the attacker to view or
modify sensitive data.
SQL Injection
Types of SQL injection
Types of SQL injection
• In-Band SQL Injection:- It is a type of SQL injection
in which the attacker uses same communication
channel to both launch the attack and gather
results. It consist of two types:
i. Error based SQL Injection:- This method relies on
error messages given by the backend server to
obtain the information of the structure of the
database.
ii. Union based SQL injection:- This SQL injection
technique uses UNION SQL operator to combine
the results of two or more select statement into
a single response.
Types of SQL injection
• Inferential (Blind) SQL injection
This is also known as blind based SQL injection. In this
type of attack the attacker cannot see any error
generated by injected SQL query. There are two types
of Inferential SQL injections, they are:-
i. Boolean based SQL injection:- In this attack the
attacker sends an SQL query to the database
which the application interprets as True or False.
ii. Time based SQL injection:- In time based attacks
SQL SLEEP() command is been used. This type of
attack is used to determine if blind based SQL
injection vulnerability is present or not.
Types of SQL injection
• Out of band SQL injection
This is a type of SQL injection in which the attacker
does not receive response from the attacked
application on the same communication channel but
instead is able to cause the application to send data to
a remote endpoint that they control.
Login Bypass
Login Bypass using SQL injection
https://drive.google.com/file/d/1hBwdIwvxqNnYrfvY
A37KVcU6UwdlrdWw/view?usp=drive_link
SQL Injection with conditional
response
https://drive.google.com/file/d/1fEzKoWh5evrfRzfW
86M_sImcdIduCJ1g/view?usp=drive_link
SQL Injection with conditional
response
• Payloads
Tracking ID is in the form of strings and the server verifies the
Tracking ID and Gives TRUE or FALSE.
'Tracking ID’
 Injecting a payload ' AND 1=1-- gives 'Tracking ID' AND 1=1--’
This implies the condition TRUE and welcome back is shown.
Instead one writes 'Tracking ID' AND 1=2--’, one gets TRUE and
FALSE and the resultant is FALSE and welcome back is not shown.
SQL Injection with conditional
response
 'Tracking ID' AND (SELECT 'x' FROM users LIMIT 1)= ‘x
This Code verifies if there is a table by the name users in the
database and outputs x. This is then set equal to the value x.
 'Tracking ID' AND (SELECT username FROM users WHERE
username= 'administrator')= 'administrator
This code verifies if there is a user by the name administrator
and give either TRUE or FALSE. If there is a user by the
username administrator, the condition would be TRUE and
Welcome Back is shown.
SQL Injection with conditional
response
 'Tracking ID' AND (SELECT username FROM users WHERE
username= 'administrator' AND LENGTH (password)>1)=
'administrator
In this code we try to find out the length of the password.
Condition was FALSE at length of the password greater than
20 and we did not get to see welcome back. So the length of
the password is 20.
 'Tracking ID' AND (SELECT SUBSTRING(password,1,1) FROM
users WHERE username= 'administrator' AND LENGTH
(password)>1)= ‘a
This code enumerates out the password.
Mitigations of SQL Injection
• Input Validation: Validate and sanitize user input to ensure it adheres to
expected formats and does not contain malicious code. Use input
validation libraries of frameworks to sanitize user input automatically.
• Output Encoding: Encode user-generated content before displaying it
on web pages to prevent the execution of injected scripts. Use HTML
entity encoding or JavaScript escaping to neutralize special characters.
• Content Security Policy (CSP): Configure CSP directives to restrict the
sources from which resources, such as scripts, stylesheets, or images,
can be loaded. Implement strict CSP policies to mitigate the impact of
SQL Injection attacks by limiting the execution of inline scripts and
external resources.
• Parameterized Queries: Use parameterized queries or prepared
statements when interacting with databases to prevent SQL Injection
vulnerabilities.
Cross Site Request Forgery (CSRF)
A cross site request forgery is a type of a cyber attack
that tricks the user into accidentally using their
credentials to cause a state changing activity, such as
changing passwords, changing email ids, transferring
funds from their account or some other undesired
action.
Cross Site Request Forgery (CSRF)
For a CSRF attack to take place 3 key conditions must be
satisfied:-
i. Relevant action:- There is some action that the
attacker makes use of. This action is some privileged
action like modifying permissions for other users or
any action on user specific data such as changing the
username or password of his/her account.
ii. Cookie based session handling-: The application
relies solely on session cookies to identify the user
who has made the requests.
iii. No predictable parameters:- The requests that
perform the action do not contain any parameters
whose values the attacker cannot determine or
guess.
Cross Site Request Forgery (CSRF)
CSRF without any defence
https://drive.google.com/file/d/1g47BleE6BTOYugg9
1YcQsYVSQ0OvwCZW/view?usp=drive_link
CSRF token bypass
https://drive.google.com/file/d/1uPOXEnRTbiB3d9b
mwbA3qTyKDZO24lMz/view?usp=drive_link
Mitigations of CSRF
• Anti-CSRF Tokens: Generate unique tokens for each user session and
include them in form submissions or HTTP headers. Upon receiving a
request, the server verifies the token's authenticity to ensure it originated
from a legitimate source.
• Same-Site Cookies: Set the SameSite attribute on session cookies to
restrict their usage to the same origin, thereby preventing them from
being sent along with cross-site requests.
• Referer Header Checks: Validate the Referer header of incoming
requests to ensure they originate from the same domain as the web
application.
• Double Submit Cookies: Include a random token in both a cookie and a
form submission. Upon receiving the request, the server should compare
the token values to verify their consistency.
Thank You!!

Más contenido relacionado

Similar a Ethical Hacking Project: SQL Injection Vulnerability Analysis.pptx

Ethical hacking (sql injection and butter overflow)
Ethical hacking (sql injection and butter overflow)Ethical hacking (sql injection and butter overflow)
Ethical hacking (sql injection and butter overflow)R Islam
 
Prevention of SQL Injection Attack in Web Application with Host Language
Prevention of SQL Injection Attack in Web Application with Host LanguagePrevention of SQL Injection Attack in Web Application with Host Language
Prevention of SQL Injection Attack in Web Application with Host LanguageIRJET Journal
 
Overview on SQL Injection Attacks
Overview on SQL Injection AttacksOverview on SQL Injection Attacks
Overview on SQL Injection Attacksijsrd.com
 
Web security 2010
Web security 2010Web security 2010
Web security 2010Alok Babu
 
SQL Injection Attack Detection and Prevention Techniques to Secure Web-Site
SQL Injection Attack Detection and Prevention Techniques to Secure Web-SiteSQL Injection Attack Detection and Prevention Techniques to Secure Web-Site
SQL Injection Attack Detection and Prevention Techniques to Secure Web-Siteijtsrd
 
SQL Injection Prevention by Adaptive Algorithm
SQL Injection Prevention by Adaptive AlgorithmSQL Injection Prevention by Adaptive Algorithm
SQL Injection Prevention by Adaptive AlgorithmIOSR Journals
 
SQL Injection.jpg.pptx
SQL Injection.jpg.pptxSQL Injection.jpg.pptx
SQL Injection.jpg.pptxdawitTerefe5
 
Security Testing Training With Examples
Security Testing Training With ExamplesSecurity Testing Training With Examples
Security Testing Training With ExamplesAlwin Thayyil
 
Session3 data-validation-sql injection
Session3 data-validation-sql injectionSession3 data-validation-sql injection
Session3 data-validation-sql injectionzakieh alizadeh
 
Pci compliance writing secure code
Pci compliance   writing secure codePci compliance   writing secure code
Pci compliance writing secure codeMiva
 

Similar a Ethical Hacking Project: SQL Injection Vulnerability Analysis.pptx (20)

Ethical hacking (sql injection and butter overflow)
Ethical hacking (sql injection and butter overflow)Ethical hacking (sql injection and butter overflow)
Ethical hacking (sql injection and butter overflow)
 
Web application security
Web application securityWeb application security
Web application security
 
Prevention of SQL Injection Attack in Web Application with Host Language
Prevention of SQL Injection Attack in Web Application with Host LanguagePrevention of SQL Injection Attack in Web Application with Host Language
Prevention of SQL Injection Attack in Web Application with Host Language
 
Owasp top 10
Owasp top 10Owasp top 10
Owasp top 10
 
Overview on SQL Injection Attacks
Overview on SQL Injection AttacksOverview on SQL Injection Attacks
Overview on SQL Injection Attacks
 
Web security 2010
Web security 2010Web security 2010
Web security 2010
 
Sql injection
Sql injectionSql injection
Sql injection
 
Code injection
Code injectionCode injection
Code injection
 
SQL INJECTIONS.pptx
SQL INJECTIONS.pptxSQL INJECTIONS.pptx
SQL INJECTIONS.pptx
 
Nii sample pt_report
Nii sample pt_reportNii sample pt_report
Nii sample pt_report
 
Security testing
Security testingSecurity testing
Security testing
 
SQL Injection Attack Detection and Prevention Techniques to Secure Web-Site
SQL Injection Attack Detection and Prevention Techniques to Secure Web-SiteSQL Injection Attack Detection and Prevention Techniques to Secure Web-Site
SQL Injection Attack Detection and Prevention Techniques to Secure Web-Site
 
Sql injection
Sql injectionSql injection
Sql injection
 
E017131924
E017131924E017131924
E017131924
 
SQL Injection Prevention by Adaptive Algorithm
SQL Injection Prevention by Adaptive AlgorithmSQL Injection Prevention by Adaptive Algorithm
SQL Injection Prevention by Adaptive Algorithm
 
SQL Injection.jpg.pptx
SQL Injection.jpg.pptxSQL Injection.jpg.pptx
SQL Injection.jpg.pptx
 
Security Testing Training With Examples
Security Testing Training With ExamplesSecurity Testing Training With Examples
Security Testing Training With Examples
 
Session3 data-validation-sql injection
Session3 data-validation-sql injectionSession3 data-validation-sql injection
Session3 data-validation-sql injection
 
Pci compliance writing secure code
Pci compliance   writing secure codePci compliance   writing secure code
Pci compliance writing secure code
 
C01461422
C01461422C01461422
C01461422
 

Más de Boston Institute of Analytics

Enhancing Cybersecurity: An In-depth Analysis of Travelblog.org
Enhancing Cybersecurity: An In-depth Analysis of Travelblog.orgEnhancing Cybersecurity: An In-depth Analysis of Travelblog.org
Enhancing Cybersecurity: An In-depth Analysis of Travelblog.orgBoston Institute of Analytics
 
Exploring Web Security Threats: A Practical Study on SQL Injection and CSRF
Exploring Web Security Threats: A Practical Study on SQL Injection and CSRFExploring Web Security Threats: A Practical Study on SQL Injection and CSRF
Exploring Web Security Threats: A Practical Study on SQL Injection and CSRFBoston Institute of Analytics
 
Detecting Credit Card Fraud: A Machine Learning Approach
Detecting Credit Card Fraud: A Machine Learning ApproachDetecting Credit Card Fraud: A Machine Learning Approach
Detecting Credit Card Fraud: A Machine Learning ApproachBoston Institute of Analytics
 
Decoding Loan Approval with Predictive Modeling in Action Discovering Weaknes...
Decoding Loan Approval with Predictive Modeling in Action Discovering Weaknes...Decoding Loan Approval with Predictive Modeling in Action Discovering Weaknes...
Decoding Loan Approval with Predictive Modeling in Action Discovering Weaknes...Boston Institute of Analytics
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
NLP Based project presentation: Analyzing Automobile Prices
NLP Based project presentation: Analyzing Automobile PricesNLP Based project presentation: Analyzing Automobile Prices
NLP Based project presentation: Analyzing Automobile PricesBoston Institute of Analytics
 
Data Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health ClassificationData Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health ClassificationBoston Institute of Analytics
 
Combating Fraudulent Transactions: A Deep Dive into Credit Card Fraud Detection
Combating Fraudulent Transactions: A Deep Dive into Credit Card Fraud DetectionCombating Fraudulent Transactions: A Deep Dive into Credit Card Fraud Detection
Combating Fraudulent Transactions: A Deep Dive into Credit Card Fraud DetectionBoston Institute of Analytics
 
Predicting Liver Disease in India: A Machine Learning Approach
Predicting Liver Disease in India: A Machine Learning ApproachPredicting Liver Disease in India: A Machine Learning Approach
Predicting Liver Disease in India: A Machine Learning ApproachBoston Institute of Analytics
 
Employee Churn Prediction: Artificial Intelligence Project Presentation
Employee Churn Prediction: Artificial Intelligence Project PresentationEmployee Churn Prediction: Artificial Intelligence Project Presentation
Employee Churn Prediction: Artificial Intelligence Project PresentationBoston Institute of Analytics
 
Predicting Employee Churn: A Data-Driven Approach Project Presentation
Predicting Employee Churn: A Data-Driven Approach Project PresentationPredicting Employee Churn: A Data-Driven Approach Project Presentation
Predicting Employee Churn: A Data-Driven Approach Project PresentationBoston Institute of Analytics
 
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptxNLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptxBoston Institute of Analytics
 
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...Boston Institute of Analytics
 
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfPredicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfBoston Institute of Analytics
 

Más de Boston Institute of Analytics (20)

Enhancing Cybersecurity: An In-depth Analysis of Travelblog.org
Enhancing Cybersecurity: An In-depth Analysis of Travelblog.orgEnhancing Cybersecurity: An In-depth Analysis of Travelblog.org
Enhancing Cybersecurity: An In-depth Analysis of Travelblog.org
 
Exploring Web Security Threats: A Practical Study on SQL Injection and CSRF
Exploring Web Security Threats: A Practical Study on SQL Injection and CSRFExploring Web Security Threats: A Practical Study on SQL Injection and CSRF
Exploring Web Security Threats: A Practical Study on SQL Injection and CSRF
 
Detecting Credit Card Fraud: A Machine Learning Approach
Detecting Credit Card Fraud: A Machine Learning ApproachDetecting Credit Card Fraud: A Machine Learning Approach
Detecting Credit Card Fraud: A Machine Learning Approach
 
Detecting Credit Card Fraud: An AI-driven Approach
Detecting Credit Card Fraud: An AI-driven ApproachDetecting Credit Card Fraud: An AI-driven Approach
Detecting Credit Card Fraud: An AI-driven Approach
 
Predicting House Prices: A Machine Learning Approach
Predicting House Prices: A Machine Learning ApproachPredicting House Prices: A Machine Learning Approach
Predicting House Prices: A Machine Learning Approach
 
Predicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science ProjectPredicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science Project
 
Decoding Loan Approval with Predictive Modeling in Action Discovering Weaknes...
Decoding Loan Approval with Predictive Modeling in Action Discovering Weaknes...Decoding Loan Approval with Predictive Modeling in Action Discovering Weaknes...
Decoding Loan Approval with Predictive Modeling in Action Discovering Weaknes...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
E-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptxE-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptx
 
NLP Based project presentation: Analyzing Automobile Prices
NLP Based project presentation: Analyzing Automobile PricesNLP Based project presentation: Analyzing Automobile Prices
NLP Based project presentation: Analyzing Automobile Prices
 
Decoding Loan Approval: Predictive Modeling in Action
Decoding Loan Approval: Predictive Modeling in ActionDecoding Loan Approval: Predictive Modeling in Action
Decoding Loan Approval: Predictive Modeling in Action
 
Analyzing Movie Reviews : Machine learning project
Analyzing Movie Reviews : Machine learning projectAnalyzing Movie Reviews : Machine learning project
Analyzing Movie Reviews : Machine learning project
 
Data Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health ClassificationData Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health Classification
 
Combating Fraudulent Transactions: A Deep Dive into Credit Card Fraud Detection
Combating Fraudulent Transactions: A Deep Dive into Credit Card Fraud DetectionCombating Fraudulent Transactions: A Deep Dive into Credit Card Fraud Detection
Combating Fraudulent Transactions: A Deep Dive into Credit Card Fraud Detection
 
Predicting Liver Disease in India: A Machine Learning Approach
Predicting Liver Disease in India: A Machine Learning ApproachPredicting Liver Disease in India: A Machine Learning Approach
Predicting Liver Disease in India: A Machine Learning Approach
 
Employee Churn Prediction: Artificial Intelligence Project Presentation
Employee Churn Prediction: Artificial Intelligence Project PresentationEmployee Churn Prediction: Artificial Intelligence Project Presentation
Employee Churn Prediction: Artificial Intelligence Project Presentation
 
Predicting Employee Churn: A Data-Driven Approach Project Presentation
Predicting Employee Churn: A Data-Driven Approach Project PresentationPredicting Employee Churn: A Data-Driven Approach Project Presentation
Predicting Employee Churn: A Data-Driven Approach Project Presentation
 
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptxNLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
 
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
 
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfPredicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
 

Último

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 

Último (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 

Ethical Hacking Project: SQL Injection Vulnerability Analysis.pptx

  • 1.
  • 2. What is SQL injection ? SQL injection is a cyber attack in which the attacker injects malicious SQL query into an input field or the parameter like =, allowing the attacker to view or modify sensitive data. SQL Injection
  • 3. Types of SQL injection
  • 4. Types of SQL injection • In-Band SQL Injection:- It is a type of SQL injection in which the attacker uses same communication channel to both launch the attack and gather results. It consist of two types: i. Error based SQL Injection:- This method relies on error messages given by the backend server to obtain the information of the structure of the database. ii. Union based SQL injection:- This SQL injection technique uses UNION SQL operator to combine the results of two or more select statement into a single response.
  • 5. Types of SQL injection • Inferential (Blind) SQL injection This is also known as blind based SQL injection. In this type of attack the attacker cannot see any error generated by injected SQL query. There are two types of Inferential SQL injections, they are:- i. Boolean based SQL injection:- In this attack the attacker sends an SQL query to the database which the application interprets as True or False. ii. Time based SQL injection:- In time based attacks SQL SLEEP() command is been used. This type of attack is used to determine if blind based SQL injection vulnerability is present or not.
  • 6. Types of SQL injection • Out of band SQL injection This is a type of SQL injection in which the attacker does not receive response from the attacked application on the same communication channel but instead is able to cause the application to send data to a remote endpoint that they control.
  • 8. Login Bypass using SQL injection https://drive.google.com/file/d/1hBwdIwvxqNnYrfvY A37KVcU6UwdlrdWw/view?usp=drive_link
  • 9. SQL Injection with conditional response https://drive.google.com/file/d/1fEzKoWh5evrfRzfW 86M_sImcdIduCJ1g/view?usp=drive_link
  • 10. SQL Injection with conditional response • Payloads Tracking ID is in the form of strings and the server verifies the Tracking ID and Gives TRUE or FALSE. 'Tracking ID’  Injecting a payload ' AND 1=1-- gives 'Tracking ID' AND 1=1--’ This implies the condition TRUE and welcome back is shown. Instead one writes 'Tracking ID' AND 1=2--’, one gets TRUE and FALSE and the resultant is FALSE and welcome back is not shown.
  • 11. SQL Injection with conditional response  'Tracking ID' AND (SELECT 'x' FROM users LIMIT 1)= ‘x This Code verifies if there is a table by the name users in the database and outputs x. This is then set equal to the value x.  'Tracking ID' AND (SELECT username FROM users WHERE username= 'administrator')= 'administrator This code verifies if there is a user by the name administrator and give either TRUE or FALSE. If there is a user by the username administrator, the condition would be TRUE and Welcome Back is shown.
  • 12. SQL Injection with conditional response  'Tracking ID' AND (SELECT username FROM users WHERE username= 'administrator' AND LENGTH (password)>1)= 'administrator In this code we try to find out the length of the password. Condition was FALSE at length of the password greater than 20 and we did not get to see welcome back. So the length of the password is 20.  'Tracking ID' AND (SELECT SUBSTRING(password,1,1) FROM users WHERE username= 'administrator' AND LENGTH (password)>1)= ‘a This code enumerates out the password.
  • 13. Mitigations of SQL Injection • Input Validation: Validate and sanitize user input to ensure it adheres to expected formats and does not contain malicious code. Use input validation libraries of frameworks to sanitize user input automatically. • Output Encoding: Encode user-generated content before displaying it on web pages to prevent the execution of injected scripts. Use HTML entity encoding or JavaScript escaping to neutralize special characters. • Content Security Policy (CSP): Configure CSP directives to restrict the sources from which resources, such as scripts, stylesheets, or images, can be loaded. Implement strict CSP policies to mitigate the impact of SQL Injection attacks by limiting the execution of inline scripts and external resources. • Parameterized Queries: Use parameterized queries or prepared statements when interacting with databases to prevent SQL Injection vulnerabilities.
  • 14. Cross Site Request Forgery (CSRF) A cross site request forgery is a type of a cyber attack that tricks the user into accidentally using their credentials to cause a state changing activity, such as changing passwords, changing email ids, transferring funds from their account or some other undesired action.
  • 15. Cross Site Request Forgery (CSRF) For a CSRF attack to take place 3 key conditions must be satisfied:- i. Relevant action:- There is some action that the attacker makes use of. This action is some privileged action like modifying permissions for other users or any action on user specific data such as changing the username or password of his/her account. ii. Cookie based session handling-: The application relies solely on session cookies to identify the user who has made the requests. iii. No predictable parameters:- The requests that perform the action do not contain any parameters whose values the attacker cannot determine or guess.
  • 16. Cross Site Request Forgery (CSRF)
  • 17. CSRF without any defence https://drive.google.com/file/d/1g47BleE6BTOYugg9 1YcQsYVSQ0OvwCZW/view?usp=drive_link
  • 19. Mitigations of CSRF • Anti-CSRF Tokens: Generate unique tokens for each user session and include them in form submissions or HTTP headers. Upon receiving a request, the server verifies the token's authenticity to ensure it originated from a legitimate source. • Same-Site Cookies: Set the SameSite attribute on session cookies to restrict their usage to the same origin, thereby preventing them from being sent along with cross-site requests. • Referer Header Checks: Validate the Referer header of incoming requests to ensure they originate from the same domain as the web application. • Double Submit Cookies: Include a random token in both a cookie and a form submission. Upon receiving the request, the server should compare the token values to verify their consistency.