SQL Injection: Realized By: Dorra Boukari
SQL Injection: Realized By: Dorra Boukari
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.
• 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
Comparative
analysis
5
5
Classical SQLi
Performance Evaluation Studying Cases Studying Cases
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
Or a list of usernames
3
7
Definition : What is Havij?
Performance Evaluation Studying Cases Studying Cases
• 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.
Given informations:
Search
9
Apply Havij (Vulnerable case)
Performance Evaluation Studying Cases Studying Cases
Given informations:
http://bruceanchorcruises.com/gallery_album.php?category=46
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