Garnet is a secure and performant browser isolation prototype that replays remote browser draw commands in local browser via WebAssembly.
Garnet consists of three major components: Browser Extension, Server and Modified Chromium.
- Capture and send I/O events in local browser
- Verify the draw commands from server is valid (no malicious code injected)
- Render the draw commands which are sent from server via Skia's WebAssembly build
- Receive I/O events from local browser and simulate the same mouse/keyboard events on Modified Chromium
- Listen to the file that Chromium write draw command to and convert the draw commands to Skia JS draw commands
- Send Skia JS draw command to browser extension
- Logging draw commands (
Skia
draw commands,ui/gfx
commands) to a temp file which is listened by server
For more details:
Here we present where major components are located and their key files.
- Brwoser Extension:
client/web-extension/
manifest.json
: extension manifest file which contains info such as version, name, script pathbackground.js
: script also run in background which delegate the request to serverindex.html + index.js
: create canvas for display draw commands(from server) via WebAssembly
- Server:
server/
index.js
: start chromium base on request; listen to the file that Chromium write draw command to and convert the draw commands to Skia JS draw commands; send Skia JS draw command to browser extension
- Modified Chromium:
chromium @ ac814e8/
ui/gfx/render_text.cc
,chromium/ui/gfx/canvas_skia.cc
: chromium internal text rendering commandschromium/third_party/skia/src/core/SkCanvas.cpp
: SkCanvas draw commands for basic shapes and images
-
Install Nodejs (>= 10.13.0).
-
Clone the repo:
git clone https://github.com/ECS-251-W2020/final-project-sudo.git
cd final-project-sudo
- Setup chromium submodule:
git submodule init
git submodule update
Compile the modified chromium to executable. Refer to chromium.org(skip "Get the code")
- Install dependencies:
cd server
npm install
- Start the server:
npm start
Install the web extension in local browser:
- Open the Extension Management page by navigating to
chrome://extensions
. - Enable Developer Mode by clicking the toggle switch next to Developer mode.
- Click the
LOAD UNPACKED
button and select the extension directory. - Enjoy your secure browsing experience