revisiting the chrome extension permissions model
play

Revisiting the Chrome Extension Permissions Model Pranav Prakash, - PowerPoint PPT Presentation

Revisiting the Chrome Extension Permissions Model Pranav Prakash, Chester Leung 1 Courtesy of W3Counter 2 Courtesy of W3Counter 3 Chrome has ~190,000 Google Chrome extensions released 2010 2020 2008 2019 Chrome adds Chrome removes


  1. Revisiting the Chrome Extension Permissions Model Pranav Prakash, Chester Leung 1

  2. Courtesy of W3Counter 2

  3. Courtesy of W3Counter 3

  4. Chrome has ~190,000 Google Chrome extensions released 2010 2020 2008 2019 Chrome adds Chrome removes support for 500+ malicious extensions extensions 4

  5. Chrome Extensions... 5

  6. Chrome Extensions... ● Change UI 6

  7. Chrome Extensions... ● Change UI ● Provide additional functionality 7

  8. Chrome Extensions... ● Change UI ● Provide additional functionality ● Integrate with third party apps 8

  9. Extension Ecosystem ● ~1.2B installs 9

  10. Extension Ecosystem ● ~1.2B installs ● 2.6% of installed extensions are paid 10

  11. Extension Ecosystem ● ~1.2B installs ● 2.6% of installed extensions are paid ● 87% have less than 1,000 installs 11

  12. Extension Ecosystem ● ~1.2B installs ● 2.6% of installed extensions are paid ● 87% have less than 1,000 installs ● Only 13 have more than 10 million installs 12

  13. Extension Ecosystem ● Most big extensions backed by a company 13

  14. Extension Ecosystem ● Most big extensions backed by a company 14

  15. Extension Ecosystem ● Most big extensions backed by a company 15

  16. Extension Ecosystem ● Most big extensions backed by a company 16

  17. 17

  18. It’s a business! 18

  19. https://extensionmonitor.com/blog/breaking-down-the-chrome-web-store-part-2 19

  20. https://extensionmonitor.com/blog/breaking-down-the-chrome-web-store-part-2 20

  21. 21

  22. Extension developers were phished! 22

  23. Extensions used for malvertising 23

  24. 24

  25. 25

  26. Nigelify 26

  27. Nigelify Link 27

  28. Nigelify Extension Link 28

  29. Nigelify Extension Link Credentials 29

  30. Nigelify Extension Link Credentials 30

  31. Nigelify Extension Link Resources Credentials 31

  32. Nigelify ● Made $1000 in < 1 week 32

  33. Nigelify ● Made $1000 in < 1 week ● Affected 100k+ users 33

  34. Nigelify ● Made $1000 in < 1 week ● Affected 100k+ users ● Prevented users from removing extension 34

  35. 35

  36. Added users to botnet 36

  37. Part of malvertising campaign 37

  38. Analyzing the threat surface of Chrome’s extension APIs 38

  39. Chrome ● Designed with security in mind ● Isolation, separation of privilege 1 39 1 Barth, Adam, et al. "Protecting browsers from extension vulnerabilities." (2010).

  40. Chrome Extension Architecture runtime.sendMessage 40

  41. Manifests "background": { ● Structure of extension "persistent": false, explicitly declared "scripts": [ "js/background.js" ] }, "content_scripts": [ { ● Permissions enumerated "js": [ "js/content.js"] "matches": ["*://*.foo.com"], "run_at": "document_start" }], "permissions": ["bookmarks"] 41

  42. Weaknesses of Permission Model ● While limited by sandboxing/isolation, malicious developers may not adhere to “principle of least privilege” 42

  43. Analyzing the Chrome APIs ● Inspect the APIs in each permission group 43

  44. Analyzing the Chrome APIs 44

  45. Analyzing the Chrome APIs ● Primary objectives of malicious extension ○ Data exfiltration ○ Website tampering ○ Phishing 45

  46. Analyzing the Chrome APIs ● CIA Triad: Confidentiality, Integrity, Availability 46

  47. Analyzing the Chrome APIs ● CIA Triad: Confidentiality, Integrity, Availability ● Classify aligned to triad ○ Info disclosure ○ Phishing ○ State manipulation ○ Obfuscation 47

  48. Analysis 48

  49. Analysis ● Majority of APIs can be abused ● Different methods within same permission have different threat profiles 49

  50. Reverse-engineering a malicious extension 50

  51. Version History 51

  52. Malicious buyout ● Rather than phish developer, outright buy an extension 52

  53. Malicious buyout ● Rather than phish developer, outright buy an extension 53 https://portswigger.net/daily-swig/when-browser-extensions-go-rogue

  54. Why so many users? ● Possibly ranked high in google search? ● Are all installs legitimate? 54

  55. Permissions Nothing too abnormal... 55

  56. Suspicious Obfuscation 56

  57. A seemingly benign jpeg 57

  58. Wait that’s not a jpeg... > file promo.jpg PNG image data, 1280 x 800, 8-bit/color RGBA, non-interlaced 58

  59. What’s in the alpha channel? 59

  60. Steganographic Obfuscation 60

  61. Takeaways? ● Limitations of static/dynamic analysis 61

  62. Takeaways? ● Limitations of static/dynamic analysis ● Permissions system has unnecessarily broad scope 62

  63. Takeaways? ● Limitations of static/dynamic analysis ● Permissions system has unnecessarily broad scope 63

  64. Mitigations to limit power of malicious extensions 64

  65. Mitigation: Fine-grained permissions ● Scope on method, not permission category ● Should not be able to update tabs if only need to refresh them 65

  66. Existing permissions "permissions": [ "tabs", "*://*.google.com/" ], 66

  67. Existing permissions "permissions": [ "tabs", "*://*.google.com/" ], Update existing tabs? Spawn new tabs? 67

  68. Wildcard Host Nothing too abnormal...? 68

  69. Scope network access ● Tie network host permission to parent permission "permissions": [ "permissions": [ "tabs", "tabs.executeScript" : { "*://*.google.com/" "*://*.google.com/" ], } ], 69

  70. Existing permissions "permissions": [ "tabs", "*://*.google.com/" ], Update existing tabs? Spawn new tabs? 70

  71. Revised permissions "permissions": [ "permissions": [ "tabs.executeScript" : { "tabs", "*://*.google.com/" "*://*.google.com/" } ], ], Read and manipulate your data on all google.com sites 71

  72. Backwards Compatibility ● Static analysis to transparently upgrade manifests ● Prevents obfuscated API calls 72

  73. Mitigation: Runtime Permissions 73

  74. Mitigation: Runtime Permissions ● Permission dialog every time an extension wants to run 74

  75. Today: Chrome Optional Permissions Feature 75

  76. Today: Chrome Optional Permissions Feature ● Requested additional permissions during runtime 76

  77. Today: Chrome Optional Permissions Feature ● Request additional permissions during runtime ● Better security and information to users 77

  78. Today: Chrome Optional Permissions Feature ● Requested additional permissions during runtime ● Better security and information to users 78

  79. Runtime Permission Dialog 79

  80. Runtime Permission Dialog Bookmarks Navigator requests 80

  81. Runtime Permission Dialog Bookmarks Navigator requests Bookmarks access 81

  82. Runtime Permission Dialog Bookmarks Navigator requests Bookmarks access Bookmarks enable easy access to your favorite sites 82

  83. Runtime Permission Dialog Bookmarks Navigator requests Bookmarks access Bookmarks enable easy access to your favorite sites We’ll ask for permission every time you open a new tab 83

  84. Runtime Permission Dialog Bookmarks Navigator requests Bookmarks access Bookmarks enable easy access to your favorite sites We’ll ask for permission every time you open a new tab Deny Grant 84

  85. Impact ● On developer ● On user 85

  86. Impact on Developer 86

  87. Under the Hood 87

  88. Permission Dialog Context ● Two ways to call a chrome.* API 88

  89. Rule-Based Triggers 89

  90. Logic Triggers 90

  91. Config Example { “Logic_triggers” : { “message.js:L32” : “You’ve clicked the set timer button in our extension on your navigation bar”, // More triggers } } 91

  92. Impact on User ● Usability / security tradeoff 92

  93. Usability ● Windows Vista UAC disaster 93

  94. Usability ● Windows Vista UAC disaster 94

  95. Usability ● Windows Vista UAC disaster ● Users’ skimming / not reading dialogs 95

  96. Usability Solutions 96

  97. Usability Solutions 97

  98. Usability Solutions ● Standardized dialog interface that conveys a sense of danger 98

  99. Usability Solutions ● Standardized dialog interface that conveys a sense of danger ● Conditioned-safe ceremony 99

  100. Evaluation: Mitigation Effectiveness ● User Agent Switcher: exfiltrates visited URLs and redirects users 100

Recommend


More recommend