I have a question about my Super User post: How to protect my files against application? (Sandboxing?)

First, I'm not complaining, I'm just trying to understand.

Second, I already edited the question in an attempt to comply with the problem. See bellow for more details.

So, my question: what is too broad about my other question?

The core of the question is "how to deny access to certain files to an application" and everything else is supposed to explain it: what exactly I'm trying to solve, in which situations and environment I want to do it, what research I did, etc. - in other words, it's an attempt to make myself clear, not to ask something more. As I wrote, the core itself is "to block file access", nothing more.

I tried to reduce the question as much as possible, but I'm still interested in what did I wrong. I don't know whether you have access to edit history of my question (it's the oldest edit), so just in case, I copy the original question here;

Copy of my original question; it's for reference only and I'm not trying to ask this question in meta:

Short question

How can I protect my files against different application? By "protect" I mean against access, read, write and execute.

System

  • Xubuntu 64bit (currently 16.04, want to upgrade to 18.04)

More elaborated

Every day, I use lots of applications, both open source and binary blobs - Firefox, Thunderbird, Skype, Unity 3D (game engine, not DE), Dropbox, games, wine (!), and many, many more.

I do trust these applications to do what they advertise and that they don't do something malicious in an obvious way. But I don't trust them completely. A bug happens. One untrustworthy person added some backdoor. Anything can happen. And all of these applications have full access to all my files (contacts, KeePass database, photos, ...) and to network.

So if I trust them partially, I would like that they have only partial access to my data.

What kind of problem I want to solve?

I use ssh for deployment of some things. I use keys, because it's convenient and many articles claims that this is safer than using password. But the key is just stored on disk, just sitting there, available to every. single. application. and. game. I. use. Some say the key should be password protected - OK, but what prevents any application to upload it anyway and then someone just brute-force crack it?

So I focused on this - how can I protect the ssh key against any application which doesn't need it?

Later, I realized the problem is much bigger. I wanted to try Discord, but then I found it sets status to indicate which game I'm playing. By default. As I wrote earlier - I do trust the application, but only partially.

What solutions I found so far?

AppArmor - seems like what I'm looking for. But it works on root/system level, and I couldn't find a way how to use it in user space.

Sandboxing - on first look, it seems - again - like what I'm looking for. Except (almost) all answers to other people asking for this are: "it's unreliable, use virtualization instead".

Virtualization - one, or two applications, OK. But is standard PC able to handle about 10-20 virtual systems? Just running one Windows XP in VirtualBox (I have one piece of HW which is not working in Linux nor newer Windows) takes almost half of resources.

Separate user accounts on PC - it's really inconvenient. It would be nice, for example, to separate into at least "development/work" and "free time" accounts. But it's not much usable for me;

  • There are apps which I don't completely trust, but use in both cases (Firefox, Thunderbird, Skype, Discord, Dropbox, ...)
  • Double desktop configuration
  • I also use a laptop and Unison to sync data. This would make syncing two times more of drag.

I actually already use two accounts for a reason. It's already tedious and so I use one of them only marginally. (And I know that I can ctrl+alt+fX to go into different terminal and startx to start another desktop session.)

Last notes

I'm not naive. I know that any convenient solution (like sandboxing or AppArmor) is not 100% bulletproof. And especially after last year and cases like Spectre, Meltdown, Intel ME, etc. I'm fully aware that it's impossible to secure the PC completely. I know that only way how to protect against directed network attack is to unplug the cable (and with sound-based attacks, even that might not be enough), but my target is decrease the risk, not eliminate.

I mean, I would like to try new apps from time to time, like Discord, new game, etc. But I would like to keep it somehow separated from my ssh keys, from contact list in Thunderbird, from my photos, etc.

  • Reopened after your edit. – DavidPostill Sep 11 at 19:23
  • Thank you very much. I would like to ask - will you find some time for me to explain, what I'm doing wrong? I would like to understand, but, of course, I don't want to bother you too much. Or should I just leave? – Tom Sep 12 at 5:57
  • 1
  • Ok, thank you. Last question: what if I read that before asking and all parts (except the last one - 'last notes') of original question were carefully written (and many times rewritten) with these rules in mind? (The last part - 'last notes' - was meant as defense against answers like "nothing is 100% safe".) – Tom Sep 12 at 7:28
  • @DavidPostill I guess there is nothing else you can or want to do to help me. In that case, thank you for your support until now, I really appreciate it. Regrettably it seems like I'm unable to understand and/or correctly apply local rules, so I just wanted to thank for you guidance. – Tom Sep 14 at 9:22

You must log in to answer this question.

Browse other questions tagged .