Λ λ Language Based Security TAJ: Effective Taint Analysis of Web Applications PLDI 2009 Omer Tripp IBM Software Group Marco Pistoia IBM.

Slides:



Advertisements
Similar presentations
Runtime Prevention & Recovery Protect existing applications Advantages: Prevents vulnerabilities from doing harm Safe mode for Web application execution.
Advertisements

Webgoat.
R O O T S Field-Sensitive Points-to-Analysis Eda GÜNGÖR
ASSUMPTION HIERARCHY FOR A CHA CALL GRAPH CONSTRUCTION ALGORITHM JASON SAWIN & ATANAS ROUNTEV.
Hands-on SQL Injection Attack and Defense HI-TEC July 21, 2013.
Context-Sensitive Interprocedural Points-to Analysis in the Presence of Function Pointers Presentation by Patrick Kaleem Justin.
When Role Models Have Flaws: Static Validation of Enterprise Security Policies Marco Pistoia IBM T. J. Watson Research Center Hawthorne, New York
Don’t get Stung (An introduction to the OWASP Top Ten Project) Barry Dorrans Microsoft Information Security Tools NEW AND IMPROVED!
SEC835 OWASP Top Ten Project.
Type-based Taint Analysis for Java Web Applications Wei Huang, Yao Dong and Ana Milanova Rensselaer Polytechnic Institute 1.
Parameterized Object Sensitivity for Points-to Analysis for Java Presented By: - Anand Bahety Dan Bucatanschi.
Omer Tripp November 9 th, 2009 Static Analysis for Security A Case Study in the Automation of Code Auditing.
It’s always better live. MSDN Events Security Best Practices Part 2 of 2 Reducing Vulnerabilities using Visual Studio 2008.
Information Networking Security and Assurance Lab National Chung Cheng University The Ten Most Critical Web Application Security Vulnerabilities Ryan J.W.
It’s always better live. MSDN Events Securing Web Applications Part 1 of 2 Understanding Threats and Attacks.
Advanced Security Center Overview Northern Illinois University.
Information Networking Security and Assurance Lab National Chung Cheng University 1 Top Vulnerabilities in Web Applications (I) Unvalidated Input:  Information.
Scaling CFL-Reachability-Based Points- To Analysis Using Context-Sensitive Must-Not-Alias Analysis Guoqing Xu, Atanas Rountev, Manu Sridharan Ohio State.
1 Refinement-Based Context-Sensitive Points-To Analysis for Java Manu Sridharan, Rastislav Bodík UC Berkeley PLDI 2006.
Aaron Blankstein and Michael J. Freedman Princeton University Tuan Tran.
1 ES 314 Advanced Programming Lec 2 Sept 3 Goals: Complete the discussion of problem Review of C++ Object-oriented design Arrays and pointers.
“Today over 70% of attacks against a company’s network come at the ‘Application Layer’ not the Network or System layer.” - Gartner Is Your Web Application.
TAJ: Effective Taint Analysis of Web Applications PLDI 2009 Omer Tripp, Marco Pistoia, Stephen J. Fink, Manu Sridharan, Omri Weisman.
Solving Real-World Problems with an Enterprise Security API (ESAPI) Chris Schmidt ESAPI Project Manager ESAPI4JS Project Owner Application Security Engineer.
Software Security Course Course Outline Course Overview Introduction to Software Security Common Attacks and Vulnerabilities Overview of Security.
Security Scanning OWASP Education Nishi Kumar Computer based training
By: Razieh Rezaei Saleh.  Security Evaluation The examination of a system to determine its degree of compliance with a stated security model, security.
Evolving Threats. Application Security - Understanding the Problem DesktopTransportNetworkWeb Applications Antivirus Protection Encryption (SSL) Firewalls.
Secure Software Development Mini Zeng University of Alabama in Huntsville 1.
Workshop 3 Web Application Security Li Weichao March
OWASP Zed Attack Proxy Project Lead
Testing Tools. Categories of testing tools Black box testing, or functional testing Testing performed via GUI. The tool helps in emulating end-user actions.
TAJ: Effective Taint Analysis of Web Applications
A Framework for Automated Web Application Security Evaluation
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.
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University STATIC ANALYSES FOR JAVA IN THE PRESENCE OF DISTRIBUTED COMPONENTS AND.
Copyright 2007 © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Saving the World Wide Web from Vulnerable JavaScript International Symposium on Software Testing and Analysis (ISSTA 2011) Omer Tripp IBM Software Group.
CSC-682 Cryptography & Computer Security Sound and Precise Analysis of Web Applications for Injection Vulnerabilities Pompi Rotaru Based on an article.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Playing Safely in the Cloud Marie Greenberg, CISSP, IAM, IEM Information Security Manager Virginia State Corporation Commission.
Web Applications Testing By Jamie Rougvie Supported by.
Building Secure Web Applications With ASP.Net MVC.
OWASP OWASP top 10 - Agenda  Background  Risk based  Top 10 items 1 – 6  Live demo  Top 10 items 7 – 10  OWASP resources.
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University Merging Equivalent Contexts for Scalable Heap-cloning-based Points-to.
Pointer Analysis Survey. Rupesh Nasre. Aug 24, 2007.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 9 1COMP9321, 15s2, Week.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
© 2011 IBM Corporation Hybrid Analysis for JavaScript Security Assessment Omer Tripp Omri Weisman Salvatore Guarnieri IBM Software Group Sep 2011.
Java Programming: Advanced Topics 1 Building Web Applications Chapter 13.
Saner: Composing Static and Dynamic Analysis to Validate Sanitization in Web Applications Davide Balzarotti, Marco Cova, Vika Felmetsger, Nenad Jovanovic,
CFUNITED – The premier ColdFusion conference ColdFusion Application Security The Top Ten Most Critical Web Application Security Vulnerabilities.
2006 Adobe Systems Incorporated. All Rights Reserved. ColdFusion Application Security Adam Wayne Lehman ColdFusion Specialist Adobe Systems, Inc.
SECURE DEVELOPMENT. SEI CERT TOP 10 SECURE CODING PRACTICES Validate input Use strict compiler settings and resolve warnings Architect and design for.
INFORMATION-FLOW ANALYSIS OF ANDROID APPLICATIONS IN DROIDSAFE JARED YOUNG.
Web Application Vulnerabilities
Web Application Vulnerabilities, Detection Mechanisms, and Defenses
Finding and Fighting the Causes of Insecure Applications
Playing Safely in the Cloud
امنیت نرم‌افزارهای وب تقديم به پيشگاه مقدس امام عصر (عج) عباس نادری
Playing Safely in the Cloud
Demand-Driven Context-Sensitive Alias Analysis for Java
Finding and Fighting the Causes of Insecure Applications
WWW安全 國立暨南國際大學 資訊管理學系 陳彥錚.
Presentation transcript:

λ λ Language Based Security TAJ: Effective Taint Analysis of Web Applications PLDI 2009 Omer Tripp IBM Software Group Marco Pistoia IBM T. J. Watson Research Center Stephen Fink IBM T.J. Watson Research Center Manu Sridharan IBM T.J. Watson Research Center Omri Weisman IBM Software Group

LaBaSec λ λ PLDI OWASP * Top Ten Security Vulnerabilities 1.Cross-site scripting (XSS) 2.Injection flaws 3.Malicious file executions 4.Insecure direct object reference 5.Cross site request forgery (CSRF) 6.Information leakage and improper error handling 7.Broken authentication and improper session management 8.Unsecure cryptographic storage 9.Unsecure communications 10.Failure to restrict URL accesses 1.Cross-site scripting (XSS) 2.Injection flaws 3.Malicious file executions 4.Insecure direct object reference 5.Cross site request forgery (CSRF) 6.Information leakage and improper error handling 7.Broken authentication and improper session management 8.Unsecure cryptographic storage 9.Unsecure communications 10.Failure to restrict URL accesses * Open Web Application Security Project (OWASP):

LaBaSec λ λ PLDI Existing Static-Analysis Solutions Type systems:  Complex, conservative, require code annotations Classic slicing:  Has not been shown to scale to large applications while maintaining sufficient accuracy

LaBaSec λ λ PLDI Contributions of TAJ Hybrid thin slicing Sound, effective modeling of Web applications Bounded-analysis techniques Implementation, productization* and extensive evaluation * IBM Rational AppScan:

LaBaSec λ λ PLDI Motivating Example * * Inspired by Refl1 in SecuriBench Micro Taint Flow #1

LaBaSec λ λ PLDI Motivating Example * Sanitizer * Inspired by Refl1 in SecuriBench Micro Taint Flow #2

LaBaSec λ λ PLDI Motivating Example * * Inspired by Refl1 in SecuriBench Micro Non-tainted Taint Flow #3

LaBaSec λ λ PLDI Motivating Example * * Inspired by Refl1 in SecuriBench Micro Reflection

LaBaSec λ λ PLDI Motivating Example * * Inspired by Refl1 in SecuriBench Micro Different Map Keys

LaBaSec λ λ PLDI Motivating Example * * Inspired by Refl1 in SecuriBench Micro Object Fields

LaBaSec λ λ PLDI Outline of TAJ Algorithm consists of 2 stages: 1. Global pointer analysis 2. Slicing based on resulting call graph Rich set of models Effective reports Efficient behavior under restricted budget

LaBaSec λ λ PLDI Dimensions of Precision Pointer analysis is a variant of Andersen’s analysis Custom context-sensitivity policy: Unlimited-depth object sensitivity for Java collections (up to recursion) One level of call-string context for factory methods One level of call-string context for taint APIs One-level receiver-object context-sensitivity as default Analysis is field sensitive Analysis is intraprocedurally flow sensitive and interprocedurally flow insensitive (accounting for multithreaded code)

LaBaSec λ λ PLDI Hybrid System Dependence Graph st 4 l2l2 l2l2 l2l2 l2l2 l4l4 l4l4 st 2 st 1 l5l5 l5l5 l3l3 l3l3 l1l1 l1l1 st 3 st 5 c3c3 c3c3 c4c4 c4c4 sk 1 r3r3 r3r3 r7r7 r7r7 r8r8 r8r8 r4r4 r4r4 c2c2 c2c2 s1s1 s1s1 s2s2 s2s2 r2r2 r2r2 c1c1 c1c1 c5c5 c5c5 r5r5 r5r5 r1r1 r1r1 sk 2 st i Store statement lili lili Load statement sk i Sink-dispatch statement Hybrid SDG Slice in the no-heap SDG Store-to-load direct edge Load-to-store or load- to-sink summary edge No-heap SDG edge cici cici Call statement riri riri Return statement sisi sisi Other statement Computed based on preliminary pointer analysis Computed using graph reachability over a no-heap SDG

LaBaSec λ λ PLDI Modeling Web Applications Taint Carriers String StringBuilder StringBuffer Reflection Native Methods Map Keys JSP Struts MVC ExceptionsEJB Internal i1 i1.s map.put("key1", taint); nontaint = map.get("key2"); map.put("key1", taint); nontaint = map.get("key2"); ConcreteActionForm caf = (ConcreteActionForm) af DynaActionForm daf = (DynaActionForm) af ENTERPRISE BEAN DEPLOYMENT DESCRIPTOR Bean1Bean Bean1Home Bean1 Bean1Bean Stateless Bean1 ejb/Bean2 Session Bean2Home Bean2 Bean2Bean ENTERPRISE BEAN DEPLOYMENT DESCRIPTOR Bean1Bean Bean1Home Bean1 Bean1Bean Stateless Bean1 ejb/Bean2 Session Bean2Home Bean2 Bean2Bean Bean1Bean.m1() Bean2.m2() Bean2Bean.m2() Class.forName Method.invoke Thread.start AccessController. doPrivileged Thread.start AccessController. doPrivileged

LaBaSec λ λ PLDI Eliminating Redundant Flows Flows are equivalent iff Parts under application code coincide Sinks corresponding to same issues type Dramatically improves user experience (on JBoard, x25 less reports) Sound, minimal with respect to remediation n2n2 n2n2 n9n9 n9n9 n8n8 n8n8 n4n4 n4n4 n3n3 n3n3 n1n1 n1n1 n 11 n7n7 n7n7 n6n6 n6n6 n5n5 n5n5 n 10 Application Library Sinks with same issue type

LaBaSec λ λ PLDI Priority-driven Call-graph Construction Priority queue used to govern call-graph growth Sources are assigned priority 0 (most important) Recursively, for each “neighbor” t of node n: priority(t) = min{(priority(n) + 1), priority(t)} Propagate priorities to fixed point “Locality-of-taint” principle

LaBaSec λ λ PLDI Experimental Setup Five variants assessed: 1. Context sensitive (CS) 2. Context insensitive (CI) 3. Unbounded hybrid (i.e., running to completion) 4. Prioritized hybrid (i.e., call graph bounded, priority-driven scheme) 5. Fully optimized hybrid (i.e., prioritized, “long” flows eliminated, taint depth restricted, slice size bounded) All implemented on top of WALA * * IBM Watson Libraries for Analysis:

LaBaSec λ λ PLDI Experimental Results – Accuracy X X X X X

LaBaSec λ λ PLDI Experimental Results – Performance

LaBaSec λ λ PLDI Experimental Results – Performance

LaBaSec λ λ PLDI Conclusion Effective solution for taint analysis of Web applications based on pointer analysis and hybrid thin slicing Efficient strategies for analysis under limited budget General models for frameworks and other programming constructs Thorough evaluation and productization

LaBaSec λ λ PLDI Future Work Detailed comparison of demand-driven and priority-driven scheme String analysis More languages Coverage of more attack vectors

λ λ Language Based Security Thank You!