Bluehost.com Web Hosting $6.95

hiding system directories

This is a discussion on hiding system directories within the Linux Security forums, part of the System Security and Security Related category; "jarqs" <jarqs@nospaminteria.pl> writes: >for now i figured it out to "chmod o-...


Go Back   Usenet Forums > System Security and Security Related > Linux Security

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 01-14-2007
Unruh
 
Posts: n/a
Default Re: hiding system directories

"jarqs" <jarqs@nospaminteria.pl> writes:

>for now i figured it out to "chmod o-r" on /home for better securing data
>stored by users (file names not seen by others).


>i've done it on system directories too - like /etc - of course it doesn't
>make sense for users who know a bit about linux system; helps with beginners
>maybe.


Sure it helps. It makes the system completely useless and thus the users
will abandon it and it will no longer bother you with security issues.

>if ssh would have something like a chroot option for a limited basic system
>operation - for educational purposes only or something like that - would be
>great.


Sure. It has. Give each user their own computer which noone else can log
onto. That is what you are suggesting for the chroot stuff, since ALL of
the programs, files, libraries has to be in the chroot jail. Ie, you need
to duplicate the whole system for each user. HOpe you have a lot of disk
space.



Reply With Quote
  #12 (permalink)  
Old 01-15-2007
jarqs
 
Posts: n/a
Default Re: hiding system directories


>>for now i figured it out to "chmod o-r" on /home for better securing data
>>stored by users (file names not seen by others).

>
>>i've done it on system directories too - like /etc - of course it doesn't
>>make sense for users who know a bit about linux system; helps with
>>beginners
>>maybe.

>
> Sure it helps. It makes the system completely useless and thus the users
> will abandon it and it will no longer bother you with security issues.


are you sure you know what are you talking about, or just had a bad day?


>>if ssh would have something like a chroot option for a limited basic
>>system
>>operation - for educational purposes only or something like that - would
>>be
>>great.

>
> Sure. It has. Give each user their own computer which noone else can log
> onto. That is what you are suggesting for the chroot stuff, since ALL of
> the programs, files, libraries has to be in the chroot jail. Ie, you need
> to duplicate the whole system for each user. HOpe you have a lot of disk
> space.


hope you'll never give your advice to anyone again.




Reply With Quote
  #13 (permalink)  
Old 01-16-2007
Kgabo Sepuru
 
Posts: n/a
Default Re: hiding system directories

chroot is a simpler solution to your problem:
* mount -obind : man mount - learn how binding works create a jail for
every user
* run ssh from with the chroot
e.g in bash
#our chroot for users will be /home/chrooted
mkdir -vp
/home/chrooted/{tmp,dev,var,proc,home,bin,etc,lib,usr/{bin,lib}}
for d in home lib proc dev var tmp; do
mount -v -obind /$d /home/chrooted/$d
done
#do the same for all allowed binaries or use something like busybox
then
chroot /home/chrooted

ps: you see, you must learn and know what you talking about.
Silah!
---
jarqs wrote:
> >>for now i figured it out to "chmod o-r" on /home for better securing data
> >>stored by users (file names not seen by others).

> >

blah blah blah...

Reply With Quote
  #14 (permalink)  
Old 01-16-2007
Douglas O'Neal
 
Posts: n/a
Default Re: hiding system directories

jarqs wrote:
>>> for now i figured it out to "chmod o-r" on /home for better securing data
>>> stored by users (file names not seen by others).
>>> i've done it on system directories too - like /etc - of course it doesn't
>>> make sense for users who know a bit about linux system; helps with
>>> beginners
>>> maybe.

>> Sure it helps. It makes the system completely useless and thus the users
>> will abandon it and it will no longer bother you with security issues.

>
> are you sure you know what are you talking about, or just had a bad day?


You might try it before you bash the poster. chmod o-w /etc will break
a bunch of things such as:
* /etc/profile is not available for sourcing
* /etc/passwd is not available for uid to username conversions
* cd ~user doesn't work - cannot look up the username
* name resolution doesn't work - /etc/hosts and /etc/resolv.conf
are not available
* At least under gentoo, gcc is not available - gcc-config depends
on /etc/init.d/functions.sh

>
>
>>> if ssh would have something like a chroot option for a limited basic
>>> system
>>> operation - for educational purposes only or something like that - would
>>> be
>>> great.

>> Sure. It has. Give each user their own computer which noone else can log
>> onto. That is what you are suggesting for the chroot stuff, since ALL of
>> the programs, files, libraries has to be in the chroot jail. Ie, you need
>> to duplicate the whole system for each user. HOpe you have a lot of disk
>> space.

>
> hope you'll never give your advice to anyone again.


Let's see...
You cannot browse the web, send email, or compile programs. Your shell
scripts from other systems no longer work. What are you planning on
using the system for that still is functional?

Doug
Reply With Quote
  #15 (permalink)  
Old 01-16-2007
jarqs
 
Posts: n/a
Default Re: hiding system directories

> You might try it before you bash the poster. chmod o-w /etc will break

when did i tell anything about chmod o-w ?...


Reply With Quote
  #16 (permalink)  
Old 01-16-2007
Douglas O'Neal
 
Posts: n/a
Default Re: hiding system directories

jarqs wrote:
>> You might try it before you bash the poster. chmod o-w /etc will break

>
> when did i tell anything about chmod o-w ?...
>
>


It should have been chmod o-r - sorry for the typo. The errors I listed
are for 'chmod o-r /etc'.

You did say that you've used chmod o-r on system directories like /etc
and that it works.
Reply With Quote
  #17 (permalink)  
Old 01-16-2007
patrick
 
Posts: n/a
Default Re: hiding system directories

In news:eoivhd$fln$1@scrotar.nss.udel.edu,
Douglas O'Neal <oneal@dbi.udel.edu> wrote:

> You might try it before you bash the poster. chmod o-w /etc will
> break
> a bunch of things such as:
> * /etc/profile is not available for sourcing
> * /etc/passwd is not available for uid to username conversions


Removing write perms for others on /etc does that? Are you on drugs or
something? That's the default system configuration:

$ ls -l / | grep etc
drwxr-xr-x 38 root root 4096 Dec 20 19:43 etc

Reply With Quote
  #18 (permalink)  
Old 01-16-2007
Douglas O'Neal
 
Posts: n/a
Default Re: hiding system directories

patrick wrote:
> In news:eoivhd$fln$1@scrotar.nss.udel.edu,
> Douglas O'Neal <oneal@dbi.udel.edu> wrote:
>
>> You might try it before you bash the poster. chmod o-w /etc will
>> break
>> a bunch of things such as:
>> * /etc/profile is not available for sourcing
>> * /etc/passwd is not available for uid to username conversions

>
> Removing write perms for others on /etc does that? Are you on drugs or
> something? That's the default system configuration:
>
> $ ls -l / | grep etc
> drwxr-xr-x 38 root root 4096 Dec 20 19:43 etc


That's a typo - the OP said he ran chmod o-r on system directories like
/etc and I was replying to that. I should never post before my second
cup of coffee.
Reply With Quote
  #19 (permalink)  
Old 02-22-2007
robert
 
Posts: n/a
Default Re: hiding system directories

Another aproach, if you have the resources availible.
Put a virtual machine inside the debian machine, and let the accounts
reside on it. This would keep all the server files isolated, and
the users would only see a second system.
Robert

On Thu, 11 Jan 2007 10:27:47 +0100, jarqs wrote:

> hi
>
> I need help in securing my debian server: i want group "users" not to have
> access (via shell) to system directories (like /etc). How to do it and not
> to have the system crashed :).
> thanks


Reply With Quote
  #20 (permalink)  
Old 03-03-2007
Nico
 
Posts: n/a
Default Re: hiding system directories

On 22 Feb, 09:30, robert <slackwarerob...@netscape.net> wrote:
> Another aproach, if you have the resources availible.
> Put a virtual machine inside the debian machine, and let the accounts
> reside on it. This would keep all the server files isolated, and
> the users would only see a second system.
> Robert


Goodness, this is an old thread now! But still valid.

I've been having good success with Xen lately, for doing fully
customized development environments and keeping developers (who need
root to modify packages and configurations) the heck out of the
server's system configurations, and to redeploy virtual servers from a
base image in a matter of minutes, rather than wasting time re-
installing entire hardware setups.


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 01:09 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0