1 MDV, April 2010 Some Modeling Challenges when Testing Rich Internet Applications for Security Kamara Benjamin, Gregor v. Bochmann Guy-Vincent Jourdan,

Slides:



Advertisements
Similar presentations
Pulan Yu School of Informatics Indiana University Bloomington Web service based Varuna.Net.
Advertisements

Impossibility of Distributed Consensus with One Faulty Process
Lecture 8: Three-Level Architectures CS 344R: Robotics Benjamin Kuipers.
Interception of User’s Interests on the Web Michal Barla Supervisor: prof. Mária Bieliková.
Robot Sensor Networks. Introduction For the current sensor network the topography and stability of the environment is uncertain and of course time is.
10 Software Engineering Foundations of Computer Science ã Cengage Learning.
Interface-based design Philippe Giabbanelli CMPT 894 – Spring 2008.
Best-First Search: Agendas
© Janice Regan, CMPT 102, Sept CMPT 102 Introduction to Scientific Computer Programming The software development method algorithms.
Web 2.0 security Kushal Karanjkar Under guidance of Prof. Richard Sinn.
Secure Shell – SSH Tam Ngo Steve Licking cs265. Overview Introduction Brief History and Background of SSH Differences between SSH-1 and SSH- 2 Brief Overview.
Do We Really Need Rich-Interface Technologies? Yifan Zhang
Database Replication techniques: a Three Parameter Classification Authors : Database Replication techniques: a Three Parameter Classification Authors :
1 Chapter 10 Query Processing: The Basics. 2 External Sorting Sorting is used in implementing many relational operations Problem: –Relations are typically.
SECTIONS 21.4 – 21.5 Sanuja Dabade & Eilbroun Benjamin CS 257 – Dr. TY Lin INFORMATION INTEGRATION.
Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Lecture 17: Topological Sort Algorithm.
© 2009 Research In Motion Limited Methods of application development for mobile devices.
Interpret Application Specifications
1 Query Processing: The Basics Chapter Topics How does DBMS compute the result of a SQL queries? The most often executed operations: –Sort –Projection,
Test coverage Tor Stålhane. What is test coverage Let c denote the unit type that is considered – e.g. requirements or statements. We then have C c =
Client/Server Architectures
RIA Introduce Comparison among several technology.
Lecture 7 Page 1 CS 236 Online Password Management Limit login attempts Encrypt your passwords Protecting the password file Forgotten passwords Generating.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
TEMPLATE DESIGN © Efficient Crawling of Complex Rich Internet Applications Ali Moosavi, Salman Hooshmand, Gregor v. Bochmann,
 2008 Pearson Education, Inc. All rights reserved Ajax-Enabled Rich Internet Applications.
Software Security Research Group (SSRG), University of Ottawa in collaboration with IBM Software Security Research Group (SSRG), University of Ottawa In.
Solving Some Modeling Challenges when Testing Rich Internet Applications for Security Software Security Research Group (SSRG), University of Ottawa In.
TEMPLATE DESIGN © Non-URL-Based Crawling strategy :  In a RIA one URL corresponds to many states of DOM. Unlike traditional.
A summary of our activities about WSI Philippe Giabbanelli CMPT 894 – Spring 2008.
CMSC 345 Fall 2000 Unit Testing. The testing process.
M i SMob i S Mob i Store - Mobile i nternet File Storage Platform Chetna Kaur.
Software Security Research Group (SSRG), University of Ottawa in collaboration with IBM Software Security Research Group (SSRG), University of Ottawa In.
Lecture Set 5 Control Structures Part D - Repetition with Loops.
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 ITGN 235: Principles of Networking ITGN 225: Networking.
What are the main differences and commonalities between the IS and DA systems? How information is transferred between tasks: (i) IS it may be often achieved.
XRules An XML Business Rules Language Introduction Copyright © Waleed Abdulla All rights reserved. August 2004.
Adobe Flex 2.0 By Axel Jensen. Table of Contents Evolution of Computer Applications Advantages of Rich Internet Applications (RIA) Different RIA Technologies.
Computer Emergency Notification System (CENS)
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
Password Mistyping in Two-Factor Authenticated Key Exchange Vladimir KolesnikovCharles Rackoff Bell LabsU. Toronto ICALP 2008.
Building RIA Consumer Shopping Experiences (Real-World Flex Seminar) Fumi Matsumoto, Co-founder and CTO Allurent
Modeling and Simulation Discrete-Event Simulation
EEL 5937 Agent models. EEL 5937 Multi Agent Systems Lecture 4, Jan 16, 2003 Lotzi Bölöni.
Distributed System Concepts and Architectures 2.3 Services Fall 2011 Student: Fan Bai
Distributed Information Systems. Motivation ● To understand the problems that Web services try to solve it is helpful to understand how distributed information.
TEMPLATE DESIGN © Non-URL-Based Crawling strategy :  In a RIA one URL corresponds to many states of DOM. Unlike traditional.
Securing Passwords Against Dictionary Attacks Presented By Chad Frommeyer.
Mantid Stakeholder Review Nick Draper 01/11/2007.
Crawling Rich Internet Applications: The State of the Art Software Security Research Group (SSRG) University of Ottawa In collaboration with IBM Suryakant.
TEMPLATE DESIGN © Non-URL-Based Crawling strategy :  In a RIA one URL corresponds to many states of DOM. Unlike traditional.
Chapter 10 Algorithmic Thinking. Learning Objectives Explain similarities and differences among algorithms, programs, and heuristic solutions List the.
Chapter 21 Asynchronous Network Computing with Process Failures By Sindhu Karthikeyan.
Meeting Scheduling System Capstone Project - Team#5 Fall2007.
M1G Introduction to Programming 2 2. Creating Classes: Game and Player.
TEMPLATE DESIGN © Crawling is the process of automatically exploring a web application to discover the states of the application.
Chapter 10 The Basics of Query Processing. Copyright © 2005 Pearson Addison-Wesley. All rights reserved External Sorting Sorting is used in implementing.
Fundamentals of Fault-Tolerant Distributed Computing In Asynchronous Environments Paper by Felix C. Gartner Graeme Coakley COEN 317 November 23, 2003.
Open Solutions for a Changing World™ Eddy Kleinjan Copyright 2005, Data Access WordwideNew Techniques for Building Web Applications June 6-9, 2005 Key.
Software Security Research Group (SSRG),
The Post Windows Operating System
Introduction to.
V-Shaped SDLC Model Lecture-6.
Whether you decide to use hidden frames or XMLHttp, there are several things you'll need to consider when building an Ajax application. Expanding the role.
RIA for Business What‘s next? 19/11/18
Test coverage Tor Stålhane.
Data Warehousing Concepts
External Sorting Sorting is used in implementing many relational operations Problem: Relations are typically large, do not fit in main memory So cannot.
CS410 – Software Engineering Lecture #11: Testing II
Presentation transcript:

1 MDV, April 2010 Some Modeling Challenges when Testing Rich Internet Applications for Security Kamara Benjamin, Gregor v. Bochmann Guy-Vincent Jourdan, Vio Onut

2 Introduction Web-based applications are very commons, more are designed and deployed every day Their architecture, their exposure, the components involved, the ease of development make web- application frequent targets for attacks One tool in the security toolbox is the web app security scanner Some Modeling Challenges when Testing Rich Internet Applications for Security

3 Introduction Rich Internet Applications:  Client code modifies the DOM  Asynchronous communication between client and server  Variety of client side component (JavaScript, Silverlight, Adobe Flex...) running concurrently  We have lost the ability to “crawl” these applications. Some Modeling Challenges when Testing Rich Internet Applications for Security

4 Introduction Without crawl, we cannot  Index a site  Perform some automatic tests  Scan for security, accessibility, usability....  We need to create a new model suitable for RIAs, that can restore our ability to crawl Web Applications Some Modeling Challenges when Testing Rich Internet Applications for Security

5 Background and Assumptions The RIAs that we are analysing:  Actions are repeatable: we can “reset” the application so that sending the same input in the same order and at the same time will produce the same output.  The only source of non determinism is concurrency.  Application are “user-input” free: every interaction between the application and the user can be modeled as a choice between a known finite set of possibilities. Some Modeling Challenges when Testing Rich Internet Applications for Security

6 Background and Assumptions The model that we are building:  Eventually uncovers all the client states  Contains the events that lead from one stare to another  Is built deterministically (repeatably)  Is built “efficiently”: interesting information is found early Some Modeling Challenges when Testing Rich Internet Applications for Security

7 Background and Assumptions Comparing states:  During a crawl, we will repeatedly uncover the “same” state  Often, “same state” does not mean equality  Depending on the goal of the crawl, the notion of state equality may be different  We need a flexible state equivalence function on which our crawling algorithm relies. Some Modeling Challenges when Testing Rich Internet Applications for Security

8 Existing Ajax Crawling Solutions There are some existing RIA crawlers (most if not all of them being Ajax crawlers), but they have shortcomings for our goals: Incomplete models:  Typically just attempt one ordering of concurrent events  Fail to take into account the intermediate states reached by the client after sending an asynchronous message and before receiving the corresponding response. Some Modeling Challenges when Testing Rich Internet Applications for Security

9 Existing Ajax Crawling Solutions There are some existing RIA crawlers (most of not all of them being Ajax crawlers), but they have shortcomings for our goals: Efficiency strategy:  Crawls can be very long/infinite  We must define what is “interesting” in the model and attempt to uncover it first Some Modeling Challenges when Testing Rich Internet Applications for Security

10 Existing Ajax Crawling Solutions There are some existing RIA crawlers (most of not all of them being Ajax crawlers), but they have shortcomings for our goals: State equivalence:  A realistic crawler cannot rely on equality for deciding if a state has been visited before  Tools that integrate this concept seem to use distances instead of equivalence functions  Tools do not seem to separate clearly the “state equivalence” decision from the crawling algorithm (perhaps Crawljax does it, ICST2010) Some Modeling Challenges when Testing Rich Internet Applications for Security

11 A Strategy (or a direction for one) One key goal of the crawling algorithm is to converge towards a complete model, while finding the “good parts” as early as possible in the process. To do so, it is necessary to state what reasonable assumptions can be made regarding what information is more interesting in the model. Obviously, these are just reasonable assumptions, and counterexamples will be easy to find. We have identified two assumptions that seem reasonable and that we can deal with Some Modeling Challenges when Testing Rich Internet Applications for Security

12 A Strategy (or a direction for one) 1. Assumption one: if we have already explored a client state by executing all of its concurrent events at least once, then it is more interesting to explore a state that we haven’t explored at all yet rather than exploring the first state further  A given state with n concurrent events could lead to n! ways of executing the events  We will need to explore the state completely eventually, but if we know of another state which is less explored, then the latter gets priority Some Modeling Challenges when Testing Rich Internet Applications for Security

13 A Strategy (or a direction for one) 2. Assumption two: if we have a state s1 in which we have already executed all the events in a few different orders, executing a subset of the events that has not been executed yet is more interesting than executing a subset of the events that was already executed but in a different order.  The emphasis is on discovering new states, not confirming new transitions between known states Some Modeling Challenges when Testing Rich Internet Applications for Security

14 A Strategy (or a direction for one) A crawling strategy compatible with assumption one is easy to define: always give priority to states than have less known information.  An adapted in-depth first strategy will succeed  Set a limit to the depth in order to avoid getting stuck in infinite looping paths Some Modeling Challenges when Testing Rich Internet Applications for Security

15 A Strategy (or a direction for one) A crawling strategy compatible with assumption two is trickier. Assume that a state has n concurrent events. It can be seen as a hypercube: Some Modeling Challenges when Testing Rich Internet Applications for Security

16 A Strategy (or a direction for one) In order to crawl w.r.t. assumption two, we need to find the 2 n states as early as possible in the n! paths Some Modeling Challenges when Testing Rich Internet Applications for Security

17 A Strategy (or a direction for one) 1. e1;e2;e3;e42. e2;e3;e4;e13. e3;e4;e1;e2 4. e4;e1;e2;e35. e1;e3;e4;e26. e2;e4;e1;e3 7. e3;e1;e2;e48. e4;e2;e3;e19. e1;e4;e2;e3 10. e2;e1;e3;e411. e3;e2;e4;e1 12. e4;e3;e1;e2 13. e1;e2;e4;e314. e2;e3;e1;e4 15. e3;e4;e2;e1 16. e4;e1;e3;e2 17. e1;e3;e2;e418. e2;e4;e3;e1 19. e3;e1;e4;e2 20. e4;e2;e1;e321. e1;e4;e3;e2 22. e2;e1;e4;e3 23. e3;e2;e1;e4 24. e4;e3;e2;e1 Some Modeling Challenges when Testing Rich Internet Applications for Security

18 A Strategy (or a direction for one) This is a minimal chain decomposition of the hypercube. In can be done in w chains (and this is the best), where w is the width of the order (Dilworth, 1950) In the case of an hypercube of dimension n, the width is Choose(Ceil(n/2),n). Thus we must enumerate n! chains, the first Choose(Ceil(n/2),n) of which go through the 2 n states. Some Modeling Challenges when Testing Rich Internet Applications for Security

19 A Strategy (or a direction for one) We can use a canonical symmetric chain decomposition (CSCD) of a hypercube for this. Based on de Bruijn, Tengbergen, and Kruyswijk: The CSCD of a hypercube of size 0 contains the single chain (Ø). For n ≥ 1, the CSCD of a hypercube of dimension n contains precisely the following chains:  For every chain A 0 0, the CSCD of a hypercube of dimension n contains the chains: A 0 < … < A k < A k U {n} and A 0 U {n} < … < A k-1 U {n}.  For every chain A 0 of size 1 in the CSCD of a hypercube of dimension n - 1, the CSCD of a hypercube of dimension n contains the chain: A 0 < A 0 U {n} Some Modeling Challenges when Testing Rich Internet Applications for Security

20 A Strategy (or a direction for one) {}<{ e 1 }<{ e 1, e 2 }<{ e 1, e 2, e 3 }<{ e 1, e 2, e 3, e 4 } { e 4 }<{ e 1, e 4 }<{ e 1, e 2, e 4 } { e 3 }<{ e 1, e 3 }<{ e 1, e 3, e 4 } { e 3, e 4 } { e 2 }<{ e 2, e 3 }<{ e 2, e 3, e 4 } { e 2, e 4 } Some Modeling Challenges when Testing Rich Internet Applications for Security

21 Prototype Demo Some Modeling Challenges when Testing Rich Internet Applications for Security

22 Prototype Demo Some Modeling Challenges when Testing Rich Internet Applications for Security

23 Difficulties Ahead Of Us Many problems are still ahead, including Statelessness of Server Data Input Values State equivalence definition (fast, accurate, compatible with crawling at least) Modelling for security?... Some Modeling Challenges when Testing Rich Internet Applications for Security

24 Next Steps Actual implementation of a complete crawling strategy that satisfies assumption one Extension of our hypercube coverage strategy to finish up the n! paths Effective strategy for other behaviour, any combination of  Appearing events  Disappearing events  Unexpected state merge  Failed expected state merge Some Modeling Challenges when Testing Rich Internet Applications for Security