Live data from Hacker News

Private Home Directories for Ubuntu 21.04

ubuntu.com

31–40 of 100 posts

Re: Private Home Directories for Ubuntu 21.04

#31

> This change now means that in the future if an attacker were to exploit some previously unknown vulnerability in a given system service that is running as a separate user, they would then not be able to access the data of any other user (both human or system service) on the system. If the attacker can already access arbitrary files on your box, I don't think simple unix permissions will save you

That's what they are for, though.

Re: Private Home Directories for Ubuntu 21.04

#32
post #13

Earlier quoted context omitted.

Install the “I don’t care about cookies” extension and stop suffering :)

Does that opt you in or out?

Don’t know, don’t care. The extension is called “I don’t care about cookies” not “automatic opt in/out” :)

Re: Private Home Directories for Ubuntu 21.04

#33

Earlier quoted context omitted.

So let's just set everything to 777? /s

All I am saying is that security is like onion layers, and unix permissions are the last layer probably. If the attacker penetrated through all the other layers, chances are that unix permissions will not save you.

Former pentester here. It was often the case that we were able to penetrate a box as a low-level user account, and the way we escalated was to search ~/.bash_history of an admin account.

chmod'ing the homedir would've prevented that. Unix happens to be pretty good about directory permissions.

Re: Private Home Directories for Ubuntu 21.04

#34
post #13

Earlier quoted context omitted.

Does that opt you in or out?

Don’t know, don’t care. The extension is called “I don’t care about cookies” not “automatic opt in/out” :)

OP indicated relatively strongly that they do care about being opted out, so I don't think anything that does not "stops them from suffering".

Re: Private Home Directories for Ubuntu 21.04

#35

Earlier quoted context omitted.

All I am saying is that security is like onion layers, and unix permissions are the last layer probably. If the attacker penetrated through all the other layers, chances are that unix permissions will not save you.

Former pentester here. It was often the case that we were able to penetrate a box as a low-level user account, and the way we escalated was to search ~/.bash_history of an admin account. chmod'ing the homedir would've prevented that. Unix happens to be pretty good about directory permissions.

The .bash_history file is mode 0600, regardless of directory permissions. Was this not always the case?

Re: Private Home Directories for Ubuntu 21.04

#37

Earlier quoted context omitted.

Former pentester here. It was often the case that we were able to penetrate a box as a low-level user account, and the way we escalated was to search ~/.bash_history of an admin account. chmod'ing the homedir would've prevented that. Unix happens to be pretty good about directory permissions.

The .bash_history file is mode 0600, regardless of directory permissions. Was this not always the case?

Heh. Looks like I’ve been out of the game longer than I thought. It’s suddenly been 6 years.

Welp. Yes, I misremembered that specific example.

Still, you’d be amazed how often people leave json credentials in their homedir that can be used to pivot to e.g. S3.

Re: Private Home Directories for Ubuntu 21.04

#38
post #27
post #7

This is just changing the default permissions on a home directory -not a more complicated encrypted/systemd setup I thought it would be.

I totally thought they were turning on homed with encryption by default, and was _super_ excited. I've been toying with doing that myself and having someone go first would be great.

If this encryption is still the same as it used to be a couple of years ago (encfs, IIRC), it's good they aren't. I stumbled on that multiple times before I learned not to turn this shit on. Every time on a new installation (which doesn't happen that often, so it's natural I was forgetting) I chose "do encrypt" option (because why not?), it was working perfectly fine long enough for me to settle in, and then one day I would be downloading some books via torrents, and torrent wouldn't proceed because of "filepath too long" (which was very confusing, because how could that be on Ext4, given it's perfectly fine for other peers, who must be on NTFS, most likely), and I had to spend time disabling encfs (I guess it wasn't that easy either: creating a new user was the quickest option) in order for things to start working.

So, finally I learned just not to use file-based encryption, except for minor stuff like dropbox directory.

Re: Private Home Directories for Ubuntu 21.04

#39

I remember a while ago, Ubuntu used encryptfs for home directories, but it was removed. Weird, because I thought it was a great idea

I’ve been using fscrypt to encrypt my home directory for over a year now and it seems to work fine: https://wiki.archlinux.org/index.php/Fscrypt

Re: Private Home Directories for Ubuntu 21.04

#40

Earlier quoted context omitted.

The .bash_history file is mode 0600, regardless of directory permissions. Was this not always the case?

Heh. Looks like I’ve been out of the game longer than I thought. It’s suddenly been 6 years. Welp. Yes, I misremembered that specific example. Still, you’d be amazed how often people leave json credentials in their homedir that can be used to pivot to e.g. S3.

The number of bash history files with accidental passwords pasted into them is quite high.

Another reason I don’t sudo and instead ssh

Post reply on HN