Hey guys, first post here and on an alt, I hope I don’t get flamed. If there’s not enough info I’ll post another thread tomorrow.

Its been ~5-7 years since using Linux (Ubuntu/Kubuntu/Debian/Mint/Fedora/etc) as my daily driver. Windows since then for dev and games with kids, but now I have a laptop that can run my dev env in a VM.

I’m an advocate for privacy and security, but I’m also at the “config once, mostly work for a while” camp… I don’t like spending a ton of time fixing things. I don’t need Whonix or QubesOS-level compartmentalization (unless it runs Barbone’s now), but I tried OpenSuse Tumbleweed on a recommendation and the fine-tuning of flatpak controls seemed really nice. I’d love to be able to sandbox as much as possible without breaking things. Memory and exploit-hardened kernel/apps is a huge plus. Basically GrapheneOS as a Linux distro would be fantastic, even though it comes with its own issues.

Am I overthinking here? Should I commit to Debian, Fedora, or OpenSuse and learn to sandbox and harden properly (if so which has best docs and community)?

I forgot the copy-paste specs my laptop hardware info to my phone earlier, but its an HP Victus 15-fa0032dx

HP Victus 15.6" 144Hz FHD IPS Gaming Laptop (Intel i7-12650H 10-Core, 16GB DDR4, 512GB SSD, RTX 3050 Ti 4GB GDDR6), Backlit KYB, WiFi 6, BT 5.2, HD Webcam

I don’t use the Bluetooth or webcam, so those drivers aren’t necessary. Does Wayland work for this, and is that really necessary?

Sorry for the noob questions. Mid-30s guy with kids wanting to get this done this week if possible. Please excuse spelling and grammar mistakes.

SIDE NOTE: NOT AT ALL opposed to learning new systems, especially for security, as long as it doesn’t require hunting down obscure undocumented commands.

Thanks all

  • dsemy@lemm.ee
    link
    fedilink
    English
    arrow-up
    6
    ·
    8 months ago

    Hardening Linux is very hard IMO.

    Privacy wise, if you use free software you should generally be fine, though look into either hardening Firefox’s settings (you can use something like arkenfox user.js) or use a fork which does this for you (Librewolf or Mullvad browser).

    Sandboxing solutions available to regular users (as in usable after a sane amount of effort) have some major drawbacks (which means random programs, especially proprietary ones, aren’t as safe to run as on your phone):

    • They all sandbox applications which were developed and designed assuming they will run unconfined (in contrast to something like Android, where apps assume they are in a sandbox). This leads to many problems, some of which are solved by portals.
    • Flatpaks are often poorly sandboxed by default, and it can be hard/impossible to properly sandbox them (for example, if your Flatpak needs access to game controllers it will likely need access to all devices to work properly).
    • Firejail has a large attack surface and is an SUID binary.
    • Bubblewrap has a smaller attack surface and can also use unpriviliged user namespaces instead of being an SUID binary if supported by the kernel (though this has its own security implications), but it is very hard to use (it is used by Flatpak internally).
    • I don’t know much about Snaps, but I doubt they’re better than Flatpaks in this regard.

    An important part of Linux security is Mandatory Access Control (implemented by SELinux and AppArmor, for example). MAC is an additional permission mechanism that is checked after the usual Unix permissions (user, group based) grant access, and is used to confine processes, so if an attacker exploits them they will only be able to access a minimal amount of information. Most distros don’t configure a MAC, and it is extremely hard and time consuming to do so (though it’s relatively easy to confine specific “high risk” processes with AppArmor if your distro has basic support for it). Fedora has SELinux configured OOTB, and allows for simple further hardening by having predefined confined SELinux users you can assign to Linux users to limit what they can do. OpenSUSE has AppArmor configured and enabled by default though it is not a full system policy AFAIK (the init process runs unconfined), in contrast to SELinux (though Fedora runs many processes and users by default unconfined too). Both have good docs (though for Fedora look at RedHat’s docs for SELinux, it goes much more in depth). From my experience, it is much easier to configure AppArmor, but it would still require an extreme amount of work to do properly, so I’d recommend sticking with a distro that does that for you.

    • FutureProofBackdoorsOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      8 months ago

      Thanks for the reply. Unfortunately it seems things haven’t changed much in the last decade as far as hardening is concerned, seems like you have to come from an infosec background and constantly read log files or set up new yara rules (or have some software do it which comes with its own set of concerns). I was recently under the impression that docker images were virtualized until I learned they’re free to break out at any time with kernel vulnerabilities which are much more numerous than hypervisor escapes, so it doesn’t surprise me there are issues with flatpaks/bubblewrap/firejail. Sandboxing solutions seem much more mature on Windows unfortunately, with both Sandboxie/Windows Sandbox and Kaspersky (I know) having their own versions of scope-specific apps and limits. But I think I have a lot more reading to do before assuming.

      • dsemy@lemm.ee
        link
        fedilink
        English
        arrow-up
        2
        ·
        8 months ago

        The situation is improving, just very slowly. Solutions are slowly being figured out to various usability issues created by sandboxing (for example, there has been discussion for a while regarding how to solve the game controller issue I mentioned), which will allow the more user-friendly solutions to be more hardened by default. Also, even though I have many issues with Flatpak, with a bit of configuration (even graphically with Flatseal) it can effectively sandbox many programs already, as long as you use Wayland.

        On the MAC front, there is a 3rd party project (apparmor.d) that’s trying to build a portable set of AppArmor profiles for all common programs/environments on desktop Linux. As you might imagine this is a huge project and far from done, but it’s actually surprisingly complete already.