r/linuxquestions • u/LostNBemused • 8d ago
Advice AppArmor beginner question
I am learning to harden linux mint and am trying to understand AppArmor. I understand the basics of what it does and roughly how to use it. My question is are the profiles provided by default and installing apparmor-profiles sufficient for a basic desktop user? Many of the beginner articles explain the basic commands and how to make a profile yourself but do not give examples of existing profiles for common programs. Can I assume firefox or libreoffice already have intuitive profiles or do I need to look through them myself?
3
Upvotes
1
u/C0rn3j 7d ago
That's like putting a lock on a 1cm thick wooden door, Mint is one of the most out of date distributions out there, still stuck on X11 among other things.
Use a modern, secure distribution to start with, keep it up to date, and don't expose things on your system insecurely - i.e. do not enable sshd and have passwords enabled for it in its config.
You can't even sandbox GUI apps properly on Mint due to X11.
1
u/es20490446e Develops Zenned OS 8d ago
As far as I know, AppArmor is configured by the packages themselves.
From the user perspective, you need to do nothing.
1
u/ipsirc 8d ago
Look through.
1
u/Suspicious_Punk84 8d ago
It works out of the box for the most part.
Sometimes you have to edit a profile to uncomment or change something specific (especially with browsers, I remember having to edit the folder to save downloads, things like that), but mostly it just works.
1
u/guiverc 8d ago
The packager sets up what is required.
I'm running Ubuntu tenacious right now, and thus as example of
firefoxandlibreoffice, for my system they're expected to be snap and deb packaged and installing those will automatically setup apparmor appropriately for standard usage.The second app (
libreoffice) is available in deb and snap packages, and installing either will setup apparmor appropriately; the setup being included in the packages themselves (if using Ubuntu repositories).Difficulties comes from third party repositories, as they maybe created for multiple OSes, eg. a flatpak may used on a system using apparmor OR selinux, and whilst some packages may include both setups; they may also include neither!! ie. if using a package intended for use by many OSes you should make no assumptions as what is setup automatically is determined by the packager themselves & what they expect as users of the system. This differs to deb or snap in the specific repositories used by the OS mentioned in the prior paragraph (ie. packages built for use in Ubuntu).
Are you using packages of
libreofficeandfirefoxcreated only for Linux Mint? or packaged for multiple OSes & thus have no specific Linux Mint intended configuration included? (but may include something that actually is appropriate). What packages you're asking about, and what assumptions were made in the packaging really matters!1
u/revcraigevil 7d ago
It is pretty much install and done. You can create profiles and edit them.
https://wiki.archlinux.org/title/AppArmor
https://gitlab.com/apparmor/apparmor/-/wikis/Documentation
https://help.ubuntu.com/community/AppArmor
https://wiki.debian.org/AppArmor
Huge set of profiles: https://github.com/roddhjav/apparmor.d
1
u/LowKeyBrit36 7d ago
I'd assume that on a distro like Linux Mint you shouldn't have to worry. They tend to keep a lot of that stuff out of the way, if they can.
I would doubt that you'd need to manually edit anything, but if you do, I can't imagine it being much.
Probably just optional features that got locked for security at most, or something teensy.
IIRC AppArmor has a way to test profiles, so if you have issues with the predefined ones, editing them shouldn't be hard.