~/talk

Preloading Insecurity In Your Electron

Talkat Black Hat Asia 2019 · 2019-03-26..03-29· [security, javascript]
links:none on file
slides:none on file

Demonstrates concrete chains that turn an Electron XSS into RCE by abusing BrowserWindow preload: examples hijack Wire’s logger to write files (overwriting .bashrc to spawn a calculator), use Discord’s bundled native modules and a require-via-IPC channels trick to run child_process, and use prototype pollution against preloads lacking contextIsolation to recover process and require. Counts show 12 historical nodeIntegration bypasses, scans find >80% apps enable nodeIntegration while only ~25% use contextIsolation; recommends VM contexts or postMessage plus enabling sandbox and contextIsolation.

AI-written summary · about

  1. 0:00Intro
  2. 3:59Anatomy of Electron-based Apps
  3. 4:27Lifecycle
  4. 7:13ContextIsolation 1/2
  5. 9:56Electron is NOT a browser
  6. 10:43From Browser to Electron - Attack Surface
  7. 12:36From Browser to Electron- Isolation
  8. 14:02Full chain exploit (Step 1)
  9. 15:23Cross-Site Scripting
  10. 16:29Full chain exploit (Step 2)
  11. 17:40nodelntegration bypasses
  12. 18:15Affected Configs
  13. 19:15Exploits
  14. 19:32Secure-by-Default Settings (v5)
  15. 20:06Chromium Upgrades
  16. 20:24Survey Results
  17. 22:29preload - A neglected attack surface
  18. 23:27Node's Buffer
  19. 24:39Case Study - Wire App 1/3
  20. 28:30Case Study - Discord 3/3
  21. 30:20IpcMain and ipcRenderer 1/2
  22. 31:49Leveraging the Internal Electron IPC
  23. 32:40Case Study - (Again) Discord 3/3
  24. 35:24Sandboxing 2/2
  25. 37:16Native Capabilities, and Your Responsibility
  26. 38:13Prototype Pollution - Preload
  27. 38:48Case Study - Undisclosed 2/3
  28. 40:35Prototype Pollution - Electron
  29. 43:04Making Preload works with ContextIsolation
  30. 44:10Black Hat Sound Bytes 2/3
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.