News for hackers. Stuff that matters.
Re:Harden and secure browsers in containers, with GUI by gigatexal on Monday October 11, 2021 @03:53AM (#28825881)
I love this idea but it's broken a bit if webcams and mics can't be used at least for my use-case. If I had some time I'd look into extending that with this project.
Re:Harden and secure browsers in containers, with GUI by mfontani on Monday October 11, 2021 @05:40AM (#28826498)
For the (few) docker-based browser containers I use, I simply bind-mount[1] the relative devices and (in Chrome) it all just works.

For Chrome inside a container, I also install the Google Talk plug-in. Unsure if that's still required, but things work well.

[1]: i.e. "--group-add plugdev", "--device /dev/hidraw4", "--device /dev/video4", "--device /dev/snd", "--device /dev/sri" and similar

Re:Harden and secure browsers in containers, with GUI by gigatexal on Monday October 11, 2021 @07:04AM (#28826976)
I almost don't want to ask as I know the answer is likely to be not great but can this also be done on mac?
Re:Harden and secure browsers in containers, with GUI by Arnavion on Monday October 11, 2021 @03:09PM (#28831804)
If they're USB devices, you can try tweaking the docker-machine VM definition in whatever hypervisor your Mac uses, so that the devices are mounted directly in the VM and are thus available to containers.
Re:Harden and secure browsers in containers, with GUI by gigatexal on Monday October 11, 2021 @03:15PM (#28831874)
of course! that's a good idea.
Re:Harden and secure browsers in containers, with GUI by fsflover on Monday October 11, 2021 @03:59AM (#28825923)
Have a look at Qubes OS then : https://qubes-os.org. It's even more secure (hardware VT-d virtualization), with a nice gui and allows to use webcams and microphones securely.
Re:Harden and secure browsers in containers, with GUI by krageon on Monday October 11, 2021 @09:02AM (#28827845)
No GPU acceleration which makes it (as understandable as the choice is) kind of a pain to use.
Re:Harden and secure browsers in containers, with GUI by fsflover on Monday October 11, 2021 @09:06AM (#28827878)
It's fast enough for all normal tasks in my experience. Also, you can make a GPU passthrough.
Re:Harden and secure browsers in containers, with GUI by usr1106 on Monday October 11, 2021 @04:35AM (#28826109)
Pulseaudio has network support. You should be able to share your microphone. Of course you need to run pulseaudio inside the container, too. So it's no longer an application container, but a system container.

I used system containers in the past, they are not always easy. No idea whether it would work with podman.

Now that I think about it: The browser obviously uses the display of the host. How? Only over X11 network protocol? That worked in the past, does it still work today? I thought modern browsers would need /dev/dri/? If that is made available, why would Webcams not be possible?

Re:Harden and secure browsers in containers, with GUI by thefr0g on Monday October 11, 2021 @05:30AM (#28826434)
> Only over X11 network protocol?

If you read the examples you'll see that they mount /tmp/.X11-unix in the container, thats where the X-Sessions Unix domain socket is. You can do the same for pulseaudio. But you shouldn't. Use Wayland and Pipewire if you are actually interested in using this as a security measure, since they are built for sandboxing.

> I thought modern browsers would need /dev/dri/?

They only need it for hw-acceleration. You can also give the container access to it if you need that.