Part 2 Authors: Marco Cova, et al. Presented by Brett Parker.

Slides:



Advertisements
Similar presentations
Vulnerability Analysis of Web-Based Applications
Advertisements

Attacking Authentication and Authorization CSE 591 – Security and Vulnerability Analysis Spring 2015 Adam Doupé Arizona State University
By Philipp Vogt, Florian Nentwich, Nenad Jovanovic, Engin Kirda, Christopher Kruegel, and Giovanni Vigna Network and Distributed System Security(NDSS ‘07)
Using Programmer-Written Compiler Extensions to Catch Security Holes Authors: Ken Ashcraft and Dawson Engler Presented by : Hong Chen CS590F 2/7/2007.
By Brian Vees.  SQL Injection  Username Enumeration  Cross Site Scripting (XSS)  Remote Code Execution  String Formatting Vulnerabilities.
 Firewalls and Application Level Gateways (ALGs)  Usually configured to protect from at least two types of attack ▪ Control sites which local users.
5/1/2006Sireesha/IDS1 Intrusion Detection Systems (A preliminary study) Sireesha Dasaraju CS526 - Advanced Internet Systems UCCS.
Lesson 13-Intrusion Detection. Overview Define the types of Intrusion Detection Systems (IDS). Set up an IDS. Manage an IDS. Understand intrusion prevention.
XP Tutorial 9 New Perspectives on JavaScript, Comprehensive1 Working with Cookies Managing Data in a Web Site Using JavaScript Cookies.
Leveraging User Interactions for In-Depth Testing of Web Applications Sean McAllister, Engin Kirda, and Christopher Kruegel RAID ’08 1 Seoyeon Kang November.
C++ fundamentals.
Department Of Computer Engineering
Leveraging User Interactions for In-Depth Testing of Web Application Sean McAllister Secure System Lab, Technical University Vienna, Austria Engin Kirda.
Automatic Creation of SQL Injection and Cross-Site Scripting Attacks 2nd-order XSS attacks 1st-order XSS attacks SQLI attacks Adam Kiezun, Philip J. Guo,
W3af LUCA ALEXANDRA ADELA – MISS 1. w3af  Web Application Attack and Audit Framework  Secures web applications by finding and exploiting web application.
Lucent Technologies – Proprietary Use pursuant to company instruction Learning Sequential Models for Detecting Anomalous Protocol Usage (work in progress)
Chapter Seven Advanced Shell Programming. 2 Lesson A Developing a Fully Featured Program.
+ Websites Vulnerabilities. + Content Expand of The Internet Use of the Internet Examples Importance of the Internet How to find Security Vulnerabilities.
Chapter 12: Exception Handling
SQL INJECTION COUNTERMEASURES &
Hamdi Yesilyurt, MA Student in MSDF & PhD-Public Affaris SQL Riji Jacob MS Student in Computer Science.
CSCI 6962: Server-side Design and Programming Secure Web Programming.
About Dynamic Sites (Front End / Back End Implementations) by Janssen & Associates Affordable Website Solutions for Individuals and Small Businesses.
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.
Preventing SQL Injection Attacks in Stored Procedures Alex Hertz Chris Daiello CAP6135Dr. Cliff Zou University of Central Florida March 19, 2009.
AMNESIA: Analysis and Monitoring for NEutralizing SQL- Injection Attacks Published by Wiliam Halfond and Alessandro Orso Presented by El Shibani Omar CS691.
November 13, 2008 Ohio Information Security Forum Attack Surface of Web Applications James Walden Northern Kentucky University
Working with Cookies Managing Data in a Web Site Using JavaScript Cookies* *Check and comply with the current legislation regarding handling cookies.
Lecture slides prepared for “Computer Security: Principles and Practice”, 3/e, by William Stallings and Lawrie Brown, Chapter 5 “Database and Cloud Security”.
Computer Security and Penetration Testing
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
nd Joint Workshop between Security Research Labs in JAPAN and KOREA Profile-based Web Application Security System Kyungtae Kim High Performance.
Scalable Analysis of Distributed Workflow Traces Daniel K. Gunter and Brian Tierney Distributed Systems Department Lawrence Berkeley National Laboratory.
Chapter 8 Cookies And Security JavaScript, Third Edition.
ZigZag: Automatically Hardening Web Applications Against Client-side Validation Vulnerabilities Presented by Xianchen Meng CSCI 680 Advanced System and.
Chapter 2. Core Defense Mechanisms. Fundamental security problem All user input is untrusted.
CSC-682 Cryptography & Computer Security Sound and Precise Analysis of Web Applications for Injection Vulnerabilities Pompi Rotaru Based on an article.
Week seven CIT 354 Internet II. 2 Objectives Database_Driven User Authentication Using Cookies Session Basics Summary Homework and Project 2.
Web Application Security ECE ECE Internetwork Security What is a Web Application? An application generally comprised of a collection of scripts.
HIPS Host-Based Intrusion Prevention System By Ali Adlavaran & Mahdi Mohamad Pour (M.A. Team) Life’s Live in Code Life.
Attacking Data Stores Brad Stancel CSCE 813 Presentation 11/12/2012.
Problem Solving Techniques. Compiler n Is a computer program whose purpose is to take a description of a desired program coded in a programming language.
Beyond negative security Signatures are not always enough Or Katz Trustwave ot.com/
1 Swaddler: An Approach for the Anomaly-based Detection of State Violations in Web Application Marco Cova, Davide Balzarotti, Viktoria Felmetsger, and.
October 3, 2008IMI Security Symposium Application Security through a Hacker’s Eyes James Walden Northern Kentucky University
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.
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.
By Davide Balzarotti Marco Cova Viktoria V. FelmetsgerGiovanni Vigna Presented by: Mostafa Saad.
Web Security Lesson Summary ●Overview of Web and security vulnerabilities ●Cross Site Scripting ●Cross Site Request Forgery ●SQL Injection.
Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.
Michael Dalton, Christos Kozyrakis, and Nickolai Zeldovich MIT, Stanford University USENIX 09’ Nemesis: Preventing Authentication & Access Control Vulnerabilities.
Security Attacks CS 795. Buffer Overflow Problem Buffer overflow Analysis of Buffer Overflow Attacks.
Intrusion Detection Systems Paper written detailing importance of audit data in detecting misuse + user behavior 1984-SRI int’l develop method of.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Module: Software Engineering of Web Applications Chapter 3 (Cont.): user-input-validation testing of web applications 1.
EECS 354: Network Security Group Members: Patrick Wong Eric Chan Shira Schneidman Web Attacks Project: Detecting XSS and SQL Injection Vulnerabilities.
Effective Anomaly Detection with Scarce Training Data Presenter: 葉倚任 Author: W. Robertson, F. Maggi, C. Kruegel and G. Vigna NDSS
Saner: Composing Static and Dynamic Analysis to Validate Sanitization in Web Applications Davide Balzarotti, Marco Cova, Vika Felmetsger, Nenad Jovanovic,
By Collin Donaldson. Hacking is only legal under the following circumstances: 1.You hack (penetration test) a device/network you own. 2.You gain explicit,
Carrie Estes Collin Donaldson.  Zero day attacks  “zero day”  Web application attacks  Signing up for a class  Hardening the web server  Enhancing.
Chapter 7 SQL Injection I: Identification
Database and Cloud Security
Web Application Vulnerabilities, Detection Mechanisms, and Defenses
TriggerScope: Towards Detecting Logic Bombs in Android Applications
World Wide Web policy.
Static Detection of Cross-Site Scripting Vulnerabilities
Theodore Lawson CSCE548 Student Presentation, Topic #2
Server Concepts Dr. Charles W. Kann.
Lecture 2 - SQL Injection
Presentation transcript:

Part 2 Authors: Marco Cova, et al. Presented by Brett Parker

Some review

Outline Intro, Background, Trends Technologies Attacks Vulnerability Analysis MiMoSA

Vulnerability analysis The process of assessing the security of an application through auditing of either the application’s code or the application’s behavior for possible security problems Detection models Negative Positive Analysis techniques Static Dynamic

Negative detection model Model known vulnerabilities using expert knowledge Match the models against application Identify instances of vulnerabilities

Positive detection model Analysis based on “normal” behavior of application Want to see if application deviates from “normal” behavior Detection of vulnerabilities or attacks almost always done at runtime; not purely static or dynamic approach, but hybrid of both

Static analysis Models of correctness are built before program execution and tested during execution

AMNESIA Halfond and Orso Detection of SQL injection for Java-based apps Builds model of “expected” SQL queries At runtime, attempt to detect violations by seeing if the structure of the SQL statement is changed by user input (SQL keywords?) Example: ’ OR 1=1

AMNESIA

Assumptions of system 1. Source code of program contains enough information to build models of legitimate queries 2. Injection attack must violate the model in order to be detected Generates false positives if user input contains SQL keywords

SqlCheck Su and Wasserman Modified SQL parser with augmented grammar Tracks substrings from user input through program execution by marking start and end of string with special characters >> If parser determines that query syntax is modified by user string, blocks query Since it works only with language grammar, it does not require analysis of application source code

SqlCheck

Dynamic analysis Build models of expected behavior by analyzing application’s execution when given attack-free input Models derived from log files or system call traces After modeling, runtime behavior is compared with established models to identify discrepancies that might indicate malicious activity

Kruegel and Vigna Learning-based anomaly detection system using statistical models Identification of anomalous events in web requests that pass parameters Operates on URLs extracted from successful web requests stored in logs

Kruegel and Vigna

Learning phase Determine “normal” values of each parameter Sets dynamic detection threshold Detection phase Return anomaly score for each observed example of a parameter value in the interval [0, 1] Final anomaly score calculated If it is greater than threshold determined during learning phase, request is considered anomalous

Kruegel and Vigna Advantages Does not require any human interaction – learn profiles of normal behavior automatically Positive approach means able to detect known and unknown attacks Server-side analysis means language independent Disadvantage Assumes that anomaly  malicious behavior; not always the case

Positive approaches adv/disadv Advantage Since model “normal” behavior, they can detect both known and unknown attacks Disadvantages But what is “normal behavior” ? Systems vulnerable to “mimicry attacks” – exploit avoids detection by looking like normal behavior Runtime monitoring of the application introduces overhead Negative approaches used more in practice

Open issues No approach can be considered “silver bullet” for all conditions and cases Sometimes, vulnerability analysis for traditional applications is used for web apps – this is difficult due to shared persistent state often found in web apps Web apps are usually composed of many modules, sometimes written in different languages

Open issues Each analysis technique requires different models and detects vulnerabilities in different ways Difficult to correctly model sanitization Some attacks violate intended logic of web application which can be difficult to express in analysis tools No standard accepted dataset available for use as “base-line” for evaluation; all tools operate on their own dataset, making it difficult to compare results

Questions?

Authors: Davide Balzarotti, Marco Cova, et al. Presented by Brett Parker Some content inspired by slides by Benjamin Prosnitz

Outline Intro, Background, Trends Technologies Attacks Vulnerability Analysis MiMoSA

Intro and motivation Current approaches to securing web apps focus on Application-level firewalls – analyze requests sent to web applications/servers Vulnerability analysis techniques – negative, positive, static, dynamic Limitations of these approaches Can only detect vulnerabilities in single modules Cannot model interactions among multiple technologies and languages Do not account for intended workflow or extended state

Concepts Indented workflow Models the assumptions the developer has made about how a user should navigate through an application Extended state Distributed collection of session-related information, accessed and modified by different modules of a web application at different times during a user session Example: LAMP

Concepts Multi-module vulnerabilities Vulnerabilities that originate from interaction of multiple application modules Modules communicate by reading and modifying application’s extended state

Contributions 1. Model of web application’s extended state that is not limited to single procedure or code module 2. Analyze interaction between application code and back-end architecture (databases) which helps identify data-driven attacks 3. Derive intended workflow of application and provide an analysis technique to identify multi-step attacks that attempt to exploit it

MiMoSA Multi-Module State Analyzer

Multi-module attacks 2 types Data-flow attacks Workflow attacks

Data-flow attacks 1. Attacker uses some module to inject data into the application’s extended state 2. Then, another module uses attacker’s data in insecure way Examples SQL injection Cross-site scripting

Workflow attacks Attacker circumvents navigation restrictions of a web application Usually restrictions are enforced using extended state Examples Bypassing authentication – skipping right to content Skipping required step in online shopping checkout

State entity Any form of state that can be shared between modules Can be a variable or other organizational unit Can be server-side PHP session variable Can be client-side Cookies, GET or POST parameters

Module view Representation of the state-equivalent execution paths Path followed by the execution path in a module Summary of the different possible extended states of the application Example: one module with two views Displays content if user is authenticated Displays login page if user is not authenticated

Module view components Preconditions Conditions which must be met for the view to be accessed legally Postconditions State entities modified by the view Sinks The use of some unsanitized state entity to do something dangerous or malicious

Application paths Path Basically, a sequence of views followed by the user through the application Entry point a view which has no preconditions Intended path The intended workflow of the application, expressed either through explicit links or other navigational features or behaviors

Vulnerabilities Strings used in create.php used to create new usernames now sanitized, and index.php outputs these usernames – vulnerable to XSS attack! In answer.php, verification of user logged-in-ness done through loggedin variable, when it should be done throught _SESSION[“loggedin”] – attacker could manually set that variable in GET or POST request!

Two phases of analysis Intra-module phase Examines each module in isolation Determine preconditions, postconditions, sinks Determine links to other modules in same view Inter-module phase Examines application as a whole Uses intra-module analysis to reconstruct intended workflow of the application

Intra-module analysis

1. Control flow and data flow analysis Uses Pixy PHP parser [9] to determine control and data flow of the PHP module 2. Database analysis Translate interaction between application module and back-end database into “variable assignments” Determine how query results are handled in application Intra-module analysis

3. Views extraction Perform state analysis to determine which statements in the control flow graph are related State-related – operations that modify server-side state Example: _SESSION or session_start() Sink-related – operations where state entities are used in sensitive or potentially dangerous tasks Example: modification of _SESSION[“loggedin”] View creation – one view created for each set of preconditions, postconditions, and sinks found Indentify dependencies between views

Intra-module analysis Links extraction Identify links contained in the module and associate them with the views they belong to This information used in later inter-module analysis to determine application’s intended workflow

Intra-module analysis

Inter-module analysis

1. Intended workflow determination Connect the views identified in intra-module anlysis into single flow graph, representing workflow Check every possible navigation path Detect vulnerabilities by seeing if there are any violations of intended policy as represented by flow graph

Inter-module analysis

Public view identification Determine publicly accessible pages which don’t require any authentication Example: FAQ or help pages Not used in vulnerability detection – simply used to ensure completeness of workflow graph

Inter-module analysis

Results

Found all known vulnerabilities and identified some new ones Some false positives Takes a long time Future work Extend to support more application types and languages Reduce number of false positives

Thanks! Questions?