SlideShare une entreprise Scribd logo
1  sur  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!!

Contenu connexe

Similaire à 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
 

Similaire à 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
 

Plus de Boston 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
 
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default  Presentation : Data Analysis Project PPTPredictive Analysis for Loan Default  Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPTBoston Institute of Analytics
 
Heart Disease Classification Report: A Data Analysis Project
Heart Disease Classification Report: A Data Analysis ProjectHeart Disease Classification Report: A Data Analysis Project
Heart Disease Classification Report: A Data Analysis ProjectBoston Institute of Analytics
 
Nmap project presentation : Unlocking Network Secrets: Mastering Port Scannin...
Nmap project presentation : Unlocking Network Secrets: Mastering Port Scannin...Nmap project presentation : Unlocking Network Secrets: Mastering Port Scannin...
Nmap project presentation : Unlocking Network Secrets: Mastering Port Scannin...Boston Institute of Analytics
 
Cyber Security Project Presentation : Essential Reconnaissance Tools and Tech...
Cyber Security Project Presentation : Essential Reconnaissance Tools and Tech...Cyber Security Project Presentation : Essential Reconnaissance Tools and Tech...
Cyber Security Project Presentation : Essential Reconnaissance Tools and Tech...Boston Institute of Analytics
 
Identifying and Eradicating Web Application Vulnerabilities : Cyber Security ...
Identifying and Eradicating Web Application Vulnerabilities : Cyber Security ...Identifying and Eradicating Web Application Vulnerabilities : Cyber Security ...
Identifying and Eradicating Web Application Vulnerabilities : Cyber Security ...Boston Institute of Analytics
 
Cyber Security Project Presentation: Unveiling Reconnaissance Tools and Techn...
Cyber Security Project Presentation: Unveiling Reconnaissance Tools and Techn...Cyber Security Project Presentation: Unveiling Reconnaissance Tools and Techn...
Cyber Security Project Presentation: Unveiling Reconnaissance Tools and Techn...Boston Institute of Analytics
 
Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...
Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...
Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...Boston Institute of Analytics
 
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...Boston Institute of Analytics
 

Plus de Boston Institute of Analytics (20)

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
 
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default  Presentation : Data Analysis Project PPTPredictive Analysis for Loan Default  Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
 
Heart Disease Classification Report: A Data Analysis Project
Heart Disease Classification Report: A Data Analysis ProjectHeart Disease Classification Report: A Data Analysis Project
Heart Disease Classification Report: A Data Analysis Project
 
Nmap project presentation : Unlocking Network Secrets: Mastering Port Scannin...
Nmap project presentation : Unlocking Network Secrets: Mastering Port Scannin...Nmap project presentation : Unlocking Network Secrets: Mastering Port Scannin...
Nmap project presentation : Unlocking Network Secrets: Mastering Port Scannin...
 
Cyber Security Project Presentation : Essential Reconnaissance Tools and Tech...
Cyber Security Project Presentation : Essential Reconnaissance Tools and Tech...Cyber Security Project Presentation : Essential Reconnaissance Tools and Tech...
Cyber Security Project Presentation : Essential Reconnaissance Tools and Tech...
 
Identifying and Eradicating Web Application Vulnerabilities : Cyber Security ...
Identifying and Eradicating Web Application Vulnerabilities : Cyber Security ...Identifying and Eradicating Web Application Vulnerabilities : Cyber Security ...
Identifying and Eradicating Web Application Vulnerabilities : Cyber Security ...
 
Cyber Security Project Presentation: Unveiling Reconnaissance Tools and Techn...
Cyber Security Project Presentation: Unveiling Reconnaissance Tools and Techn...Cyber Security Project Presentation: Unveiling Reconnaissance Tools and Techn...
Cyber Security Project Presentation: Unveiling Reconnaissance Tools and Techn...
 
Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...
Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...
Data Analysis Project : Targeting the Right Customers, Presentation on Bank M...
 
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
 

Dernier

Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
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
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
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
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 

Dernier (20)

Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
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
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
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
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 

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.