residue objects a challenge to web browser security
play

Residue Objects: A Challenge to Web Browser Security Robert - PowerPoint PPT Presentation

Residue Objects: A Challenge to Web Browser Security Robert Rosolek University of Warsaw Agenda Introduction Background for object management in Internet Explorer Testing and studying residue objects Conclusions and Future Work Part 1


  1. Residue Objects: A Challenge to Web Browser Security Robert Rosolek University of Warsaw

  2. Agenda Introduction Background for object management in Internet Explorer Testing and studying residue objects Conclusions and Future Work

  3. Part 1 Part 2 Part 3 Part 4 Introduction

  4. Introduction Managing the lifetimes of objects in memory nontrivial task in complex systems especially tricky for browsers page may navigate away

  5. Introduction Correct navigation semantics for page being navigated away: the page is 'gone' all it's objects disappear objects no longer usable Crucial for security.

  6. Introduction So can we just destroy all objects of the page that is navigated away?

  7. Introduction

  8. Introduction Dilemma → Object garbage collected dangling references, memory corruption → Object not collected invalid object residing in memory

  9. Residue objects Residue object - the object in the old page that still resides in the memory after the navigation

  10. Visual Spoofing

  11. Involuntary navigation

  12. Cross-domain access same-origin policy difficulties with secure implementation hack opportunities

  13. Memory corruption dangling references possibility of changing the control flow

  14. Protection object invalidation seemingly simple mechanism Object is_valid : bool . . .

  15. Bugs

  16. Exploit example

  17. Bugs Various logic errors: residue object object not marke d dead visible 'dead' objects premature release of reference

  18. Main questions Reasons for implementation problems small public attention

  19. Part 1 Part 2 Part 3 Part 4 Background for object management in Internet Explorer

  20. ActiveX objects COM framework AddRef, Release – refcounting properties sub-objects

  21. ActiveX objects HTML elements Javascript variables HTML and Javascript engines Hosting ActiveX objects: <object> tag in HTML new ActiveXObject(id) in Javascript nesting of HTML and JavaScript engines

  22. Window and Document Document – HTML Document corresponding to HTML file Window – tab, frame, iframe, dialog box CWindow and CDocument COM classes Window 1 Window 1 navigation Document 2 Document 1

  23. CWinProxy Document – same-domain accessibility Window - can be referenced from a different domain Proxy object necessary to comply with same-origin policy CWinProxy CWindow external ref

  24. Part 1 Part 2 Part 3 Part 4 Testing and studying Residue Objects

  25. Tactic for generating Residue Objects

  26. Enumerative Approach Various: inner objects documents, windows, methods etc.

  27. Enumerative Approach Various: inner objects ways of object hosting

  28. Enumerative Approach Various: Navigate window NavWin to page.html: inner objects ways of object hosting open(“page.html”,”NavWin”) NavWin.location = “page.html” ways of navigation NavWin.Navigate(“page.html”)

  29. Analysis Augmentation of browser code by logging important events about CWindow / CWinProxy / CDocument: construction destruction AddRef Release validation invalidation

  30. Analysis call stack for every event to identify caller filtering out matching AddRef and Release events

  31. Analysis tool Object chart objects in the memory after navigation reference owners

  32. Pitfall 1 Invalidated Invisible CWindow object of inner window is invalidated inner window visible when created by createPopup() ref = innerWindow

  33. Pitfall 1 Invalidated Invisible

  34. Pitfall 1 Invalidated Invisible

  35. Pitfall 1 Invalidated Invisible IE 8.0.6001 fixed in IE 9

  36. Pitfall 2 Confusion due to polymorphism CWindow object of inner window is invalidated CFuncPointer object of innerWindow.setTimeout points to not invalidated CWinProxy delayed script can be run after navigation ref = innerWindow.setTimeout Method of the window

  37. Pitfall 2 Confusion due to polymorphism CWindow object of inner window is invalidated CFuncPointer object of innerWindow.setTimeout points to not invalidated CWinProxy delayed script can be run after navigation fixed in IE 8.0.6001 ref = innerWindow.setTimeout Method of the acess denied error window

  38. Pitfall 3 Cross-engine invalidation inner window hosted in different HTML engine CWindow object of inner window not invalidated ref = innerWindow different HTML engine

  39. Pitfall 3 Cross-engine invalidation inner window hosted in different HTML engine CWindow object of inner window not invalidated ref = innerWindow different HTML engine still an issue in IE9

  40. Pitfall 4 Erroneous refcounting one refcount is lost navigation of persistent window removes nav window dangling reference corruption of EIP register heap spray attack possible ref = NavWin.setTimeout Method of the window

  41. Pitfall 4 Erroneous refcounting one refcount is lost navigation of persistent window removes nav window dangling reference corruption of EIP register heap spray attack possible ref = NavWin.setTimeout Method of the window Fixed by Microsoft in February 2009 security hot fix

  42. Pitfall 5 Partially destroyed data structures inside valid objects same scenario as in pitfall 3 a script in child window of inner window CWindow object is valid broken internal data structures memory violations

  43. Pitfall 5 Partially destroyed data structures inside valid objects same scenario as in pitfall 3 a script in child window of inner window CWindow object is valid broken internal data structures memory violations still an issue in IE 8

  44. Part 1 Part 2 Part 3 Part 4 Conclusions and Future Work

  45. Possible responses to the residue object problem automatic garbage collectors different processes - IE8 multi-proccess achitecture to render different windows - seperation of different web contents - prevents from direct overwriting of memory - objects can still be acessed through references in DCOM revision of DOM access policies and their implementation

  46. New generation of browsers OP from University of Illinois Gazelle from Microsoft Research focus on security multi-process architecture acess control policies formal methods (OP) OS principles in browser (Gazelle)

  47. Conclusions all browsers have to deal with residue objects problems need to be recognised as residue object problems and not individual bugs a lot of undiscovered bugs left

  48. Future work Other document types: - XML - Flash - Microsoft Silverlight Other browsers: - Firefox - Safari

  49. Thank you!

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend