Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
218 views

SQL Injection: Realized By: Dorra Boukari

This document provides an overview of SQL injection attacks and the tool Havij. It defines SQL injection as exploiting vulnerabilities in applications that rely on databases by injecting unexpected SQL queries. The document explains how classical SQL injection works, demonstrates using Havij on a vulnerable and non-vulnerable website, and concludes that while Havij can find vulnerabilities, it may not be the most efficient tool and alternatives like SQLmap exist.

Uploaded by

doudi douda
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
218 views

SQL Injection: Realized By: Dorra Boukari

This document provides an overview of SQL injection attacks and the tool Havij. It defines SQL injection as exploiting vulnerabilities in applications that rely on databases by injecting unexpected SQL queries. The document explains how classical SQL injection works, demonstrates using Havij on a vulnerable and non-vulnerable website, and concludes that while Havij can find vulnerabilities, it may not be the most efficient tool and alternatives like SQLmap exist.

Uploaded by

doudi douda
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Tunisian Republic

Direction Of University Studies

SQL injection
Realized By : Dorra Boukari
Contents
SQL injection attack
• Definition
• Steps

Havij
• Definition
• Apply Havij (Not vulnerable case)
• Apply Havij (Vulnerable case)

Conclusion
• Benefits
• Drawbacks

2
Introduction

• Several attack have been bothering several users and threatening their security since the
appearance of networks .
Some attacks are based on the intrusion to control totaly or partially distant systems , other
attacks rely on the social engineering .Exceptionally ,SQL injection attack relies basically on the
vulnerability occuring in the database which make is dangerous and lethal.

3
3
What is SQL
Performance Evaluation Studying Cases Studying Cases

• Structured Query Language and it’s a standard language used for accessing and manipulating
database.

• What does SQL do?

• Execute queries
• Insert, update ,delete records
• Create new DB, new tables , stores procedures, vies
• Set permissions on tables nprocedures and views

3
4
Definition
SQLi attack:
:SQL
Definition
injection attack
Performance Evaluation Simulation
Studying CasesOn MATLAB Studying Cases

• Is a collection of methods used to exploit the vulnerability of security of


applications that rely on BD. It injects in the current SQL Request some
unexpected requests that can bother the security .
Accurate
• SQLi is considered one of the most lethal attacks Simulation
analytical
approach
approach

Comparative
analysis
5
5
Classical SQLi
Performance Evaluation Studying Cases Studying Cases

Basic form of SQL query


Query SQL :

tbUserName=getRequestString(«user name »);
tbPassword=getRequestString(« Password »);
tSQL=«  SELECT * FROM Users WHERE User
SQL
name=»+tbUserName;

Vulnerability
Query SQL becomes: ‘ or 1=‘1’

tbUserName=getRequestString(«user name »);
tbPassword=getRequestString(« Password »);
tSQL=«  SELECT * FROM Users WHERE User
3
6 name=» ‘or 1=‘1’; True
Classical SQLi
Performance Evaluation Studying Cases Studying Cases

Error Message gives the Username

Or a list of usernames

3
7
Definition : What is Havij?
Performance Evaluation Studying Cases Studying Cases

•   Havij is a automated SQL Injection tool that


helps penetration testers to find and exploit SQL
Injection vulnerabilities on a web page.

•   Advantages:
1. Perform back-end database fingerprint
2. Retrieves DBMS users and password hashes
3. Dumps tables and columns
4. Fetches data from the database
5. Runs SQL statements
6. Accesses the underlying file system
7. Executes commands on the operating system.

The success rate is more than 95% at injecting


vulnerable targets using Havij.
3
8
Apply Havij (Not vulnerable case)
Detection of intention Project Exploring CERT Evaluation

Given informations:

Web Server: Apache/2.2.16 (Debian) PHP/5.3.3-7+squeeze19 with


Suhosin-Patch mod_ssl/2.2.16 OpenSSL/0.9.8o
Powered-by: PHP/5.3.3-7+squeeze19

Search

9
Apply Havij (Vulnerable case)
Performance Evaluation Studying Cases Studying Cases

Given informations:
http://bruceanchorcruises.com/gallery_album.php?category=46

Web Server: Apache/2.2.16 (Debian) PHP/5.3.3-7+squeeze19 with Suhosin-Patch mod_ssl/2.2.16 OpenSSL/0.9.8o


Powered-by: PHP/5.3.3-7+squeeze19

• Types of SQL injection

• Classic SQL injection


• Blind SQL injection
• Database specific
SQL injection
• Compound SQLI

3
10
Conclusion

SQL injection attack is one of the most efficient methods to look for
vulnerabilities . But Havij is not the convenient tool as it can cause a huge
loss of time for the hacker or the person looking for vulnerability.Other
alternatives can be used BSQL Hacker , Mole, SQLmap, SQLninja

3
Bibliography
[1] Reste de Savoir, Que20 , les injections SQL :Le tutorial ,22 janvier 2016
[2] https://cybersecurityethicalhacking1112.wordpress.com What is Havij ? | CYBER
SECURITY & ETHICAL HACKING , 14 July 2014
[3] https://resources.infosecinstitute.com/best-free-and-open-source-sql-injection-tools/#gref
Best Free and Open Source SQL Injection Tools , 01/12/2018
[4] https://sourceforge.net/projects/themole/ | Automatic SQL Injection Exploitation Tool ,
29/11/2018

3
3

You might also like