Disable WebRTC in Chromium #521

Closed
craftyguy opened this Issue Dec 6, 2016 · 16 comments

Comments

Projects
None yet
5 participants
@craftyguy

WebRTC is enabled in Chromium distributed by CopperheadOS, is it possible to disable it outright, or at least expose the flag to do so?

@thestinger

This comment has been minimized.

Show comment Hide comment
@thestinger

thestinger Dec 6, 2016

Contributor

It won't be outright disabled and chrome://flags won't be changed because it's not really meant for use by end users. It could be exposed as a site option. Why single out WebRTC among all of the features that are available though? Do you really want a way to turn off the portion of the feature leaking local IP addresses? That part could be disabled by default, but not the whole feature. We aren't going to remove useful features rather than making them opt-in if they aren't important or opt-out if they are, and WebRTC as a whole is definitely important.

Contributor

thestinger commented Dec 6, 2016

It won't be outright disabled and chrome://flags won't be changed because it's not really meant for use by end users. It could be exposed as a site option. Why single out WebRTC among all of the features that are available though? Do you really want a way to turn off the portion of the feature leaking local IP addresses? That part could be disabled by default, but not the whole feature. We aren't going to remove useful features rather than making them opt-in if they aren't important or opt-out if they are, and WebRTC as a whole is definitely important.

@craftyguy

This comment has been minimized.

Show comment Hide comment
@craftyguy

craftyguy Dec 6, 2016

Rather than argue the importance (or not) of webrtc, I think having the leaking of local IP addresses disabled is a start.

Rather than argue the importance (or not) of webrtc, I think having the leaking of local IP addresses disabled is a start.

@CopperheadUser

This comment has been minimized.

Show comment Hide comment
@CopperheadUser

CopperheadUser Dec 6, 2016

+1, definitly security-breach "feature".

+1, definitly security-breach "feature".

@kewde

This comment has been minimized.

Show comment Hide comment
@kewde

kewde Dec 8, 2016

Chromium has a flag you can set, namely chrome.privacy.network.webRTCIPHandlingPolicy.
It is supposed to be default_public_interface_only to prevent WebRTC from contacting local addresses. I think this should be the default setting.

But it can also be set to another value
disable_non_proxied_udp - disables non-proxied UDP and forces proxy. This policy forces the use of a proxy, and only allows WebRTC traffic over UDP proxies. This will effectively disable WebRTC communication for most users (depending on UDP proxy usage).

I suppose the UI needs a toggle to switch between the two if it does not yet provide this option?

kewde commented Dec 8, 2016

Chromium has a flag you can set, namely chrome.privacy.network.webRTCIPHandlingPolicy.
It is supposed to be default_public_interface_only to prevent WebRTC from contacting local addresses. I think this should be the default setting.

But it can also be set to another value
disable_non_proxied_udp - disables non-proxied UDP and forces proxy. This policy forces the use of a proxy, and only allows WebRTC traffic over UDP proxies. This will effectively disable WebRTC communication for most users (depending on UDP proxy usage).

I suppose the UI needs a toggle to switch between the two if it does not yet provide this option?

@thestinger

This comment has been minimized.

Show comment Hide comment
@thestinger

thestinger Dec 8, 2016

Contributor

Need a way to control this in the Privacy menu and then the default can be changed for Chromium. WebView will be more of a hassle to deal with if it is.

Contributor

thestinger commented Dec 8, 2016

Need a way to control this in the Privacy menu and then the default can be changed for Chromium. WebView will be more of a hassle to deal with if it is.

@kewde

This comment has been minimized.

Show comment Hide comment
@kewde

kewde Dec 8, 2016

@thestinger has chrome become the default webview for Android in 7.0?

kewde commented Dec 8, 2016

@thestinger has chrome become the default webview for Android in 7.0?

@thestinger

This comment has been minimized.

Show comment Hide comment
@thestinger

thestinger Dec 8, 2016

Contributor

CopperheadOS has a build of SystemWebView.apk and ChromeModernPublic.apk from the Chromium source tree. The WebView is always a separate app, even when using Monochrome. Not sure how Monochrome is relevant to this though.

Contributor

thestinger commented Dec 8, 2016

CopperheadOS has a build of SystemWebView.apk and ChromeModernPublic.apk from the Chromium source tree. The WebView is always a separate app, even when using Monochrome. Not sure how Monochrome is relevant to this though.

@kewde

This comment has been minimized.

Show comment Hide comment
@kewde

kewde Dec 8, 2016

@thestinger I read that the chrome apk can act as WebView?
http://gadgets.ndtv.com/apps/news/google-chrome-to-replace-webview-in-android-70-nougat-863667

I'm not sure where to look, does Chromium power the WebView? Or is it seperate?

kewde commented Dec 8, 2016

@thestinger I read that the chrome apk can act as WebView?
http://gadgets.ndtv.com/apps/news/google-chrome-to-replace-webview-in-android-70-nougat-863667

I'm not sure where to look, does Chromium power the WebView? Or is it seperate?

@thestinger

This comment has been minimized.

Show comment Hide comment
@thestinger

thestinger Dec 8, 2016

Contributor

This is all you need to know:

CopperheadOS has a build of SystemWebView.apk and ChromeModernPublic.apk from the Chromium source tree.

CopperheadOS doesn't have Chrome, which is Monochrome.apk not ChromeModern.apk with a separate SystemWebVIew.apk anymore. Either way, they always run as separate apps and they are built from the same source tree. Those two things are always true, and those are the only things relevant to this issue. It doesn't matter which packaging format is used (split vs. monolithic).

Contributor

thestinger commented Dec 8, 2016

This is all you need to know:

CopperheadOS has a build of SystemWebView.apk and ChromeModernPublic.apk from the Chromium source tree.

CopperheadOS doesn't have Chrome, which is Monochrome.apk not ChromeModern.apk with a separate SystemWebVIew.apk anymore. Either way, they always run as separate apps and they are built from the same source tree. Those two things are always true, and those are the only things relevant to this issue. It doesn't matter which packaging format is used (split vs. monolithic).

@thestinger

This comment has been minimized.

Show comment Hide comment
@thestinger

thestinger Dec 15, 2016

Contributor

Replacing this with #529 since it's not going to be disabled. It would probably only take 15 lines of code to implement this. Maybe someone is interested in contributing, otherwise it won't be added.

Contributor

thestinger commented Dec 15, 2016

Replacing this with #529 since it's not going to be disabled. It would probably only take 15 lines of code to implement this. Maybe someone is interested in contributing, otherwise it won't be added.

@thestinger thestinger closed this Dec 15, 2016

@craftyguy

This comment has been minimized.

Show comment Hide comment
@craftyguy

craftyguy Dec 15, 2016

@thestinger

This comment has been minimized.

Show comment Hide comment
@thestinger

thestinger Dec 15, 2016

Contributor

In chrome/android/BUILD.gn, change the package id:

manifest_package = "org.chromium.chrome"
Contributor

thestinger commented Dec 15, 2016

In chrome/android/BUILD.gn, change the package id:

manifest_package = "org.chromium.chrome"
@thestinger

This comment has been minimized.

Show comment Hide comment
@thestinger

thestinger Dec 15, 2016

Contributor

The key to doing it is just copying one of the other preferences (preference bridge stuff, UI code, etc. - mostly just boilerplate). Starting with 2 just the two states exposed by uBlock Origin would be fine. Can expose the full functionality later, or not at all if no one really wants it.

Contributor

thestinger commented Dec 15, 2016

The key to doing it is just copying one of the other preferences (preference bridge stuff, UI code, etc. - mostly just boilerplate). Starting with 2 just the two states exposed by uBlock Origin would be fine. Can expose the full functionality later, or not at all if no one really wants it.

@thestinger

This comment has been minimized.

Show comment Hide comment
@thestinger

thestinger Dec 15, 2016

Contributor

I'd also be fine with doing attack surface reduction via Site settings by adding options for WebGL, WebRTC, etc. but #512 is a hard prerequisite and it's not going to be easy to implement or maintain it so it really needs to happen upstream.

Contributor

thestinger commented Dec 15, 2016

I'd also be fine with doing attack surface reduction via Site settings by adding options for WebGL, WebRTC, etc. but #512 is a hard prerequisite and it's not going to be easy to implement or maintain it so it really needs to happen upstream.

@craftyguy

This comment has been minimized.

Show comment Hide comment
@craftyguy

craftyguy Dec 15, 2016

Thank you for the pointers.

Another silly question: you'd want a contribution in the form of a patch against (which source tree?) chromium in the form of a pull request to this repo?

Thank you for the pointers.

Another silly question: you'd want a contribution in the form of a patch against (which source tree?) chromium in the form of a pull request to this repo?

@csagan5

This comment has been minimized.

Show comment Hide comment
@csagan5

csagan5 Oct 26, 2017

I have added a patch to disable WebRTC for Bromite here: bromite/bromite@83e140c

It patches against Chromium v63.x (63.0.3239.15 at the moment)

csagan5 commented Oct 26, 2017

I have added a patch to disable WebRTC for Bromite here: bromite/bromite@83e140c

It patches against Chromium v63.x (63.0.3239.15 at the moment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment