05.02.2013 Aufrufe

Firewall Handbuch für LINUX 2.0 und 2.2 - zurück

Firewall Handbuch für LINUX 2.0 und 2.2 - zurück

Firewall Handbuch für LINUX 2.0 und 2.2 - zurück

MEHR ANZEIGEN
WENIGER ANZEIGEN

Sie wollen auch ein ePaper? Erhöhen Sie die Reichweite Ihrer Titel.

YUMPU macht aus Druck-PDFs automatisch weboptimierte ePaper, die Google liebt.

links. You will also have to correct any cgi-Skripts or shell Skripts that<br />

have incorrect pathnames in them;<br />

for example: #!/usr/local/bin/perl<br />

Now go aro<strong>und</strong> and put out fires.<br />

NOTE:<br />

It is possible to write C-utilities that will remote-shell to a trusting<br />

host [using getservbyname() and rcmd()] to get some time-critical<br />

information that you want to have accessible from your web tree. (Well,<br />

people use web-trees for all kinds of purposes). The utility can screen<br />

options to ensure that only 'safe' requests are sent to the trusting host.<br />

This avoids the necessity of keeping a small UNIX passwd file in your web<br />

tree (but requires a small services file in /wtree/etc/ if you aren't<br />

running NIS).<br />

NOTE:<br />

It is useful to make a shell wrapper that you can use to debug Skript<br />

probems in your web tree. Using exactly the same wrapper as above,<br />

substitute the following in the execl() function:<br />

execl( "/bin/bash","bash", (char *)0 );<br />

Note that it has to be setuid root.<br />

For example, if you call this chroot-ed shell: cr_shell, then on your web<br />

host, you can launch a chroot-ed shell to test Skripts (but do it in a<br />

sub-shell so that you don't destroy your environment):<br />

$ (export PATH=/bin; export HOME=/; /my/path/name/to/cr_shell /wtree )<br />

22.9 Kurzeinführung CHROOT() <strong>für</strong> WWW-Server<br />

Besonders wichtig ist es stets, WWW-Server, SQL Datenbanken, FTP-Server... so<br />

abzusichern, daß ein Angreifer im Falle eines Einbruchs möglichst wenig Rechte erhält,<br />

<strong>und</strong> in einem Unterverzeichnis gefangengehalten wird. Es ist selbstverständlich, daß die<br />

Dämonen mit möglichst wenig Rechten gestartet werden. Der Start eines Dämons in einer<br />

CHROOT() Umgebung sollte eigendlich selbstverständlich sein. Viele kommerzielle<br />

Server, wie z.B. der Netscape Enterprise Server, ROXEN Challenger <strong>und</strong> viele FTP<br />

Dämomen unterstützen diese Funktionalität von Hause aus, sind aber in vielen Fällen<br />

nicht automatisch aktiviert. Schauen Sie bitte zuerst im <strong>Handbuch</strong> nach, bevor Sie dieser<br />

Installationsanleitung folgen. Sie ist allgemeingültig auf alle Dämomen unter UNIX<br />

anwendbar <strong>und</strong> erhöht die Sicherheit eines Server enorm, ohne sich negativ auf die<br />

Performance auszuwirken. Sie sollten, nachdem Sie diese Übung hier absolviert haben,<br />

alle Serverdämomen unter UNIX so absichern.<br />

Every effort has been made on the part of the NCSA HTTPd Development Team to<br />

ensure a high level of security from break-ins through HTTPd. Occasionally,<br />

however, we miss one. For this reason, the server processes which handle<br />

outside connections are setuid to another user, such as nobody, who should<br />

have no permissions on the machine. This can be set using the User<br />

directive.<br />

For some, this might not be enough. There is something more that you can do,<br />

however. Most systems have available a command line chroot command. This<br />

command allows the system administrator (its usually restricted to the root<br />

user) to force a program to run <strong>und</strong>er a subset of the file system, without<br />

allowing access from it to any other parts of the file system. This is<br />

usually how anonymous ftp is handled, and more information about running<br />

programs chroot can be gleaned from manpages and such which correspond to<br />

setting up anonymous ftp.<br />

The general form of the command is:<br />

chroot directory command<br />

Erstellt von Doc Gonzo - http://kickme.to/plugins

Hurra! Ihre Datei wurde hochgeladen und ist bereit für die Veröffentlichung.

Erfolgreich gespeichert!

Leider ist etwas schief gelaufen!