1 Swaddler: An Approach for the Anomaly-based Detection of State Violations in Web Application Marco Cova, Davide Balzarotti, Viktoria Felmetsger, and.

Slides:



Advertisements
Similar presentations
Configuration management
Advertisements

Closing the Gap: Analyzing the Limitations of Web Application Vulnerability Scanners David Shelly Randy Marchany Joseph Tront Virginia Polytechnic Institute.
Module 12: Auditing SQL Server Environments
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
 The Citrix Application Firewall prevents security breaches, data loss, and possible unauthorized modifications to Web sites that access sensitive business.
Part 2 Authors: Marco Cova, et al. Presented by Brett Parker.
Bypassing Client-Side Protection CSE 591 – Security and Vulnerability Analysis Spring 2015 Adam Doupé Arizona State University
OWASP WEBGOAT Alaa Darabseh Department of Computer Science
AUTOMATED DISCOVERY OF PARAMETER POLLUTION VULNERABILITIES IN WEB APPLICATIONS Marco Balduzzi, Carmen Torrano Gimenez, Davide Balzarotti, and Engin Kirda,
By Philipp Vogt, Florian Nentwich, Nenad Jovanovic, Engin Kirda, Christopher Kruegel, and Giovanni Vigna Network and Distributed System Security(NDSS ‘07)
Automating Bespoke Attack Ruei-Jiun Chapter 13. Outline Uses of bespoke automation ◦ Enumerating identifiers ◦ Harvesting data ◦ Web application fuzzing.
By Brian Vees.  SQL Injection  Username Enumeration  Cross Site Scripting (XSS)  Remote Code Execution  String Formatting Vulnerabilities.
5/1/2006Sireesha/IDS1 Intrusion Detection Systems (A preliminary study) Sireesha Dasaraju CS526 - Advanced Internet Systems UCCS.
Information Networking Security and Assurance Lab National Chung Cheng University 1 Top Vulnerabilities in Web Applications (I) Unvalidated Input:  Information.
Intrusion detection Anomaly detection models: compare a user’s normal behavior statistically to parameters of the current session, in order to find significant.
Leveraging User Interactions for In-Depth Testing of Web Applications Sean McAllister, Engin Kirda, and Christopher Kruegel RAID ’08 1 Seoyeon Kang November.
Aaron Blankstein and Michael J. Freedman Princeton University Tuan Tran.
Maintaining and Updating Windows Server 2008
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.
Intrusion Detection System Marmagna Desai [ 520 Presentation]
Presenter Deddie Tjahjono.  Introduction  Website Application Layer  Why Web Application Security  Web Apps Security Scanner  About  Feature  How.
Designing Security In Web Applications Andrew Tomkowiak 10/8/2013 UW-Platteville Software Engineering Department
D ATABASE S ECURITY Proposed by Abdulrahman Aldekhelallah University of Scranton – CS521 Spring2015.
Lucent Technologies – Proprietary Use pursuant to company instruction Learning Sequential Models for Detecting Anomalous Protocol Usage (work in progress)
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Introduction and simple using of Oracle Logistics Information System Yaxian Yao
Prithvi Bisht, Timothy Hinrichs, Nazari Skrupsky, Radoslaw Bobrowicz, V.N. Venkatakrishnan University of Illinois at Chicago, USA ACM CCS (Oct,2010) Prithvi.
+ Websites Vulnerabilities. + Content Expand of The Internet Use of the Internet Examples Importance of the Internet How to find Security Vulnerabilities.
CSCI 6962: Server-side Design and Programming Secure Web Programming.
Lecture 14 – Web Security SFDV3011 – Advanced Web Development 1.
A Framework for Automated Web Application Security Evaluation
Intrusion Prevention System. Module Objectives By the end of this module, participants will be able to: Use the FortiGate Intrusion Prevention System.
Lecture slides prepared for “Computer Security: Principles and Practice”, 3/e, by William Stallings and Lawrie Brown, Chapter 5 “Database and Cloud Security”.
nd Joint Workshop between Security Research Labs in JAPAN and KOREA Profile-based Web Application Security System Kyungtae Kim High Performance.
1 Internet Browsing Vulnerabilities and Security ECE4112 Final Lab Ye Yan Frank Park Scott Kim Neil Joshi.
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.
Web Application Security ECE ECE Internetwork Security What is a Web Application? An application generally comprised of a collection of scripts.
Vigilante: End-to-End Containment of Internet Worms Authors : M. Costa, J. Crowcroft, M. Castro, A. Rowstron, L. Zhou, L. Zhang, and P. Barham In Proceedings.
Oracle Data Integrator Procedures, Advanced Workflows.
Defending Browsers against Drive-by Downloads:Mitigating Heap-Spraying Code Injection Attacks Authors:Manuel Egele, Peter Wurzinger, Christopher Kruegel,
HIPS Host-Based Intrusion Prevention System By Ali Adlavaran & Mahdi Mohamad Pour (M.A. Team) Life’s Live in Code Life.
Web Logic Vulnerability By Eric Jizba and Yan Chen With slides from Fangqi Sun and Giancarlo Pellegrino.
Building Secure Web Applications With ASP.Net MVC.
1 Test Selection for Result Inspection via Mining Predicate Rules Wujie Zheng
Module 7: Advanced Application and Web Filtering.
By Davide Balzarotti Marco Cova Viktoria V. FelmetsgerGiovanni Vigna Presented by: Mostafa Saad.
Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.
Intrusion Detection Systems Paper written detailing importance of audit data in detecting misuse + user behavior 1984-SRI int’l develop method of.
Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software Paper by: James Newsome and Dawn Song.
Saner: Composing Static and Dynamic Analysis to Validate Sanitization in Web Applications Davide Balzarotti, Marco Cova, Vika Felmetsger, Nenad Jovanovic,
Introduction to ASP.NET development. Background ASP released in 1996 ASP supported for a minimum 10 years from Windows 8 release ASP.Net 1.0 released.
Maintaining and Updating Windows Server 2008 Lesson 8.
Chapter 29: Program Security Dr. Wayne Summers Department of Computer Science Columbus State University
Constraint Framework, page 1 Collaborative learning for security and repair in application communities MIT site visit April 10, 2007 Constraints approach.
Web Security (cont.) 1. Referral issues r HTTP referer (originally referrer) – HTTP header that designates calling resource  Page on which a link is.
Database and Cloud Security
Automatic Web Security Unit Testing: XSS Vulnerability Detection Mahmoud Mohammadi, Bill Chu, Heather Richter, Emerson Murphy-Hill Presenter:
Software Testing.
World Wide Web policy.
Static Detection of Cross-Site Scripting Vulnerabilities
Secure Software Confidentiality Integrity Data Security Authentication
Marking Scheme for Semantic-aware Web Application Security
Lecture 2 - SQL Injection
Chapter 29: Program Security
Outline System architecture Current work Experiments Next Steps
Presentation transcript:

1 Swaddler: An Approach for the Anomaly-based Detection of State Violations in Web Application Marco Cova, Davide Balzarotti, Viktoria Felmetsger, and Giovanni Vigna 10th International Symposium on Recent Advances in Intrusion Detection (RAID)10th International Symposium on Recent Advances in Intrusion Detection (RAID) 2007 Department of Computer Science, University of California Santa Barbara Santa Barbara, CA , USA

2 Outline Introdution Threat Model Approach Implementation Evaluation Related Work Conclusions

3 Introduction There are attacks that cannot be detected only by looking at the external behavior of a web application. Swaddler  analyzes the internal state of a web application  learns the relationships between the app.’s critical execution points and the app.’s internal state.

4 Introduction Web applications are usually implemented as a number of server-side components.  Take parameter from: request parameters (attribute value) request header (cookie) These components need to share and maintain state. (session)  keep track of the actions of a user as he/she interacts with the application

5 Introduction Swaddler is based on a detailed characterization of the internal state of a web application, by means of a number of anomaly models.

6 Threat Model Input Validation Attacks  SQL injection "SELECT * FROM users WHERE name = ’" + userName + "’;“ ’;DROP TABLE users; "SELECT * FROM users WHERE name =’ ’; DROP TABLE users;  cross-site scripting (XSS) an attacker is able to force a user’s web browser to evaluate attacker-supplied code (typically JavaScript) in the context of a trusted web site. circumvent the browsers’ same-origin policy

7 Threat Model Workflow Violation Attacks  Exploit logical errors in web applications in order to bypass the intended workflow of the application.  authentication bypass, parameter tampering, and code inclusion attacks

8 Simple Example - Store Application 1 An authentication bypass vulnerability.  Assume administrator account is ‘admin’

9 Simple Example - Store Application 1 When register globals is enabled.  the PHP interpreter automatically binds the parameters coming from the user’s requests to global variables. gedin=yes&username=admin gedin=yes&username=admin

10 Simple Example - Store Application 1 SESSION[’username’] not set to the expected admin value The attack would force the application to move into an anomalous state

11 Simple Example - Store Application 2 The second attack exploits the fact that the application computes the amount of money to be charged to the user’s credit card in several different steps.

12 Simple Example - Store Application 2 An attacker can directly go from Step 1 to Step 3 by simply entering the correct URL associated with Step 3. Total amount = Purchased price + Taxes + Shipping cost

13 Simple Example - Store Application 3 A parameter tampering vulnerability When a user chooses a shipping method from a select box (method to cost) Fails to make additional server-side checks The SESSION[’shipcost’] variable will be an anomalous value

14 Approach From the outside  Only analyze HTTP requests and responses in isolation. From the inside  The detection of workflow attacks consists of monitoring, at runtime, the state of the web application. There is a strong relationship between insecure and anomalous states

15 Approach The models of the normal state for each program instruction have to be inferred from a set of attack-free execution traces. Automatically extract the runtime values of state variables.

16 Approach Define the state of a web application at a certain point in the execution as the information that survives a single client- server interaction. (user session)

17 Approach A basic block is a sequence of consecutive statements in which flow of control enters at the beginning and leaves at the end without halt or possibility of branching except at the end.

18

19 Approach An event generated by the sensor  a mapping between the variable names and their current values. For each basic block of the application, the analyzer maintains a profile  a set of statistical models used to characterize certain features of the state variables..

20 Implementation The sensor is implemented as a module of the open-source Zend Engine interpreter and the analyzer is built on top of the libAnomaly framework[16].  The Zend Engine is the standard interpreter for the PHP language. [16] The Computer Security Group at UCSB: libAnomaly Project Homepage.

21 Implementation Linear scan of the sequence of intermediate statements identifies the corresponding basic blocks The first statement of each basic block is modified by overwriting its handler with a custom instrumentation handler Handler creates an event corresponding to the basic block being executed

22 Implementation After delivering an event to the analyzer, handler do  Training: no further action  Detection: generate alert, log request, … Based on the modification of the web application’s interpreter  direct access to all of the interpreter’s data structures  sensor has the capability of blocking attacks before they reach a vulnerable point in the application

23 Implementation Anomaly Detection  a modified version of the libAnomaly framework  uses a number of different models to identify anomalous states for each basic block of a web application  A model is a set of procedures used to evaluate a certain feature of a state variable associated with the block or a certain feature that involves multiple state variables  profile that keeps the mapping between variables and models  assign a probability value to a feature of a state variable or a set of state variables

24 Implementation Feature values with a sufficiently low probability indicate a potential attack Once the profiles have been created  the models have learned the characteristics of normal events  suitable thresholds have been derived

25 Implementation Univariate Models  Token Finder  Attribute Length  Attribute Character Distribution Multivariate Models  Variable Presence or Absence  Likely Invariants

26 Univariate Models Token Finder  determine whether the values of a certain variable are drawn from a limited set of possible alternatives Attribute Length  detect instances that significantly deviate from the observed normal behavior Attribute Character Distribution  Normal: human-readable, small subset of the ASCII characters  Attack: binary data, repetitions of a single character  completely different character distribution can be observed

27 Multivariate Models Variable Presence or Absence  identify which variables are expected to be always present when accessing a basic block  absence of a variable with a higher weight results in a lower score Likely Invariants  integrated the Daikon engine in the libAnomaly framework  ability to extract invariants predicating on multiple variables

28 Evaluation 3.6GHz Pentium 4 with 2 GB of RAM running Linux Apache web server (version 2.2.4) and PHP version Attack-free data was generated by manually operating each web application running scripts simulating user activity.

29 Evaluation number of files that compose the application as an indication of its size generate three different datasets:  training the libAnomaly models  choosing suitable thresholds  clean dataset used to estimate the false positive rate of our system attack data was generated by manually performing known or novel attacks

30 Evaluation BloggIt  authentication bypass vulnerability  a novel file injection vulnerability PunBB  file injection attack Scarf  authentication bypass attack SimpleCms  authentication bypass attack WebCalendar  file inclusion attack  cannot be exploited to execute arbitrary code

31 Size: number of requests in data set Coverage: number of lines have been executed at least once during training Detection Effectiveness

32 Detection Overhead instrumentation overhead  time is spent to analyze and instrument the compiled code detection overhead  the analyzer has to determine whether the current state is anomalous

33 Detection Overhead number of state variables in each basic block number of basic blocks in serving page

34 Detection Overhead a set of test programs  defines a certain number of variables  executes a well-defined number of basic blocks The overhead grows linearly as the number of executed basic blocks increases.

35 Related Work analyzing the requests and replies exchanged between clients and servers the contextualization of intrusion detection The combination of contextualization techniques with the detection of anomalous system calls based on the analysis of their parameters was proposed in likely invariants as a way to characterize anomalous states

36 Conclusion Attacks that cannot always be detected by observing the application from the outside Swaddler is the first that models the values of session variables in association with critical execution points in a web application Any insecure state usually corresponds to an anomalous state Future work  other parts of the internal state  optimizations