1 |
On Sunday, September 06, 2015 1:15:17 PM walt wrote: |
2 |
> https://wiki.gentoo.org/wiki/Hardened_Gentoo |
3 |
> |
4 |
> That wiki page is very seductive. It makes me want to drop everything |
5 |
> and select a hardened profile and re-emerge everything from scratch. |
6 |
> |
7 |
> But I have a feeling I'd soon be in big trouble if I did. Is this |
8 |
> something that only gentoo devs should be messing with, or is this |
9 |
> a project that a typical gentoo end-user might hope to accomplish |
10 |
> without frequent suicidal thoughts? |
11 |
|
12 |
There's different opinions on it, but mine is that while it adds some security |
13 |
it's so little that it's not worth it in most cases. It provides more security |
14 |
on a binary distro because everyone has the same binaries and an attacker |
15 |
don't need to guess where a specific piece of code may get loaded but by |
16 |
running a source distro your address space is already pretty unique. The only |
17 |
case where it provides some security is when an attacker is trying to guess an |
18 |
address for an exploit, making the wrong guess will likely crash the process |
19 |
and it will be reloaded on a new address. Do you have valuable enough data for |
20 |
an attacker to go through that hassle in order to get it? If you do then you |
21 |
should use a hardened profile, but physical security and disk encryption is |
22 |
more important because if it's worth that much it'll be easier to just rob |
23 |
you. |
24 |
|
25 |
Be aware that there's no hardened desktop profile so that alone will make it |
26 |
somewhat harder if plan to use it on a desktop. |
27 |
|
28 |
Another reason is if you want to use something like SELinux (which doesn't |
29 |
require a hardened profile) that gives you very fine grained control about |
30 |
access control but it's also very restrictive. I think it's only worth it for |
31 |
large networks with many users and different levels of access to sensitive |
32 |
data. |
33 |
|
34 |
I needed some of SELinux features but settled for using AppArmor in an unusual |
35 |
way to accomplish them because SELinux is too much trouble. All AppArmor |
36 |
really does is provide process isolation or sandboxing. If an attacker gains |
37 |
access through an exploint he will only be able to access the files that the |
38 |
exploited service has access to. I use it with a catch all profile that |
39 |
prevents execution from all world writeable and home directories, and access |
40 |
to ssh/pgp keys, keyrings, etc. This works nice for servers and desktops and |
41 |
is not too restrictive. And if I need to execute code from my home dir for |
42 |
development I can launch an unrestricted shell via sudo. I can leave my laptop |
43 |
unlocked with the wallet open (I use the kwallet pam module) and it will be |
44 |
really hard for you to get anything like ssh keys or passwords (I also have |
45 |
patches for kwallet so it requires a password to show saved passwords), but |
46 |
the programs that need them have access to them. |
47 |
|
48 |
|
49 |
-- |
50 |
Fernando Rodriguez |