SQL INJECTION ATTACKS.

Slides:



Advertisements
Similar presentations
Module XIV SQL Injection
Advertisements

PHP SQL. Connection code:- mysql_connect("server", "username", "password"); Connect to the Database Server with the authorised user and password. Eg $connect.
SQL Injection Stephen Frein Comcast.
Understand Database Security Concepts
How Did I Steal Your Database Mostafa
Introduction The concept of “SQL Injection”
By Brian Vees.  SQL Injection  Username Enumeration  Cross Site Scripting (XSS)  Remote Code Execution  String Formatting Vulnerabilities.
NAVY Research Group Department of Computer Science Faculty of Electrical Engineering and Computer Science VŠB-TUO 17. listopadu Ostrava-Poruba.
1. What is SQL Injection 2. Different varieties of SQL Injection 3. How to prevent it.
07 December 2009Slide 1 of 1207 December 2009Slide 1 of 12 SQL Injection Primer By Nicole Gray, Cliff McCullough, Joe Hernandez.
Database Connectivity Rose-Hulman Institute of Technology Curt Clifton.
07 December 2009Slide 1 of 9 SQL Injection Primer By Nicole Gray, Cliff McCullough, Joe Hernandez.
Security in SQL Jon Holmes CIS 407 Fall Outline Surface Area Connection Strings Authenticating Permissions Data Storage Injections.
Albert Gonzales showed early talent and very easily breezed through computer classes. His remarkable computer skills allowed him to hack into the government.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
SQL-Injection attacks Damir Lizdek & Dan Rundlöf Language-based security.
Dec 13 th CS555 presentation1 Yiwen Wang --“Securing the DB may be the single biggest action an organization can take to protect its assets” David C. Knox.
Check That Input Preventing SQL Injection Attacks By Andrew Morton For CS 410.
SQL Injection Timmothy Boyd CSE 7330.
MIS Week 11 Site:
An anti-hacking guide.  Hackers are kindred of expert programmers who believe in freedom and spirit of mutual help. They are not malicious. They may.
Analysis of SQL injection prevention using a proxy server By: David Rowe Supervisor: Barry Irwin.
CSCI 6962: Server-side Design and Programming Secure Web Programming.
Lecture 14 – Web Security SFDV3011 – Advanced Web Development 1.
Preventing SQL Injection Attacks in Stored Procedures Alex Hertz Chris Daiello CAP6135Dr. Cliff Zou University of Central Florida March 19, 2009.
Lecture 16 Page 1 CS 236 Online SQL Injection Attacks Many web servers have backing databases –Much of their information stored in a database Web pages.
Attacking Applications: SQL Injection & Buffer Overflows.
Programming using C# Joins SQL Injection Stored Procedures
Accessing MySQL with PHP IDIA 618 Fall 2014 Bridget M. Blodgett.
Analysis of SQL injection prevention using a proxy server By: David Rowe Supervisor: Barry Irwin.
Web Application Security ECE ECE Internetwork Security What is a Web Application? An application generally comprised of a collection of scripts.
1 IT420: Database Management and Organization Database Security 5 April 2006 Adina Crăiniceanu
Attacking Data Stores Brad Stancel CSCE 813 Presentation 11/12/2012.
Analysis of SQL injection prevention using a filtering proxy server By: David Rowe Supervisor: Barry Irwin.
Accessing Your MySQL Database from the Web with PHP (Ch 11) 1.
Security Attacks CS 795. Buffer Overflow Problem Buffer overflows can be triggered by inputs that are designed to execute code, or alter the way the program.
SQL INJECTIONS Presented By: Eloy Viteri. What is SQL Injection An SQL injection attack is executed when a web page allows users to enter text into a.
Sumanth M Ganesh B CPSC 620.  SQL Injection attacks allow a malicious individual to execute arbitrary SQL code on your server  The attack could involve.
Web Applications Testing By Jamie Rougvie Supported by.
By Sean Rose and Erik Hazzard.  SQL Injection is a technique that exploits security weaknesses of the database layer of an application in order to gain.
Security Considerations Steve Perry
WEB SECURITY WEEK 2 Computer Security Group University of Texas at Dallas.
Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.
SQL Injection Anthony Brown March 4, 2008 IntroductionQuestionsBackgroundTechniquesPreventionDemoConclusions.
Secure Authentication. SQL Injection Many web developers are unaware of how SQL queries can be tampered with SQL queries are able to circumvent access.
Databases Kevin Wright Ben Bruckner Group 40. Outline Background Vulnerabilities Log File Cleaning This Lab.
SQL Injection Josh Mann. What is SQL Injection  SQL injection is a technique for exploiting web applications that use client-supplied data in SQL queries.
ADVANCED SQL.  The SQL ORDER BY Keyword  The ORDER BY keyword is used to sort the result-set by one or more columns.  The ORDER BY keyword sorts the.
SQL Injection By Wenonah Abadilla. Topics What is SQL What is SQL Injection Damn Vulnerable Web App SQLI Demo Prepared Statements.
SQL Injection Attacks S Vinay Kumar, 07012D0506. Outline SQL Injection ? Classification of Attacks Attack Techniques Prevention Techniques Conclusion.
Introduction SQL Injection is a very old security attack. It first came into existence in the early 1990's ex: ”Hackers” movie hero does SQL Injection.
SQL INJECTION Diwakar Kumar Dinkar M.Tech, CS&E Roll Diwakar Kumar Dinkar M.Tech, CS&E Roll
Cosc 5/4765 Database security. Database Databases have moved from internal use only to externally accessible. –Organizations store vast quantities of.
SQL Injection Are Your Web Applications Vulnerable? Presentation by Joe Combs29 March 2006 A SPILABS Whitepaper.
SQL Injection By Wenonah Abadilla.
SQL Injection.
Database System Implementation CSE 507
Group 18: Chris Hood Brett Poche
Building Secure ColdFusion Applications
SQL Injection.
Unix System Administration
SQL Injection Attacks Many web servers have backing databases
Cisco Data Virtualization
Intro to Ethical Hacking
Defense in Depth Web Server Custom HTTP Handler Input Validation
Chapter 13 Security Methods Part 3.
Lecture 2 - SQL Injection
Intro to Ethical Hacking
PHP Forms and Databases.
Presentation transcript:

SQL INJECTION ATTACKS

Sql injection is the ability to inject sql commands into the database engine through an existing application. The SQL Injection attack is possible when the programmers who write the code behind the page neglect to properly escape strings that are used in SQL queries. Programs common build SQL queries such to check values. For example the SQL statement: will return one row if the given user/password combination exists in the table users.

How to find out which server is on work before breaking in to the site for access, an attacker needs to know which SQL engine is at the back end. If the site has web page extensions like .asp, .aspx etc. then there is a high chance of SQL Server or MS Access. If the pages end as .jsp it could be an Oracle system at your end. If the pages are ending as.php, I guess it will be MySQL.

For example, if the web application is not well designed (not coded well) the attackers may read and alter the data present in the database. Instead of entering the username and password, the attackers enter some query to get the information from the database.

Ex: If you enter the string ( ' OR ''=‘ ) as both user name and password you can ensure that the WHERE clause always returns true. Without knowing any user names or passwords you can by-pass the log in screen. In this example you get the user name of the first person in the table. SELECT name from users WHERE name='name' AND password='password (ACTUAL) SELECT name from users WHERE name='' OR ''='' AND password='' OR ''='' [  this always returns true and allows him to access].

In some cases we don’t know the name of the table or the column names, but we can use the same techniques to find these out. We need to find out the name of the database that they are using. The function DATABASE() will give that value (but you have to guess at it as before). When we know the name of the database being used we can get the names of the tables.

Known real-world examples: On November 1, 2005, a high school student used SQL injection to break into the site of a Taiwanese information security magazine from the Tech Target group and steal customers' information. On August 17, 2009, the United States Justice Department charged an American citizen Albert Gonzalez and two unnamed Russians with the theft of 130 million credit card numbers using an SQL injection attack. On July 24-26, 2010, attackers from within Japan and China used an SQL injection to gain access to customers' credit card data from Neo Beat (an Osaka-based company) that runs a large online supermarket site

One more cause for injection: Metadata: Almost all SQL databases are based on the RDBM (Relational Database Model) . One important fact for SQL Injection Amongst Codd's 12 rules for a Truly Relational Database System: Metadata (data about the database) must be stored in the database just as regular data . Therefore, database structure can also be read and altered with SQL queries .

The common attacks are: Finding out the tables in a database. Finding out the column names in a database. Using the ORDER BY clause to find out the number of columns used in the database.

Preventing SQL injection: The various techniques used to prevent SQL injections are: Parameterized query Stored procedure Regular expression to discard input string . Hiding detailed error messages to the user. Have a less privileged user/role of your application in database etc.

Conclusion Protecting against SQL Injection requires Strong Design, correct input validation etc.