analyzing information flow in jse s
play

Analyzing Information Flow in JSEs Nick Taylor David - PowerPoint PPT Presentation

Analyzing Information Flow in JSEs Nick Taylor David Erichsen Introduction: JavaScript Dynamic computer programming language Generally used by client


  1. Analyzing ¡Information ¡ Flow ¡in ¡JSE’s ¡ ¡ Nick ¡Taylor ¡ David ¡Erichsen ¡

  2. Introduction: ¡JavaScript ¡ � Dynamic ¡computer ¡programming ¡language ¡ � Generally ¡used ¡by ¡client ¡to ¡allow ¡scripts ¡to ¡interact ¡with ¡ users ¡ � Supported ¡by ¡all ¡major ¡browsers ¡ � Easy ¡to ¡code ¡in ¡for ¡inexperienced ¡developers ¡and ¡easy ¡to ¡ modify ¡by ¡others ¡ � Can ¡be ¡readily ¡ported ¡across ¡platforms ¡ � Useful ¡for ¡creating ¡frameworks ¡ ¡

  3. Introduction: ¡JSEs ¡ � JavaScript-­‑based ¡browser ¡extensions ¡(JSEs) ¡improve ¡ core ¡functionality ¡of ¡web ¡browsers ¡ � PDF ¡Readers ¡ � Flash ¡Players ¡ � File ¡Downloaders ¡ Greasemonkey ¡ � � Firebug ¡ NoScript ¡ �

  4. Are ¡JSE’s ¡Secure? ¡ � To ¡enable ¡more ¡elaborate ¡functionalities, ¡browsers ¡ execute ¡JSE’s ¡with ¡elevated ¡privileges ¡ � Malicious ¡JSEs ¡can ¡misuse ¡these ¡privileges ¡to ¡ compromise ¡confidentiality ¡and ¡integrity ¡ � Stealing ¡sensitive ¡data ¡ � Executing ¡arbitrary ¡code ¡on ¡host ¡system ¡ � Even ¡if ¡a ¡JSE ¡is ¡not ¡overtly ¡malicious, ¡vulnerabilities ¡in ¡ the ¡JSE ¡and ¡the ¡browser ¡may ¡allow ¡a ¡remote ¡attacker ¡ to ¡compromise ¡browser ¡security. ¡ ¡

  5. Evaluation ¡of ¡problem ¡ � The ¡problem ¡is ¡that ¡JSE’s ¡are ¡not ¡secure. ¡ ¡Thus ¡JSE’s ¡pose ¡a ¡threat ¡ to ¡browser ¡security. ¡ � Factors ¡that ¡add ¡to ¡the ¡problem ¡ � Inadequate ¡sandboxing ¡of ¡Javascript ¡in ¡a ¡JSE. ¡ Javascript ¡code ¡in ¡a ¡JSE ¡executes ¡with ¡the ¡privileges ¡of ¡the ¡web ¡ � browser ¡e.g ¡can ¡freely ¡access ¡sensitive ¡entities ¡such ¡as ¡the ¡cookie ¡store ¡ and ¡browsing ¡history ¡ � Browser ¡and ¡JSE ¡vulnerabilities ¡ � Even ¡if ¡a ¡JSE ¡is ¡not ¡malicious, ¡vulnerabilities ¡in ¡the ¡browser ¡and ¡in ¡JSEs ¡ may ¡allow ¡a ¡malicious ¡website ¡to ¡access ¡and ¡misuse ¡the ¡privileges ¡of ¡a ¡ JSE ¡

  6. Prior ¡Research ¡ � Tracked ¡information ¡flow ¡at ¡the ¡system ¡level ¡by ¡tracking ¡ information ¡flow ¡at ¡the ¡machine ¡instruction ¡level ¡ � Didn’t ¡allow ¡analysts ¡to ¡observe ¡flow ¡of ¡information ¡at ¡JavaScript ¡ objects ¡and ¡instructions ¡ � Restricted ¡to ¡memory ¡words ¡and ¡machine ¡instructions ¡ � Developed ¡techniques ¡to ¡identify ¡spyware ¡behavior ¡in ¡untrusted ¡ browser ¡extensions, ¡particularly ¡in ¡plugins ¡and ¡BHOs ¡(Browser ¡ Helper ¡Object), ¡which ¡are ¡distributed ¡as ¡binary ¡executable. ¡ ¡ � These ¡approaches ¡rely ¡on ¡whole-­‑system ¡information ¡flow ¡ tracking ¡and ¡on ¡monitoring ¡plugin/browser ¡interactions. ¡ ¡

  7. Solution ¡ � Security ¡Architecture ¡for ¡Web ¡Browsers ¡(Sabre) ¡ � A ¡system ¡that ¡uses ¡in-­‑browser ¡information-­‑flow ¡ tracking ¡to ¡analyze ¡JSEs ¡ � Associates ¡each ¡JavaScript ¡object ¡in-­‑memory ¡with ¡a ¡ label ¡that ¡determines ¡if ¡the ¡object ¡contains ¡sensitive ¡ information ¡ � Modifies ¡the ¡label ¡when ¡corresponding ¡object ¡is ¡ modified ¡by ¡JavaScript ¡code ¡(JSEs ¡and ¡Web ¡Apps) ¡ � Raises ¡alert ¡if ¡it ¡deems ¡object ¡containing ¡sensitive ¡ information ¡is ¡uses ¡in ¡unsafe ¡way ¡

  8. Sabre’s ¡Security ¡Goals ¡ � Detecting ¡confidentiality ¡violations ¡ � If ¡a ¡JSE ¡attempts ¡to ¡send ¡a ¡JavaScript ¡object ¡containing ¡ sensitive ¡data ¡over ¡a ¡network ¡or ¡write ¡to ¡a ¡file ¡ � Detecting ¡integrity ¡violations ¡ � If ¡a ¡JSE ¡attempts ¡to ¡execute ¡a ¡script ¡received ¡from ¡an ¡ untrusted ¡domain ¡with ¡elevated ¡privileges ¡

  9. Sabre’s ¡Techniques ¡ � Precisely ¡tracks ¡information ¡flows ¡across ¡different ¡ browser ¡subsystems, ¡including ¡DOM, ¡local ¡storage ¡ and ¡the ¡network ¡ � Is ¡able ¡to ¡declassify ¡or ¡endorse ¡information ¡flows ¡ � Handles ¡information ¡flows, ¡some ¡implicit ¡flows ¡and ¡ cross-­‑domain ¡flows ¡ SABRE ¡TRACKS ¡INFORMATION ¡FLOW ¡

  10. Monitor ¡All ¡JavaScript ¡ Execution ¡ � Includes ¡code ¡executed ¡by ¡web ¡applications, ¡JSEs ¡and ¡ all ¡other ¡JavaScript ¡that ¡comprises ¡the ¡browser ¡ � Guards ¡against: ¡ � Attackers ¡trying ¡to ¡hide ¡malicious ¡code ¡using ¡ JavaScript ¡in ¡multiple ¡browser ¡subsystems ¡ � Code ¡that ¡is ¡used ¡in ¡XUL ¡overlays ¡that ¡may ¡be ¡included ¡ into ¡browser ¡core ¡

  11. Ease ¡Action ¡Attribution ¡ � Sabre ¡identifies ¡an ¡information ¡flow ¡violation ¡by ¡a ¡ JSE ¡ � An ¡analyst ¡may ¡be ¡needed ¡to ¡determine ¡whether ¡the ¡ violation ¡is ¡an ¡attack ¡or ¡part ¡of ¡the ¡valid ¡behavior ¡of ¡ the ¡JSE ¡ à à ¡whitelist ¡ � Ex) ¡PwdHash ¡– ¡searches ¡and ¡modifies ¡passwords ¡entered ¡ on ¡pages ¡which ¡could ¡raise ¡a ¡violation ¡if ¡the ¡JSE ¡isn’t ¡ trusted ¡

  12. Track ¡Information ¡Flow ¡ Across ¡Browser ¡ Subsystems ¡ � JavaScript ¡code ¡in ¡a ¡browser ¡and ¡its ¡JSEs ¡interacts ¡ heavily ¡with ¡other ¡subsystems ¡ex) ¡DOM, ¡cookies, ¡ saved ¡passwords, ¡local ¡file ¡system ¡ � Must ¡monitor ¡all ¡information ¡flows ¡across ¡all ¡the ¡ subsystems ¡because ¡attackers ¡often ¡use ¡multiple ¡ subsystems ¡for ¡JSE ¡attacks ¡

  13. Implementation ¡of ¡ Sabre ¡ � Used ¡a ¡modified ¡version ¡of ¡SpiderMonkey ¡(a ¡JavaScript ¡ interpreter ¡in ¡Firefox) ¡to ¡track ¡information ¡flow ¡ � Altered ¡representation ¡of ¡JavaScript ¡objects ¡to ¡include ¡ security ¡labels ¡ � Improved ¡interpretation ¡of ¡JavaScript ¡byte ¡code ¡instructions ¡ to ¡modify ¡labels ¡ à à ¡propagate ¡info ¡flow ¡ � Modified ¡browser ¡subsystems ¡(DOM ¡and ¡XPCOM) ¡to ¡store ¡ and ¡propagate ¡security ¡labels ¡ � JavaScript ¡code ¡is ¡executed ¡by ¡interpreter ¡ � Identifies ¡source ¡of ¡JavaScript ¡byte ¡code ¡being ¡interpretted ¡

  14. Sources ¡& ¡Sinks ¡ � Sabre ¡detects ¡flows ¡from ¡sensitive ¡sources ¡(information) ¡to ¡low-­‑ sensitivity ¡sinks ¡which ¡includes ¡file ¡systems ¡and ¡networks. ¡ � In ¡addition ¡to ¡modifying ¡the ¡JS ¡interpreter ¡to ¡raising ¡an ¡alert ¡ when ¡a ¡sensitive ¡object ¡is ¡written ¡to ¡a ¡low-­‑sensitivity ¡sink, ¡Sabre ¡ also ¡modifies ¡the ¡browser’s ¡document ¡interface ¡to ¡raise ¡an ¡alert ¡ when ¡a ¡DOM ¡node ¡that ¡stores ¡sensitive ¡data ¡derived ¡from ¡a ¡JSE ¡is ¡ sent ¡over ¡the ¡network. ¡ � A ¡file ¡system ¡is ¡both ¡a ¡source ¡and ¡a ¡sink ¡ � Confidentiality-­‑violating ¡information-­‑flows ¡can ¡also ¡be ¡detected ¡ using ¡a ¡similar ¡set ¡of ¡low-­‑integrity ¡sources ¡and ¡high-­‑integrity ¡ sinks ¡

  15. Security ¡Labels ¡ � Associates ¡each ¡in-­‑memory ¡JS ¡object ¡with ¡a ¡pair ¡of ¡ security ¡labels ¡which ¡track ¡the ¡flow ¡of: ¡ � Sensitive ¡information ¡ � Low-­‑integrity ¡information ¡ ¡ � Each ¡label ¡stores: ¡ � Sensitivity ¡level-­‑ ¡does ¡it ¡store ¡sensitive ¡info? ¡ � Boolean ¡flag-­‑ ¡was ¡object ¡modified ¡by ¡JS ¡code ¡in ¡JSE ¡ � Names ¡of ¡JSEs ¡and ¡web ¡domains ¡that ¡have ¡been ¡ modified ¡by ¡object ¡

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