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 10-25-2012, 11:44 AM   #1
sulekha
Member
 
Registered: Dec 2004
Location: India
Distribution: ubuntu 10.04 , centos 5.5 , Debian lenny, Freenas
Posts: 324

Rep: Reputation: 36
Question Linux partition security recommendations


Hi all,

I was viewing a computer security related tutorial , in it it is said that from a security standpoint partitions should be mounted as follows :-

http://s529.photobucket.com/albums/d...uth-users1.png

How correct/practical is this recommendation
 
Old 10-25-2012, 05:10 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by sulekha View Post
I was viewing a computer security related tutorial
Which one?

Quote:
Originally Posted by sulekha View Post
, in it it is said that from a security standpoint partitions should be mounted as follows :-
Did it say what that would protect against?
Did you check those mount options with what 'man mount' says?
Did you check which applications in /usr have setuid / setgid set (/home and /tmp shouldn't contain binaries anyway)?
Did it say what it would not protect against?

You can also temporarily mount the partitions to see what happens. This should not cause any permanent damage and to reset simply use "-o remount" w/o args:
Code:
grep dev/ /proc/mounts | while read dev mp fs args; do
 case "$mp" in 
  /usr|/tmp|/home) 
    mount $mp -o remount noexec,nosuid,$args
  ;; 
 esac; 
done
 
Old 10-25-2012, 06:14 PM   #3
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by unSpawn View Post
/home and /tmp shouldn't contain binaries anyway
So, where would you suggest an aspiring programmer should compile and execute his "Hello world" program if his personal machine is set up according to those recommendations?
 
Old 10-25-2012, 06:30 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by rknichols View Post
So, where would you suggest an aspiring programmer should compile and execute his "Hello world" program if his personal machine is set up according to those recommendations?
That's an exception but a good one to note, thanks. It's also the reason I suggested the OP test things before making it permanent.
 
Old 10-26-2012, 01:58 PM   #5
sulekha
Member
 
Registered: Dec 2004
Location: India
Distribution: ubuntu 10.04 , centos 5.5 , Debian lenny, Freenas
Posts: 324

Original Poster
Rep: Reputation: 36
[QUOTE=unSpawn;4814981]Which one?


It was a tutorial by bobby rogers
 
Old 10-26-2012, 02:20 PM   #6
JaseP
Senior Member
 
Registered: Jun 2002
Location: Eastern PA, USA
Distribution: K/Ubuntu 18.04-14.04, Scientific Linux 6.3-6.4, Android-x86, Pretty much all distros at one point...
Posts: 1,802

Rep: Reputation: 157Reputation: 157
Quote:
Originally Posted by rknichols View Post
So, where would you suggest an aspiring programmer should compile and execute his "Hello world" program if his personal machine is set up according to those recommendations?
The /home partition is also a reasonable place to put binaries from sources that you have ANY doubts about (i.e.: Games, binary apps for VOIP that want to turn you machine into a super node, etc.).

On multi-user systems, especially, many userland programs would reside in the user account directories of their users in /home.
 
Old 11-01-2012, 07:38 AM   #7
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
The noexec mount option is not a security feature. -- Michael K. Johnson

http://www.shmoo.com/mail/bugtraq/aug99/msg00342.html
 
Old 11-01-2012, 08:46 AM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by JaseP View Post
binaries from sources that you have ANY doubts about (..) On multi-user systems, especially, many userland programs would reside in the user account directories of their users in /home.
I'm not sure if you're aware of it but being able to introduce and run foreign binaries are what some classic compromises are made of. The fact its run from a users /home means nothing if that is all a local exploit needs. IMNSHO one simply should not run suspicious binaries unless using VM to sandbox it.

Apart from mount flags theres Trusted Path Execution, a feature unique to GRSecurity AFAIK, denying users one specific avenue to cause FOD.
 
  


Reply

Tags
partition flags



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
Recommendations for Camera Card for Security DVR (probably zoneminder) damgar Linux - Hardware 0 09-13-2010 09:30 PM
Recommendations for additional security on new Ubuntu-Server install running BIND? T1544E2048 Linux - Security 3 06-18-2007 10:02 PM
Security S/W Recommendations JonBL Linux - Security 3 10-13-2006 12:33 PM
need recommendations on security... another2 Linux - Security 3 11-11-2003 08:22 PM
partition recommendations otter Linux - Newbie 5 09-20-2002 08:38 AM

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

All times are GMT -5. The time now is 03:07 PM.

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