如何在 OpenBSD 上创建具有最低权限的用户?

如何在 OpenBSD 上创建具有最低权限的用户?

我想在 OpenBSD 桌面上使用不同的用户 (XY) 运行 web 浏览器 (xxxterm)(与我日常使用的用户不同)。我将在本地计算机中使用 ssh -X 访问浏览器(或者有更好的解决方案吗?)。网络浏览器不需要音频,不需要 flash,不需要 html5,不需要 JAVA,不需要插件,不需要 JAVASCRIPT 等。

如何创建具有尽可能最小权限的用户?有什么技巧吗? (用户是否只需要在他的组中,而不需要在其他组中?)

在谷歌上搜索了几个小时,寻找我稍后需要“扩展”的关键字/技巧(迷你指南):

mount /home with nodev, nosuid, noexec AND/OR with read-only option?
set high umask for users that are not XY
minimal groups needed for user
regularly check that the user isn't in the sudoers file
no o+rwx on the files in the system or suids
**restricted shell for the user?**
systrace restrictions? (or doesn't worth it?*)
pf limitations - user uid only needs http https ftp dns - no other network needed for any user besides root
put the webbrowsing in a qemu vm??
security/limits.conf - ulimit for the user?
chroot the xxxterm?
xxxterm as shell? (instead of ksh?)
only let a few dozen MByte quota for the user or zero?
guest session like? - start with a clear QEMU guest or chrome directory at every chrome exit/start?
privoxy for filtering chrome traffic? (proxy can be set to anything by the XY user..)
can pf limit that what process can use http https ftp dns?

如果本指南完成,它在僵尸终结者启示录中可能会很有用:D

答案1

如果您想要一个完全隔离的浏览器实例,不能影响其小沙箱之外的任何内容,这听起来像(尽管问题的标题如此),我建议您简单地运行一个虚拟机并通过某种方式连接到它除 X11 转发之外。在这种情况下,是否使用 SSH、加密与否并不重要,因为您并不真正希望真正保护传输中的数据,您只是希望将一个应用程序与其他所有应用程序隔离开来。在其中运行浏览器以及在其外部运行其他所有内容。就浏览器而言,它看到其操作系统安装在虚拟机中,并且在该影响范围之外没有任何东西。

VNC、微软远程桌面或类似的东西应该可以工作。 X11 转发已被淘汰,因为它以这些替代方案(可能)不会的方式公开原始数据流,这将允许在任何一方运行的恶意应用程序窥探您正在执行的所有操作,从而抵消所有安全收益。 (这不需要 root,只需要您自己的访问权限,因为您拥有 X 会话。)当然,如果任何浏览器允许网页访问此类数据。

它不能防止虚拟机外部运行的恶意应用程序窥探您使用虚拟机内部浏览器所做的事情,但它应该可以防止虚拟机内部的任何恶意应用程序窥探虚拟机外部运行的任何内容。

相关内容