Google chrome sandbox


Published on

Published in: Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Google chrome sandbox

  1. 1. Google Chrome Security d0c_s4vage
  2. 2. Sandbox <ul><li>-user-mode sandbox </li></ul><ul><li>-has at least two parts: </li></ul><ul><ul><li>a privileged controller or broker </li></ul></ul><ul><ul><li>One or more sandboxed processes ( targets ) </li></ul></ul>
  3. 3. broker <ul><li>- The broker is always the browser process </li></ul><ul><li>- responsibilities </li></ul><ul><ul><ul><ul><li>Specify policy for each process </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Spawn target processes </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Host sandbox policy engine service </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Host sandbox interception manager </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Host sandbox IPC service </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Perform policy-allowed actions on behalf of the target </li></ul></ul></ul></ul>
  4. 4. Broker
  5. 5. broker - The IPC service is used to “ forward certain windows API calls from the target to the broker ” - Calls are evaluated against the policy - If all is good, calls are then executed by the broker , and results are returned over the same IPC - The interception manager should patch windows API calls that should be forwarded from the IPC to the broker
  6. 6. target - Renderers are always target processes
  7. 7. target
  8. 8. target - interceptions == hooks, how windows API calls are forwarded to the broker via IPC - broker chooses to run the calls or fail them - **NOTE** “ The interception + IPC mechanism does not provide security; it is designed to provide compatibility when code inside the sandbox cannot be modified to cope with sandbox restrictions.”
  9. 10. Sandbox Security - restricted token - windows job object - windows desktop object - integrity levels (Vista only [ and Windows 7?])
  10. 11. Sandbox Security - token - The renderer runs with this token: Regular Groups Logon SID : mandatory All other SIDs : deny only, mandatory Restricted Groups S-1-0-0 : mandatory Privileges None - Nearly all resources the renderer uses were acquired by the broker /browser and duplicated into the renderer process
  11. 12. Sandbox Security – token - Mounted FAT or FAT32 volumes “ The security descriptor on them is effectively null. Malware running in the target can read and write to these volumes as long it can guess or deduce their paths.” - TCP/IP “ The security of TCP/IP sockets in Windows 2000 and Windows XP (but not in Vista) is effectively null. It might be possible for malicious code in the target to send and receive network packets to any host.”
  12. 13. Sandbox Security – Job object - Forbid using SystemParametersInfo() - Forbid the creation or switch of Desktops - Forbid changes to the per-user display configuration - No read or write to the clipboard - Forbid Windows message broadcasts - Forbid using SetWindowsHookEx() - Forbid access to the global atoms table - Forbid access to USER handles created outside the Job object - One active process limit (disallows creating child processes)
  13. 14. Sandbox Security - desktop - processes with the same token and same job object are effectively in the same security context - BUT, programs that have windows in the same desktop are also in the same security context - WHY? Sending + receiving windows messages in the same desktop is not subject to security checks
  14. 15. Sandbox - desktop - Default windows XP has 2 desktops: logon screen and regular desktop - Sandbox creates another desktop for all of the target processes, so they can't snoop on what the user is doing elsewhere
  15. 16. Chrome Sandbox
  16. 17. Chrome Sandbox
  17. 18. Other Attack Surfaces - All network-related IO functions run on a separate thread in the main browser process (no sandbox) - recent DoS PoC via malformed ftp responses on exploit-db ( ) - Issue where IO thread got hosed, crashed entire browser
  18. 19. Debugging Google Chrome Startup Options - --no-sandbox --single-process --wait-for-debugger-children --wait-for-debugger --js-flags=”--trace-exception --heap-stats” --js-flags=&quot;--h&quot; --safe-plugins Chrome has its own symbol server:
  19. 20. Google Chrome Security Issues - Chromium Security Bugs (not always latest) - Severity ratings - Security Issues by Rating - Critical: - High: - Medium: - Low:
  20. 21. Ideas - Under Windows, there is no practical way to prevent code in the sandbox from calling a system service - Since use of Windows TCP/IP sockets (XP) isn't restricted, download exe, guess USB path ( F: , G: , H: , etc. on Windows), save to USB, create autorun.inf on USB - Find vulnerabilities in valid messages the renderer can pass to the broker ( check out this issue:
  21. 22. Ideas - Insert hooks into UI events and snoop on whatever the user does in the same tab, even on different sites? - Could upload/download files to/from USB - Could be used as a pivot point (or a proxy) to be able to gain access into a network, since TCP/IP security “ is effectively null”
  22. 23. References Google Chrome Sandbox Windows Tokens What is a Token Windows Jobs