AMNESIA: Analysis and Monitoring for NEutralizing SQL- Injection Attacks Published by Wiliam Halfond and Alessandro Orso Presented by El Shibani Omar CS691.

Slides:



Advertisements
Similar presentations
Module XIV SQL Injection
Advertisements

Basic SQL Introduction Presented by: Madhuri Bhogadi.
Modern Web Application Frameworks CSE 591 – Security and Vulnerability Analysis Spring 2015 Adam Doupé Arizona State University
Creating Stronger, Safer, Web Facing Code JPL IT Security Mary Rivera June 17, 2011.
Automating Bespoke Attack Ruei-Jiun Chapter 13. Outline Uses of bespoke automation ◦ Enumerating identifiers ◦ Harvesting data ◦ Web application fuzzing.
-Ajay Babu.D y5cs022.. Contents Who is hacker? History of hacking Types of hacking Do You Know? What do hackers do? - Some Examples on Web application.
Sania: Syntactic and Semantic Analysis for Automated Testing against SQL Injection Yuji Kosuga, Kenji Kono, Miyuki Hanaoka Keio University Miho Hishiyama,
The Essence of Command Injection Attacks in Web Applications Zhendong Su and Gary Wassermann Present by Alon Kremer April 2011.
Sound and Precise Analysis of Web Applications for Injection Vulnerabilities Gary Wassermann Zhendong Su.
Leveraging User Interactions for In-Depth Testing of Web Applications Sean McAllister, Engin Kirda, and Christopher Kruegel RAID ’08 1 Seoyeon Kang November.
SQL Injection and Buffer overflow
Database Management Systems (DBMS)
Handling Security Threats in Kentico CMS Karol Jarkovsky Sr. Solution Architect Kentico Software
Sys Prog & Scripting - HW Univ1 Systems Programming & Scripting Lecture 15: PHP Introduction.
Check That Input Preventing SQL Injection Attacks By Andrew Morton For CS 410.
SQL Injection Timmothy Boyd CSE 7330.
Chirag N. Modi and Prof. Dhiren R. Patel NIT Surat, India Ph. D Colloquium, CSI-2011 Signature Apriori based Network.
CSCI 6962: Server-side Design and Programming Course Introduction and Overview.
Analysis of SQL injection prevention using a proxy server By: David Rowe Supervisor: Barry Irwin.
CSE470 Software Engineering Fall Database Access through Java.
SQL INJECTION COUNTERMEASURES &
Hamdi Yesilyurt, MA Student in MSDF & PhD-Public Affaris SQL Riji Jacob MS Student in Computer Science.
(CPSC620) Sanjay Tibile Vinay Deore. Agenda  Database and SQL  What is SQL Injection?  Types  Example of attack  Prevention  References.
CSCI 6962: Server-side Design and Programming Secure Web Programming.
Lecture 14 – Web Security SFDV3011 – Advanced Web Development 1.
Web Application Access to Databases. Logistics Test 2: May 1 st (24 hours) Extra office hours: Friday 2:30 – 4:00 pm Tuesday May 5 th – you can review.
Automatically Hardening Web Applications Using Precise Tainting Anh Nguyen-Tuong Salvatore Guarnieri Doug Greene Jeff Shirley David Evans University of.
Preventing SQL Injection Attacks in Stored Procedures Alex Hertz Chris Daiello CAP6135Dr. Cliff Zou University of Central Florida March 19, 2009.
Lecture slides prepared for “Computer Security: Principles and Practice”, 3/e, by William Stallings and Lawrie Brown, Chapter 5 “Database and Cloud Security”.
M1G Introduction to Database Development 6. Building Applications.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
Preventing Web Application Injections with Complementary Character Coding Raymond Mui Phyllis Frankl Polytechnic Institute of NYU Presented at ESORICS.
Attacking Applications: SQL Injection & Buffer Overflows.
Introduction to SEQUEL. What is SEQUEL? Acronym for Structural English Query Language Acronym for Structural English Query Language Standard language.
Accessing MySQL with PHP IDIA 618 Fall 2014 Bridget M. Blodgett.
CSC-682 Cryptography & Computer Security Sound and Precise Analysis of Web Applications for Injection Vulnerabilities Pompi Rotaru Based on an article.
Analysis of SQL injection prevention using a proxy server By: David Rowe Supervisor: Barry Irwin.
NMED 3850 A Advanced Online Design January 12, 2010 V. Mahadevan.
Security Scanners Mark Shtern. Popular attack targets Web – Web platform – Web application Windows OS Mac OS Linux OS Smartphone.
CANDID : Preventing SQL Injection Attacks Using Dynamic Candidate Evaluations V. N. Venkatakrishnan Assistant Professor, Computer Science University of.
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.
CSC 2720 Building Web Applications Server-side Scripting with PHP.
October 3, 2008IMI Security Symposium Application Security through a Hacker’s Eyes James Walden Northern Kentucky University
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.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
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.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
Server-side Programming The combination of –HTML –JavaScript –DOM is sometimes referred to as Dynamic HTML (DHTML) Web pages that include scripting are.
By Davide Balzarotti Marco Cova Viktoria V. FelmetsgerGiovanni Vigna Presented by: Mostafa Saad.
WEB SECURITY WEEK 2 Computer Security Group University of Texas at Dallas.
Web Security Lesson Summary ●Overview of Web and security vulnerabilities ●Cross Site Scripting ●Cross Site Request Forgery ●SQL Injection.
Module: Software Engineering of Web Applications Chapter 3 (Cont.): user-input-validation testing of web applications 1.
SQL Injection Anthony Brown March 4, 2008 IntroductionQuestionsBackgroundTechniquesPreventionDemoConclusions.
SQL. Originally developed by IBM Standardized in 80’s by ANSI and ISO Language to access relational database and English-like non-procedural Predominant.
Example – SQL Injection MySQL & PHP code: // The next instruction prompts the user is to supply an ID $personID = getIDstringFromUser(); $sqlQuery = "SELECT.
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.
Understand Data Definition Language (DDL) Database Administration Fundamentals LESSON 1.4.
1 Section 1 - Introduction to SQL u SQL is an abbreviation for Structured Query Language. u It is generally pronounced “Sequel” u SQL is a unified language.
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.
Web Security (cont.) 1. Referral issues r HTTP referer (originally referrer) – HTTP header that designates calling resource  Page on which a link is.
SQL Injection Attacks.
Database and Cloud Security
Database System Implementation CSE 507
Group 18: Chris Hood Brett Poche
Web Application Vulnerabilities, Detection Mechanisms, and Defenses
Chapter 13 Security Methods Part 3.
Lecture 2 - SQL Injection
Presentation transcript:

AMNESIA: Analysis and Monitoring for NEutralizing SQL- Injection Attacks Published by Wiliam Halfond and Alessandro Orso Presented by El Shibani Omar CS691 – UCCS – S2012 April 30, 2012

Outline  SQL Overview  SQL Injection Attacks Overview  AMNESIA  AMNESIA Work Flow  AMNESIA Implementation  Conclusion

SQL Overview  Structured Query Language  Database language designed for managing data in RDBMS.  1970s by Dr. Codd.  ANSI: 1 st SQL standard in 1986,  ANSI: updates in 1989, …  SQL Uses DML (Data Manipulation Language)

SQL Injection Attacks

Example of interaction between a user and a typical web application. A typical web application in which a user on a client machine can access services provided by an application server and an underlying database.

SQL Injection Attacks Con..  SQL servers allow multiple statements.  SQLIAs: Exploiting an application security vulnerability.  SQLIAs: described as one of the most serious security threats to web applications  SQLIAs: Caused by insufficient input validation.  Gartner Group  Gartner Group:97% of 300 websites were vulnerable to SQLIAs. SELECT * FROM `users` WHERE `name` = ‘Al'; SELECT * FROM `users`; DROP TABLE `users`;

Users SQLIA Example SELECT * FROM users WHERE login=’guest’ Nameloginpass GuestguestN/A Administrator admin b6542bc9be1b8730b45b49fd8 Sean James sjames 5b0f32168b20250bb d6e753 Lupaya John ljohn 4a8968e60a05cb59308d3c954a8bb00a Nameloginpass GuestguestN/A Guest

SELECT * FROM users WHERE login=’admin’ AND pass=’ admin2011’ AdminNameloginpass Administrator admin ************ MD5(admin2011) = b6542bc9be1b8730b45b49fd8 SQLIA Example Con.. UsersNameloginpass GuestguestN/A Administrator admin b6542bc9be1b8730b45b49fd8 Sean James sjames 5b0f32168b20250bb d6e753 Lupaya John ljohn 4a8968e60a05cb59308d3c954a8bb00a

UsersNameloginpass GuestguestN/A Administrator admin b6542bc9be1b8730b45b49fd8 Sean James sjames 5b0f32168b20250bb d6e753 Lupaya John ljohn 4a8968e60a05cb59308d3c954a8bb00a SQLIA Example con’t Attacker ’ OR 1=1 --Nameloginpass GuestguestN/A Administrator admin 243c fc95e9bfab0a7c5bcb3a8 Sean James sjames 5b0f32168b20250bb d6e753 Lupaya John ljohn 4a8968e60a05cb59308d3c954a8bb00a SELECT * FROM users WHERE login=’ ’ OR 1=1 -- ’ AND pass= ‘ ‘ SELECT * FROM users WHERE login=’ ’ OR 1=1

Methods to prevent SQLIAs  Input Validation Techniques: But can prevent some vulnerabilities  Least Privilege Limitations, less permissions, inflexible  Static query statement Not good when use dynamic query  Intrusion Detection Systems (IDS): Provide little or no protection (e.g., firewalls, proxy, Gateway)  Analysis-based Techniques: Static techniques: imprecise or only focus on a specific aspect of the problem. Dynamic techniques: Produce false negatives.

AMNESIA Definition  AMNESIA  Analysis and Monitoring for NEutralizeing SQL- Injection Attacks  AMNESIA is generally combining static analysis and runtime monitoring.

AMNESIA Work Flow  AMNESIA consists of four steps: 1.Identifying hotspots 2.Building SQL-query models 3.Instrumenting application 4.Runtime monitoring

AMNESIA Work Flow con’t hotspots points Step1: Identify Hotspots: This step performs a simple scanning of the application code to identify hotspots points in the application code that issue SQL queries to the underlying database. hotspots point

AMNESIA Work Flow Con.. Step2: Build SQL Query Models: For each hotspot, build a model that represents all the possible SQL queries that may be generated at that hotspot. It uses Java String Analysis (JSA). β = value

AMNESIA Work Flow Con.. Step3: Instrument Application: In this step, we instrument the application by adding calls to the monitor that check the queries at runtime. For each hotspot, the technique inserts a call to the monitor before the call to the database. hotspot ID: correlates the hotspot with the specific SQL- query model queryString: contains the actual query about to be submitted

AMNESIA Work Flow Con.. Step4: Runtime Monitoring: The monitor parses the query string into a sequence of tokens according to the specific SQL syntax considered. Tokens in the query that represent string or numeric constants can match any transition in the SQL-query model. = Empty = Value Original Query SQL- query model Incoming Query from user = Empty = Value

AMNESIA Implementation Implementation consists of three modules: 1)Analysis module: implements Steps 1 & 2. inputs JSP pages and outputs a list of hotspots. Builds a SQL-query models for each hotspot 2)Instrumentation module: implements Step 3. instruments each hotspot with a call to the runtime monitor. 3)Runtime-monitoring module: implements Step 4. inputs a query string and the hotspot ID. retrieves the SQL-query model for that hotspot. Match SQL-query model with the submitted query string. Implementation is Java-based.

web applications AMNESIA Toolset Instrumentation Module Analysis Module SQL- Query Model Instrumented web application Instrumented web application Instrumented web application Instrumented web application Instrumented web application Static Analysis High-level overview of AMNESIA

High-level overview of AMNESIA Con.. Instrumented web applications AMNESIA Toolset Database Instrumented web applications Runtime Monitoring Module Legitimate SQL SQLIAs SQL- Query Model Reject & Report Matching… URL Data HTML Data Runtime Monitoring

Conclusion  AMNESIA uses all types of SQLIA defenses.  Responds and reports immediately.  No false positives  No way an attacker can modify SQL statement.  Generalized to various web applications.  Used a set of real web applications.  Real attacks were generated by a real attacker.  AMNESIA is effective, efficient, and precise.