Skip to content

Desktop app as insecure, as a web page. Serve code from local files, especially crypto. #17

@3n-mb

Description

@3n-mb

Context

A whole of app code, together with crypto parts, is loaded via electron/main.js

ipcMain.once('load-webapp', function(event, online) {
  enteredWebapp = true;
  if (baseURL.includes('?')) {
    baseURL += '&hl=' + locale.getCurrent();
  } else {
    baseURL += '?hl=' + locale.getCurrent();
  }
  main.loadURL(baseURL);
});

where baseURL points to wire's server, from where everything is loaded. All UI parts, all of crypto, everything.

This way all of security aspects are totally equivalent to those of a web page.
For example, when wire's server is compromised, and it starts to serve js files that also steal keys/passes, all desktop applications are compromised immediately, because they rely for key functionality on code, served from a web server.

This is a security problem.

Possible solution

Keep all web assets in a local directory.
Do not load it every time from a browser.

It can be as simple as modifying build/pack process.
For example, require wire-webapp folder to be nearby, trigger build in it, then copy assets into electron folder here, and trigger existing build process here.

In time, you may leverage this by injecting native-code backed crypto functions, speeding things up, turning a security benefit into a usability one.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions