LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 06-04-2014, 09:13 AM   #1
Gullible Jones
Member
 
Registered: Apr 2011
Posts: 142

Rep: Reputation: 10
Separate user account for browser, chat, etc. Worth it?


Mandatory access control is a pain to set up, and not standardized across Linux distributions. But (ab)using ACLs and UNIX discretionary access controls to run programs under secondary accounts is easy, and safe enough on desktops (though not really suitable for multiuser systems).

My question is, how useful is it really?

X11 provides no GUI isolation. (Well, unless you use Xephyr or something, and that breaks copy/paste support.) A compromised browser or chat session can be barred filesystem access to your home directory, preventing it from snooping on your emails or grabbing your SSH keys, or stuff like that; but it can still keystrokes going into any X11 program. It's even possible to take control of an application via X11, from another application in the same X session (though IIRC this would be obvious to the user).

Is filesystem isolation based on separate user accounts actually worth anything, or is it just too easily circumvented on desktops to be of any use?
 
Old 06-04-2014, 09:43 AM   #2
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
Mandatory access with Apparmor is not a pain ... I have been using it and the predecessor (Subdomain) since 2001. I recommend it for browsers and other exposed programs. It comes with Suse and Ubuntu.

Another approach is qubes ( http://qubes-os.org/trac ).

Isolation of user accounts on a desktop probably suffers from these issues (in decreasing order as guessed unscientifically by me)

- X11 bugs http://www.phoronix.com/scan.php?pag...tem&px=MTU1NzA
- kernel bugs
- userspace bugs (other than X11)
- misconfiguration (place this higher if badly managed)
 
1 members found this post helpful.
Old 06-04-2014, 11:37 AM   #3
Gullible Jones
Member
 
Registered: Apr 2011
Posts: 142

Original Poster
Rep: Reputation: 10
Hmm, thanks. Just curious though, wouldn't AppArmor also suffer from X11 related and at least some kernel issues?

Userspace bugs might be possible to mitigate with a very minimal chroot sandbox, but that would be a pain.

Qubes would be interesting to try, unfortunately I don't have any suitable hardware available. Also, to be honest, I've only ever seen bad things and breakage from Xen.
 
Old 06-04-2014, 11:39 AM   #4
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
I use multiple users in X. Although I do it to isolate browser cache, game cache, and useful programming stuff into seperate /home/ locations. If I run low on drive space it's pretty easy to nuke an entertainment user to free up that space. I just need to copy the .Xauthority of the user who started X and set the DISPLAY and XAUTHORITY variables for each user after logging in. The variables can be set in the .bashrc.

It's not really that useful for security except for isolating your web browser from important data since cross user file contents cannot be read. But it's useful for space management and keeping task specific bash histories based on the user(s) for a given task. Of course all of this assumes that you're a heavy CLI type and have root access to copy the .Xauthority across users.
 
Old 06-04-2014, 11:44 AM   #5
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by Shadow_7 View Post
root access to copy the .Xauthority across users.
Or have access to both accounts and do
Code:
xauth list
xauth add ...paste-here...
 
1 members found this post helpful.
Old 06-04-2014, 11:45 AM   #6
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by Gullible Jones View Post
Hmm, thanks. Just curious though, wouldn't AppArmor also suffer from X11 related and at least some kernel issues?

... bad things and breakage from Xen.
You can Apparmor the Xorg too. I've found Xen ok - perhaps it was long ago you tried it.
 
Old 06-04-2014, 04:30 PM   #7
Gullible Jones
Member
 
Registered: Apr 2011
Posts: 142

Original Poster
Rep: Reputation: 10
AppArmor Xorg? Doesn't Xorg have to run with full root privileges, or has that changed recently thanks to KMS?

Re xauth, is there any reason I shouldn't use e.g.

Code:
xhost +si:local:my_secondary_account
which would supposedly only allow connections from that account?
 
Old 06-06-2014, 01:53 AM   #8
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by Gullible Jones View Post
AppArmor Xorg? Doesn't Xorg have to run with full root privileges,
Xorg is setuid root but also confined by Apparmor. Here's what I'm using although I don't know how useful it is in practice.

Code:
# Last Modified: Sun Mar 30 19:50:29 2014                                                                                              
#include <tunables/global>                                                                                                             
                                                                                                                                                  
/usr/bin/Xorg {                                                                                                                                               
  #include <abstractions/base>                                                                                                                                
  #include <abstractions/kde>                                                                                                                                               
                                                                                                                                                                            
                                                                                                                                                                            
  capability ipc_owner,                                                                                                                                                     
  capability setgid,                                                                                                                                                                          
  capability setuid,                                                                                                                                                                          
  capability sys_admin,                                                                                                                                                                       
  capability sys_rawio,                                                                                                                                                                       
                                                                                                                                                                                              
                                                                                                                                                                                              
  deny /bin/bash x,                                                                                                                                                                           
                                                                                                                                                                                                                   
  /dev/fb0 rw,                                                                                                                                                                                                     
  /dev/tty0 w,                                                                                                                                                                                                                               
  /dev/tty2 rw,                                                                                                                                                                                                                              
  /dev/vga_arbiter rw,                                                                                                                                                                                                                       
  /etc/X11/xorg.conf.d/ r,                                                                                                                                                                                                                   
  /etc/X11/xorg.conf.d/* r,                                                                                                                                                                                                                  
  /etc/udev/udev.conf r,                                                                                                                                                                                                                     
  /proc/*/cmdline r,                                                                                                                                                                                                                         
  /proc/cmdline r,                                                                                                                                                                                                                           
  /proc/mtrr w,                                                                                                                                                                                                                              
  /sys/bus/ r,                                                                                                                                                                                                                               
  /sys/bus/pci/devices/ r,                                                                                                                                                                                                                   
  /sys/class/ r,
  /sys/class/drm/ r,
  /sys/devices/** r,
  /usr/bin/Xorg mr,
  /usr/lib64/xorg/modules/drivers/ati_drv.so mr,
  /usr/lib64/xorg/modules/drivers/fbdev_drv.so mr,
  /usr/lib64/xorg/modules/drivers/modesetting_drv.so mr,
  /usr/lib64/xorg/modules/drivers/radeon_drv.so mr,
  /usr/lib64/xorg/modules/drivers/vesa_drv.so mr,
  /var/log/Xorg.0.log rw,
  /var/log/Xorg.0.log.old w,

}

Last edited by linosaurusroot; 06-06-2014 at 01:55 AM.
 
Old 06-06-2014, 07:16 AM   #9
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940
I use multiple accounts all the time. For example, all work for a particular (human) client will be done in a separate account. Responsibilities such as accounting or what-not are done in separate accounts. And, in many cases, the associated directories are not-at-all readable by others.

To me, it's the same common-sense that says, "give different people in your office different cubicles or offices." The presence of an ordinary, even-flimsy lock on a door, or of a safety on a gun, is often all that's needed to avoid real trouble.
 
Old 06-07-2014, 07:49 AM   #10
agentsteel
Member
 
Registered: Oct 2012
Location: France
Distribution: Debian / Fedora / Ubuntu / OpenBSD
Posts: 46

Rep: Reputation: Disabled
One solution would be to use a browser/chat/etc... virtual machine, isolated from the rest of your network.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Separate User Account for SSH ASJ925 Linux - Server 2 12-22-2011 06:50 PM
LXer: Chromium Browser talks with Telepathy (IM/Chat Library) to provide an in-browser IM client - LXer Syndicated Linux News 0 10-04-2011 10:00 AM
is it legitimate and allowed and can be done to make another user account set uid and gid to null 0 to make another root account with different name and possibly not damage the debian system creating and using that new account BenJoBoy Linux - Newbie 12 01-29-2006 10:02 AM
Separate Partitions for Separate User groups volvic Slackware - Installation 2 09-16-2004 02:42 AM
Can't access user account web page in browser - ~username DogTags Mandriva 6 01-29-2004 08:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 12:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration