ucognito private browsing without tears
play

UCognito: Private Browsing without Tears Meng Xu, Yeongjin Yang, - PowerPoint PPT Presentation

UCognito: Private Browsing without Tears Meng Xu, Yeongjin Yang, Xinyu Xing, Taesoo Kim, Wenke Lee Georgia Institute of Technology 1 Private Browsing Mode Private Browsing Incognito Mode Guest Mode InPrivate Private Window 2 Private


  1. UCognito: Private Browsing without Tears Meng Xu, Yeongjin Yang, Xinyu Xing, Taesoo Kim, Wenke Lee Georgia Institute of Technology 1

  2. Private Browsing Mode Private Browsing Incognito Mode Guest Mode InPrivate Private Window 2

  3. Private Browsing Mode Private Browsing Questions: Incognito Mode Guest Mode • Same ? • Expected ? InPrivate • Implemented ? • Private ? Private Window 3

  4. Private Browsing Mode Private Browsing Questions: Incognito Mode Guest Mode • Same ? • Expected ? InPrivate • Implemented ? • Private ? Private Window 4

  5. Problem: Different Definitions of Private Browsing Use of persistent data in Chrome Firefox Opera Safari IE private browsing mode Incognito ✘ ✔ ✔ ✔ ✘ Download entries ✔ ✘ ✘ ✔ ✘ SSL self-signed certificate ✔ ✘ ✘ ✔ ✔ Add-on enabled by default 5

  6. Problem: Different Definitions of Private Browsing Use Store Category Incognito Guest Incognito Guest ✔ ✘ ✘ ✘ Browsing history ✘ ✘ ✘ ✘ Cookies ✘ ✘ ✘ ✘ Cache ✘ ✘ ✘ ✘ Local storage ✘ ✘ ✘ ✘ Flash storage ✔ ✘ ✘ ✘ Download entries ✔ ✘ ✘ ✘ Autofills ✔ ✘ ✔ ✘ Bookmarks ✔ ✘ ✘ ✘ Per-site zoom ✔ ✘ ✘ ✘ Per-site permission ✘ ✘ ✘ ✘ SSL self-signed cert ✔ ✔ ✔ ✔ SSL client cert ✔ ✘ ✔ ✘ Add-on storage 6

  7. Private Browsing Mode Private Browsing Questions: Incognito Mode Guest Mode • Same ? • Expected ? InPrivate • Implemented ? • Private ? Private Window 7

  8. 8

  9. Private Browsing Mode Private Browsing Questions: Incognito Mode Guest Mode • Same ? • Expected ? InPrivate • Implemented ? • Private ? Private Window 9

  10. Implementation is `mimicking` and ad-hoc 1 // @netwerk/cookie/nsCookieService.cpp 2 DBState *mDBState; 3 nsRefPtr<DBState> mDefaultDBState; // DB for normal mode 4 nsRefPtr<DBState> mPrivateDBState; // DB for private mode 5 6 // invoked when initializing session 7 void nsCookieService::InitDBStates() { 8 ... 9 mDefaultDBState = new DBState(); // DB for normal mode 10 mPrivateDBState = new DBState(); // DB for private mode 11 // default: normal mode 12 mDBState = mDefaultDBState; 13 ... 14 } 15 16 // invoked when storing cookies 17 void nsCookieService::SetCookieStringInternal() { 18 ... 19 // decide which cookie DB to use, depending on the mode 20 mDBState = aIsPrivate ? mPrivateDBState : mDefaultDBState; 21 ... 22 } 10

  11. Implementation is `mimicking` and ad-hoc 1 // @netwerk/cookie/nsCookieService.cpp 2 DBState *mDBState; 3 nsRefPtr<DBState> mDefaultDBState; // DB for normal mode 4 nsRefPtr<DBState> mPrivateDBState; // DB for private mode 5 6 // invoked when initializing session 7 void nsCookieService::InitDBStates() { 8 ... 9 mDefaultDBState = new DBState(); // DB for normal mode 10 mPrivateDBState = new DBState(); // DB for private mode 11 // default: normal mode 12 mDBState = mDefaultDBState; 13 ... 14 } 15 16 // invoked when storing cookies 17 void nsCookieService::SetCookieStringInternal() { 18 ... 19 // decide which cookie DB to use, depending on the mode 20 mDBState = aIsPrivate ? mPrivateDBState : mDefaultDBState; 21 ... 22 } 11

  12. Problem: Code complexity grows exponentially • How many duplications ? • cookie, history, cache, download entries, autofills, bookmarks, flash storage … • per-site permission, per-site zoom level, SSL certs … • html5 local storage, indexDB … 12

  13. Problem: Code complexity grows exponentially • How many duplications ? • cookie, history, cache, download entries, autofills, bookmarks, flash storage … • per-site permission, per-site zoom level, SSL certs … • html5 local storage, indexDB … X 3 !!! Normal mode Incognito mode Guest mode 13

  14. Problem: Lack of elegant support for add-ons 1 // 1. Detecting private browsing mode @MDN 2 Components.utils.import( 3 "resource://gre/modules/PrivateBrowsingUtils.jsm"); 4 if (!PrivateBrowsingUtils.isWindowPrivate(window)) { 5 ... 6 } 7 8 // 2. Detecting mode changes @MDN 9 function pbObserver() { /* clear private data */ } 10 var os = Components.classes["@mozilla.org/observer-service;1"] 11 .getService(Components.interfaces.nsIObserverService); 12 os.addObserver(pbObserver, "last-pb-context-exited", false); 14

  15. Private Browsing Mode Private Browsing Questions: Incognito Mode Guest Mode • Same ? • Expected ? InPrivate • Implemented ? • Private ? Private Window 15

  16. 16

  17. Per-site permission reveals browsing history Geolocation API Implemented Bug report Patched standard proposed in Chrome 5.0 51204 rev. 192540 Dec May Aug Apr 2008 2010 2010 2013 17

  18. PNaCl cache reveals browsing history • PNaCl translation cache reveals whether you have previously visited a website. • http://gonativeclient.appspot.com/demo/lua (demo) 18

  19. Problem: Not secure by default • How many places to instrument ? • cookie, history, cache, download entries, autofills, bookmarks, flash storage … ok, these are common • per-site permission, per-site zoom level, SSL certs … hmm, we can think of these 19

  20. Problem: Not secure by default • How many places to instrument ? • html5 local storage, indexDB … new features are coming in! • PNaCl, OCSPResponse … oh I forgot them! 20

  21. Uverifier: Testing Private Browsing Mode open(<file>, “w”) …… open(<file>, “r”) write(<file>, ……) …… …… read(<file>, ……) no delete(<file>) Traces Usage 21

  22. PNaCl cache explanation Normal mode Private mode open(<file>, “w”) …… open(<file>, “r”) write(<file>, ……) …… …… read(<file>, ……) no delete(<file>) Traces Usage <profile>/PnaclTranslationCache/index <profile>/PnaclTranslationCache/data_1 <profile>/PnaclTranslationCache/data_2 <profile>/PnaclTranslationCache/data_3 22

  23. UCognito: Decouple private mode implementation from browser codebase. Private Browsing Incognito Mode Guest Mode InPrivate Private Window 23

  24. Ⓤ UCognito: Decouple private mode implementation from browser codebase. UCognito UCognito Layer Mode 24

  25. Ⓤ UCognito: Decouple private mode implementation from browser codebase. Questions: UCognito • Same ? UCognito Layer • Expected ? Mode • Implemented ? • Private ? 25

  26. Ⓤ UCognito Architecture Browser 26

  27. Ⓤ Step 0: Specify Policies Browser …… Autofill Bookmarks Cookies Cache 27

  28. Ⓤ Step 0: Specify Policies Browser …… Autofill Bookmarks Cookies Cache 28

  29. Ⓤ Step 1: Starting UCognito Browser …… Autofill Bookmarks Cookies Cache …… Autofill Bookmarks Cookies Cache 29

  30. Ⓤ Step 2: Browsing …… Browser Autofill Bookmarks Cookies Cache …… Autofill Bookmarks Cookies Cache …… Autofill Bookmarks Cookies Cache 30

  31. Ⓤ Step 3: Cleaning …… Browser Autofill Bookmarks Cookies Cache …… Autofill Bookmarks Cookies Cache …… Autofill Bookmarks Cookies Cache 31

  32. UCognito Sandbox • Goal: redirecting all path to a contained location • e.g., /home/user/profile/* → /tmp/<pid>/home/user/profile/* • Implementation: seccomp-bpf • Leverage MBox, a lightweight sandboxing for non-root users • Place hooks on 50 system calls that deals with file paths, e.g., open, creat, unlink , stat etc 32

  33. UCognito Policy System • Goal: control trace storage and trace usage on a per-file granularity • Design: • CLEAN : disallow loading of any traces, run browser at its pristine stage • COPY : allow use of existing traces, carrying existing information to the sandbox • WRITE : allow storing of new traces, committing data in sandbox back to file system 33

  34. Default Policy 1 # exclude all files in home directory 2 [clean] 3 ~/ Category Use Store ✘ ✘ Browsing history ✘ ✘ Cookies Whitelist principle: ✘ ✘ Cache ✘ ✘ Local storage ✘ ✘ Flash storage By default, nothing is allowed ✘ ✘ Download entries to be stored or used ✘ ✘ Autofills unless specified in a policy ✘ ✘ Bookmarks ✘ ✘ Per-site zoom ✘ ✘ Per-site permission ✘ ✘ SSL self-signed cert ✘ ✘ SSL client cert ✘ ✘ Add-on storage ✘ ✘ (All others) 34

  35. Chrome Guest Mode 1 # exclude all files in home directory 2 [clean] 3 ~/ 4 5 # Use: SSL client certificates Category Use Store 6 [copy] ✘ ✘ 7 ~/.pki/nssdb/cert9.db Browsing history 8 ✘ ✘ Cookies 9 # write-back client certificates ✘ ✘ Cache 10 [write] 11 ~/.pki/nssdb/cert9.db ✘ ✘ Local storage ✘ ✘ Flash storage ✘ ✘ Download entries ✘ ✘ Autofills ✘ ✘ Bookmarks ✘ ✘ Per-site zoom ✘ ✘ Per-site permission ✘ ✘ SSL self-signed cert ✔ ✔ SSL client cert ✘ ✘ Add-on storage ✘ ✘ (All others) 35

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