bringt das was?

Post Reply
Message
Author
rolgal
Posts: 34
Joined: 24. Apr 2004 16:03
Contact:

bringt das was?

#1 Post by rolgal »

hallo zusammen!

ich hatte folgende überlegung angestellt. wenn ich den usern alle leserechte ausserhalb ihres home verz. entziehe, dann könnte ein wurm o.ä. den ein user einfängt wenig über das system erfragen.

sehe ich das richtig oder ist da was falsch in der überlegung? wenn es richtig ist, wie kann ich das per shell machen?

ausserdem sollen allen user die x rechte entzogen werden für: halt, reboot, at, u.ä. kommandos.

mfg

rolgal

User avatar
heinrich
Posts: 219
Joined: 22. Sep 1999 11:22
Location: N49.137 E8.544

Re: bringt das was?

#2 Post by heinrich »

rolgal wrote:hallo zusammen!

ich hatte folgende überlegung angestellt. wenn ich den usern alle leserechte ausserhalb ihres home verz. entziehe, dann könnte ein wurm o.ä. den ein user einfängt wenig über das system erfragen.
Bringt IMHO nicht viel, weil:
a) es gibt nicht *so* viele Würmer für Unix im Allgemeinen und Linux im Speziellen
b) die meisten Würmer, zwecks Vermehrung, sich nur für die Emailadressen in deinem Adressbuch interessieren
c) die wirklich wichtigen Systemfiles die kritische Daten enhalten, eh alle Read-Only sind (oder sein sollten) oder von Benutzern erst gar nicht gelesen werden können
rolgal wrote: sehe ich das richtig oder ist da was falsch in der überlegung? wenn es richtig ist, wie kann ich das per shell machen?
vielleicht sowas wie:
find / -type f -print0 | xargs -0 chmod g-rwx
rolgal wrote: ausserdem sollen allen user die x rechte entzogen werden für: halt, reboot, at, u.ä. kommandos.
Solange die Anwender physikalischen Zugang zum System haben, ist es egal ob der User jetzt halt oder reboot eintippen kann. Schließlich kann er genausogut auch kurz den Ausschalter drücken oder das Netzkabel ziehen um einen Reboot zu erzwingen.
Red Hat Linux Customization Guide wrote: By default, /etc/inittab specifies that your system is set to shutdown and reboot the system in response to a [Ctrl]-[Alt]-[Del] key combination used at the console. If you would like to completely disable this ability, you will need to comment out the following line in /etc/inittab by putting a hash mark (#) in front of it:
--------
ca::ctrlaltdel:/sbin/shutdown -t3 -r now
--------
Alternatively, you may just want to allow certain non-root users the right to shutdown the system from the console using [Ctrl]-[Alt]-[Del]. You can restrict this privilege to certain users, by taking the following steps:

1. Add a -a option to the /etc/inittab line shown above, so that it reads:
--------
ca::ctrlaltdel:/sbin/shutdown -a -t3 -r now
--------
The -a flag tells shutdown to look for the /etc/shutdown.allow file, which you will create in the next step.

2. Create a file named shutdown.allow in /etc. The shutdown.allow file should list the usernames of any users who are allowed to shutdown the system using [Ctrl]-[Alt]-[Del]. The format of the /etc/shutdown.allow file is a list of usernames, one per line, like the following:
--------
stephen
jack
sophie
--------
According to this example shutdown.allow file, stephen, jack, and sophie are allowed to shutdown the system from the console using [Ctrl]-[Alt]-[Del]. When that key combination is used, the shutdown -a in /etc/inittab checks to see if any of the users in /etc/shutdown.allow (or root) are logged in on a virtual console. If one of them is, the shutdown of the system will continue; if not, an error message will be written to the system console instead.

For more information on shutdown.allow see the shutdown man page.
Red Hat Linux Customization Guide wrote: 28.3.5. Controlling Access to At and Batch

The /etc/at.allow and /etc/at.deny files can be used to restrict access to the at and batch commands. The format of both access control files is one username on each line. Whitespace is not permitted in either file. The at daemon (atd) does not have to be restarted if the access control files are modified. The access control files are read each time a user tries to execute the at or batch commands.

The root user can always execute at and batch commands, regardless of the access control files.

If the file at.allow exists, only users listed in it are allowed to use at or batch, and the at.deny file is ignored.

If at.allow does not exist, all users listed in at.deny are not allowed to use at or batch.
Linux-Admin-FAQ: 8.7 What are the biggest security holes in unix-like systems??
http://www.tigerteam.net/linuxgroup/lin ... html#ss8.7

Simply Linux
http://jetblackz.cjb.net/

Linux Security HOWTO
http://www.ibiblio.org/pub/Linux/docs/H ... HOWTO.html

UNIX Security Checklist
http://www.cert.org/tech_tips/usc20.html
It just works.

rolgal
Posts: 34
Joined: 24. Apr 2004 16:03
Contact:

#3 Post by rolgal »

hi heinrich!

danke für die antwort, ist absolut schlüssig.

jedenfalls ist für mich seit heute die utopie, dass viren und würmer unter linux kein problem darstellen vorbei.

ein scanner hat 2 infizierte dateien gefunden.

angeblich java!

das mit dem entziehen der rechte an systemkommandos war so gedacht: wenn so was ähnliches wie unter windows mit dem remote passiert, dann kann zumindest über den normalen user der rechner nicht rebootet oder sonst was werden.

mfg

rolgal

Post Reply