Top Banner
SQL injection Figure 1 By Kaveri Bhasin
13

SQL injection Figure 1 By Kaveri Bhasin. Motive of SQL Injection Obtain data from database Modify system functions Insert data in the backend database.

Jan 02, 2016

Download

Documents

Gabriel Carson
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: SQL injection Figure 1 By Kaveri Bhasin. Motive of SQL Injection Obtain data from database Modify system functions Insert data in the backend database.

SQL injection

Figure 1

By Kaveri Bhasin

Page 2: SQL injection Figure 1 By Kaveri Bhasin. Motive of SQL Injection Obtain data from database Modify system functions Insert data in the backend database.

Motive of SQL Injection

• Obtain data from database

• Modify system functions

• Insert data in the backend database

Page 3: SQL injection Figure 1 By Kaveri Bhasin. Motive of SQL Injection Obtain data from database Modify system functions Insert data in the backend database.

Figure 2.

Page 4: SQL injection Figure 1 By Kaveri Bhasin. Motive of SQL Injection Obtain data from database Modify system functions Insert data in the backend database.

VictimsMostly Web applications with user input

facilities.

Page 5: SQL injection Figure 1 By Kaveri Bhasin. Motive of SQL Injection Obtain data from database Modify system functions Insert data in the backend database.
Page 6: SQL injection Figure 1 By Kaveri Bhasin. Motive of SQL Injection Obtain data from database Modify system functions Insert data in the backend database.

Simplest Procedure

1. Guess field names.

2. Construct a query and check for SQL status

3. If server gives error, field name is incorrect, else

lets proceed…

Page 7: SQL injection Figure 1 By Kaveri Bhasin. Motive of SQL Injection Obtain data from database Modify system functions Insert data in the backend database.

Cont.

• With the correct field, construct SQL query and inject

Example: 101 AND Len(( SELECT first_name FROM user_data

WHERE userid =15613)) = 6

Page 8: SQL injection Figure 1 By Kaveri Bhasin. Motive of SQL Injection Obtain data from database Modify system functions Insert data in the backend database.

Paper overview

• Types of Vulnerabilities

• Measures

• Tools (Webgoat)

Page 9: SQL injection Figure 1 By Kaveri Bhasin. Motive of SQL Injection Obtain data from database Modify system functions Insert data in the backend database.

Types of vulnerabilities

• Database system vulnerability

• Type handling

• Injected filtered escape characters

Page 10: SQL injection Figure 1 By Kaveri Bhasin. Motive of SQL Injection Obtain data from database Modify system functions Insert data in the backend database.

Measures

• Web application design: Analyze against vulnerabilities

• Use strongly defined types and validation for user input

• Use parameterized queries

Page 11: SQL injection Figure 1 By Kaveri Bhasin. Motive of SQL Injection Obtain data from database Modify system functions Insert data in the backend database.

Tools

• Webgoat

Developed by OWASP.org

Free source to experiment and learnt about SQL injection

Page 12: SQL injection Figure 1 By Kaveri Bhasin. Motive of SQL Injection Obtain data from database Modify system functions Insert data in the backend database.

Conclusion

SQL injection is a serious concern

A single design error can be disastrous for the security of sensitive information

Page 13: SQL injection Figure 1 By Kaveri Bhasin. Motive of SQL Injection Obtain data from database Modify system functions Insert data in the backend database.

References

• Figure 1. http://ocliteracy.com/techtips/sql-injection.html

• Figure 2. “Towards an Aspect-Oriented Intrusion Detection Framework”

• Zhi Jian Zhu and Mohammad Zulkernine• http://www.owasp.org/• http://www.spidynamics.com/papers/SQLInjection

WhitePaper.pdf