[ zurück ]
[ Inhalt ]
[ 1 ]
[ 2 ]
[ 3 ]
[ 4 ]
[ 5 ]
[ 6 ]
[ 7 ]
[ 8 ]
[ 9 ]
[ 10 ]
[ 11 ]
[ A ]
[ B ]
[ C ]
[ D ]
[ E ]
[ F ]
[ weiter ]
Anleitung zum Absichern von Debian
Kapitel 1 - Einleitung
Eines der schwierigsten Dinge beim Schreiben über Sicherheit ist, dass jeder
Fall einzigartig ist. Sie müssen zwei Dinge beachten: Die Gefahr aus der
Umgebung und das Bedürfnis an Sicherheit Ihrer Seite, Ihres Hosts oder Ihres
Netzwerkes. So unterscheiden sich zum Beispiel die Sicherheitsbedürfnisse
eines Heimanwenders komplett von den Sicherheitsbedürfnissen des Netzwerkes
einer Bank. Während die Hauptgefahr eines Heimanwenders von
"Script-Kiddies" ausgeht, muss sich das Netzwerk einer Bank um
direkte Angriffe sorgen. Zusätzlich muss eine Bank die Daten ihrer Kunden mit
mathematischer Präzision beschützen. Um es kurz zu machen: Jeder Nutzer muss
selbst zwischen Benutzerfreundlichkeit und Sicherheit/Paranoia abwägen.
Beachten Sie bitte, dass diese Anleitung nur Software-Themen behandelt. Die
beste Software der Welt kann Sie nicht schützen, wenn jemand direkten Zugang zu
Ihrem Rechner hat. Sie können ihn unter Ihren Schreibtisch stellen, oder Sie
können ihn in einen starken Bunker mit einer ganzen Armee davor stellen.
Trotzdem kann der Rechner unter Ihrem Schreibtisch weitaus sicherer sein - von
der Software-Seite aus gesehen - als der eingebunkerte, wenn Ihr
Schreibtisch-Rechner richtig konfiguriert und die Software des eingebunkerten
Rechners voller Sicherheitslöcher ist. Sie müssen beide Möglichkeiten
betrachten.
Dieses Dokument gibt Ihnen lediglich einen kleinen Überblick, was Sie tun
können, um die Sicherheit Ihres Debian GNU/Linux Systems zu erhöhen. Wenn Sie
bereits andere Dokumente über Sicherheit unter Linux gelesen haben, werden Sie
feststellen, dass es einige Überschneidungen geben wird. Wie auch immer:
Dieses Dokument versucht nicht, die ultimative Informationsquelle zu sein, es
versucht nur, die gleichen Informationen so zu adaptieren, dass sie gut auf ein
Debian GNU/Linux System passen. Unterschiedliche Distributionen erledigen
manche Dinge auf unterschiedliche Art (zum Beispiel den Aufruf von Daemons);
hier finden Sie Material, das zu Debians Prozeduren und Tools passt.
Wenn Sie Kommentare, Ergänzungen oder andere Anregungen haben, mailen Sie sie
bitte an Javier
Fernández-Sanguino
(oder jfs@debian.org) und sie werden in diese
Anleitung eingearbeitet werden.
Bei Fehlern in dieser Übersetzung wenden Sie sich bitte an Alexander Schmehl
1.1 Herunterladen dieser Anleitung
Sie können sich die neuste Version der "Anleitung zum Absichern von
Debian" beim Debian
Documentation Project
herunterladen oder anschauen. Sie können auch
gerne die unterschiedlichen Versionen im CVS
server
durchforsten.
Sie können außerdem eine reine Text-Version
von der Seite des Debian-Dokumentationsprojektes bekommen. Andere Formate, wie
zum Beispiel PDF, stehen (noch) nicht zur Verfügung, Sie können aber das Paket
harden-doc
, in
welchem das gleiche Dokument in den Formaten HTML, txt und PDF enthalten ist,
herunterladen und installieren.
1.2 Organisatorisches / Feedback
Nun kommt der offizielle Teil. Derzeit sind die meisten Teile dieser Anleitung
noch von mir (Alexander Reelsen) geschrieben, aber meiner Meinung nach sollte
dies nicht so bleiben. Ich wuchs mit freier Software auf und lebe mit ihr, sie
ist ein Teil meiner alltäglichen Arbeit und ich denke, auch von Ihrer. Ich
ermutige jedermann, mir Feedback, Tipps für Ergänzungen oder andere Vorschläge,
die Sie haben könnten, zuzuschicken.
Wenn Sie denken, dass Sie einen bestimmten Abschnitt oder Paragraphen besser
pflegen können, dann schreiben Sie dem Dokumenten-Betreuer, und Sie dürfen es
gerne erledigen. Insbesondere, wenn Sie eine Stelle finden, die mit
"FIXME" markiert wurde - was bedeutet, dass der Autor noch nicht die
Zeit hatte oder sich noch Wissen über das Thema aneignen muss - schicken Sie
ihm sofort eine Mail.
Für diese Anleitung ist es natürlich äußerts wichtig, dass sie weiter gepflegt
und auf dem neusten Stand gehalten wird. Auch Sie können Ihren Teil dazu
beitragen. Bitte unterstützen Sie uns.
1.3 Vorwissen
Die Installation von Debian GNU/Linux ist nicht wirklich schwer, und Sie
sollten in der Lage gewesen sein, es zu installieren. Wenn Ihnen andere Linux
Distributionen, Unixe oder die grundsätzliche Sicherheitskonzepte ein wenig
vertraut sind, wird es Ihnen leichter fallen, diese Anleitung zu verstehen, da
nicht auf jedes winzige Detail eingegangen werden kann (oder dies wäre ein Buch
geworden und keine Anleitung). Wenn Sie jedoch mit diesen Dingen noch nicht so
vertraut sind, sollten Sie vielleicht einen Blick in die Seien Sie wachsam gegenüber generellen
Sicherheitsproblemen!, Abschnitt 2.2 für tiefer gehende Informationen
werfen.
1.4 Dinge, die noch geschrieben werden müssen (FIXME/TODO)
-
Informationen, wie man unter Debian GNU/Linux eine Firewall aufsetzt. Der
Firewalls betreffende Abschnitt orientiert sich derzeit an Einzelplatz-Systemen
(die keine anderen System schützen müssen); auch auf das Testen des Setups
eingehen
-
Wie man eine Proxy-Firewall unter Debian GNU/Linux aufsetzt, unter der Angabe,
welche Pakete Proxy-Dienste anbieten (zum Beispiel
xfwp
,
xproxy
, ftp-proxy
, redir
,
smtpd
, nntp-cache
, dnrd
,
jftpgw
,oops
,pnsd
,
perdition
,transproxy
, tsocks
). Sollte
zu einer Anleitung mit weiteren Informationen verweisen. Erwähnenswert ist,
dass zorp (noch) nicht Teil von Debian ist, es aber eine Proxy-Firewall
ist (und der Programmautor Debian-Pakete zur Verfügung stellt.)
-
Informationen über die Service-Konfiguration mit file-rc
-
Alle Referenzen und URLs prüfen und die nicht mehr verfügbaren aktualisieren
oder entfernen
-
Informationen über möglichen Ersatz (unter Debian) für häufig eingesetzte
Server, die bei eingeschränktem Funktionsumfang nützlich sind. Beispiele:
-
lokaler lpr mit cups (Paket)?
-
apache mit dhttpd/thttpd/wn (tux?)
-
exim/sendmail mit ssmtpd/smtpd/postfix
-
Mehr Informationen über die sicherheitsrelevanten Patches des Kernels unter
Debian, einschließlich den unten aufgeführten und insbesondere wie man diese
Patches unter einem Debian-System benutzt.
-
Erkennung von Eindringlingen (Linux Intrusion Detection
lids-2.2.19
)
-
Linux Trustees (im Paket
trustees
)
-
kernel-patch-2.2.19-harden
-
Linux capabilities (im Paket
lcap
-
kernel-patch-freeswan,kernel-patch-int
-
Details, wie man unnötige Dienste übers Netzwerk deaktiviert (abgesehen von
inetd), dies ist teilweise Teil des Abhärtungsprozesses, könnte aber etwas
ausgeweitet werden.
-
Informationen über Passwort-Rotation, was sehr nah an grundsätzliche Regeln
(Policies) herankommt
-
Policies und die Aufklärung der Nutzer über die Policy
-
Mehr über tcpwrapper, und wrapper im allgemeinen?
-
hosts.equiv
und andere wichtige Sicherheitslöcher
-
mögliche Probleme bei der Dateifreigabe, wie Samba und NFS?
-
suidmanager/dpkg-statoverrides.
-
Abschalten der GNOME IP-Dinge.
-
Programme erwähnen, die Chroot-Gefängnisse (chroot jails) herstellen.
Compartment
und chrootuid
warten noch in incoming.
Einige andere (makejail, jailer) könnten ebenfalls eingeführt werden.
-
Mehr Informationen über Software zur Analyse von Protokoll-Dateien
(log-Dateien, logs; zum Beispiel
logcheck
und logcolorise).
-
"Fortgeschrittenes" Routing (Traffic-Regelungen sind
sicherheitsrelevant)
-
Zugang über SSH so einschränken, dass man nur bestimmte Kommandos ausführen
kann
-
Die Benutzung von dpkg-statoverride.
-
Sichere Wege, mehreren Nutzern den Zugriff auf CD-Brenner zu erlauben
-
Sichere Wege, um Sound zusammen mit einem Display über ein Netzwerk zu leiten
(so dass die Sounds einen X Clients über die Hardware eines X Servers
abgespielt werden)
-
Absichern von Web-Browsern
-
Aufsetzen von ftp über ssh
-
Die Benutzung von verschlüsselten Loopback-Dateisystemen
-
Verschlüsselung eines ganzen Dateisystems
-
Aufsetzen eines PKI für eine Organisation
-
LDAP benutzen zur Verwaltung der User. Es gibt ein HOWTO zu ldap+kerberos für
Debian auf www.bayour.com von Turbo Fredrikson.
1.5 Änderungsübersicht / Changelog / History
1.5.1 Version 2.5 (August 2002)
Changes by Javier Fernández-Sanguino Peña (me). There were many things waiting
on my inbox (as far back as february) to be included, so I'm going to tag this
the back from honeymoon release :)
-
Added some information on how to setup the Xscreensaver to lock automatically
the screen after the configured timeout.
-
Add a note related to the utilities you should not install in the system.
Including a note regarding Perl and why it cannot be easily removed in Debian.
The idea came after reading Intersect's documents regarding Linux hardening.
-
Added information on lvm and journaling filesystems, ext3 recommended. The
information there might be too generic, however.
-
Added a link to the online text version (check).
-
Added some more stuff to the information on firewalling the local system
triggered by a comment made by Hubert Chan in the mailing list.
-
Added more information on PAM limits and pointers to Kurt Seifried's documents
(related to a post by him to bugtraq on April 4th 2002 answering a person that
had ``discovered'' a vulnerability in Debian GNU/Linux related to resource
starvation)
-
As suggested by Julián Muñoz, provided more information on the default Debian
umask and what a user can access if he has been given a shell in the system
(scary, huh?)
-
Included a note in the BIOS password section due to a comment from from Andreas
Wohlfeld.
-
Included patches provided by Alfred E. Heggestad fixing many of the typos
still present in the document.
-
Added a pointer to the changelog in the Credits section since most people who
contribute are listed here (and not there)
-
Added a few more notes to the chattr section and a new section after
installation talking about system snapshots. Both ideas were contributed by
Kurt Pomeroy.
-
Added a new section after installation just to remember users to change the
boot-up sequence.
-
Added some more TODO items provided by Korn Andras.
-
Added a pointer to the NIST's guidelines on how to secure DNS provided by
Daniel Quinlan.
-
Added a small paragraph regarding Debian's SSL certificates infraestructure.
-
Added Daniel Quinlan's suggestions regarding ssh authentication and exim's
relay configuration.
-
Added more information regarding securing bind including changes suggested by
Daniel Quinlan and an appendix with a scrip to make some of the changes
commented on that section.
-
Added a pointer to another item regarding Bind chrooting (needs to be merged)
-
Added a one liner contributed by Cristian Ionescu-Idbohrn to retrieve packages
with tcpwrappers support.
-
Added a little bit more info on Debian's default PAM setup.
-
Included a FAQ question about using PAM to give services w/o shell accounts.
-
Moved two FAQ items to another section and added a new FAQ regarding attack
detection (and compromised systems).
-
Included information on how to setup a bridge firewall (including a sample
Appendix). Thanks go to Francois Bayar who sent me this on march.
-
Added a FAQ regarding the syslogd's MARK heartbeat from a
question answered by Noah Meyerhans and Alain Tesio on December 2001.
-
Included information on buffer overflow protection as well as some information
on kernel patches.
-
Added more information (and reorganised) the firewall section. Updated the
information regarding the iptables package and the firewall generators
available.
-
Reorganized the information regarding logchecking, moved logcheck information
from host intrusion detection to that section.
-
Added some information on how to prepare a static package for bind for
chrooting (untested).
-
Added a FAQ item (could be expanded with some of the recomendations from the
debian-security list regarding some specific servers/services).
-
Added some information on RPC services (and when it's necessary).
-
Added some more information on capabilities (and what lcap does). Is there any
good documentation on this? I haven't found any on my 2.4 kernel.
1.5.2 Version 2.4
Changes by Javier Fernández-Sanguino Peña.
-
Rewritten part of the BIOS section.
1.5.3 Version 2.3
Changes by Javier Fernández-Sanguino Peña.
-
Wrapped most file locations with the file tag.
-
Fixed typo noticed by Edi Stojicevi.
-
Slightly changed the remote audit tools section.
-
Added more information regarding printers and cups config file (taken from a
thread on debian-security).
-
Added a patch submitted by Jesus Climent regarding access of valid system users
to Proftpd when configured as anonymous server.
-
Small change on partition schemes for the special case of mail servers.
-
Added Hacking Linux Exposed to the books section.
-
Fixed directory typo noticed by Eduardo Pérez Ureta.
-
Fixed /etc/ssh typo in checklist noticed by Edi Stojicevi.
1.5.4 Version 2.3
Changes by Javier Fernández-Sanguino Peña.
-
Fixed location of dpkg conffile.
-
Remove Alexander from contact information.
-
Added alternate mail address.
-
Fixed Alexander mail address (even if commented out).
-
Fixed location of release keys (thanks to Pedro Zorzenon for pointing this
out).
1.5.5 Version 2.2
Changes by Javier Fernández-Sanguino Peña.
-
Fixed typos, thanks to Jamin W. Collins.
-
Added a reference to apt-extracttemplate manpage (documents the
APT::ExtractTemplate config).
-
Added section about restricted SSH. Information based on that posted by Mark
Janssen, Christian G. Warden and Emmanuel Lacour on the debian-security
mailing list.
-
Added information on anti-virus software.
-
Added a FAQ: su logs due to the cron running as root.
1.5.6 Version 2.1
Changes by Javier Fernández-Sanguino Peña.
-
Changed FIXME from lshell thanks to Oohara Yuuma.
-
Added package to sXid and removed comment since it *is* available.
-
Fixed a number of typos discovered by Oohara Yuuma.
-
ACID is now available in Debian (in the acidlab package) thanks to Oohara Yuuma
for noticing.
-
Fixed LinuxSecurity links (thanks to Dave Wreski for telling).
1.5.7 Version 2.0
Changes by Javier Fernández-Sanguino Peña. I wanted to change to 2.0 when all
the FIXMEs were, er, fixed but I run out of 1.9X numbers :(
-
Converted the HOWTO into a Manual (now I can properly say RTFM)
-
Added more information regarding tcp wrappers and Debian (now many services are
compiled with support for them so it's no longer an inetd issue).
-
Clarified the information on disabling services to make it more consistent (rpc
info still referred to update-rc.d)
-
Added small note on lprng.
-
Added some more info on compromised servers (still very rough)
-
Fixed typos reported by Mark Bucciarelli.
-
Added some more steps in password recovery to cover the cases when the admin
has set paranoid-mode=on.
-
Added some information to set paranoid-mode=on when login in console.
-
New paragraph to introduce service configuration.
-
Reorganised the After installation section so it is more broken up
into several issues and it's easier to read.
-
Written information on howto setup firewalls with the standard Debian 3.0 setup
(iptables package).
-
Small paragraph explaining why installing connected to the Internet is not a
good idea and how to avoid this using Debian tools.
-
Small paragraph on timely patching referencing to IEEE paper.
-
Appendix on how to setup a Debian snort box, based on what Vladimir sent to the
debian-security mailing list (September 3rd 2001)
-
Information on how logcheck is setup in Debian and how it can be used to setup
HIDS.
-
Information on user accounting and profile analysis.
-
Included apt.conf configuration for read-only /usr copied from Olaf
Meeuwissen's post to the debian-security mailing list
-
New section on VPN with some pointers and the packages available in Debian
(needs content on how to setup the VPNs and Debian-specific issues), based on
Jaroslaw Tabor's and Samuli Suonpaa's post to debian-security.
-
Small note regarding some programs to automatically build chroot jails
-
New FAQ item regarding identd based on a discussion in the debian-security
mailing list (February 2002, started by Johannes Weiss).
-
New FAQ item regarding inetd based on a discussion in the debian-security
mailing list (February 2002).
-
Introduced note on rcconf in the "disabling services" section.
-
Varied the approach regarding LKM, thanks to Philipe Gaspar
-
Added pointers to CERT documents and Counterpane resources
1.5.8 Version 1.99
Changes by Javier Fernández-Sanguino Peña.
-
Added a new FAQ item regarding time to fix security vulnerabilities.
-
Reorganised FAQ sections.
-
Started writing a section regarding firewalling in Debian GNU/Linux (could be
broadened a bit)
-
Fixed typos sent by Matt Kraai
-
Added information on whisker and nbtscan to the auditing section.
1.5.9 Version 1.98
Changes by Javier Fernández-Sanguino Peña.
-
Added a new section regarding auditing using Debian GNU/Linux.
-
Added info regarding finger daemon taken from the security mailing list.
1.5.10 Version 1.97
Changes by Javier Fernández-Sanguino Peña.
-
Fixed link for Linux Trustees
-
Fixed typos (patches from Oohara Yuuma and Pedro Zorzenon)
1.5.11 Version 1.96
Changes by Javier Fernández-Sanguino Peña.
-
Reorganized service installation and removal and added some new notes.
-
Added some notes regarding using integrity checkers as intrusion detection
tools.
-
Added a chapter regarding package signatures.
1.5.12 Version 1.95
Changes by Javier Fernández-Sanguino Peña.
-
Added notes regarding Squid security sent by Philipe Gaspar.
-
Fixed rootkit links thanks to Philipe Gaspar.
1.5.13 Version 1.94
Changes by Javier Fernández-Sanguino Peña.
-
Added some notes regarding Apache and Lpr/lpng.
-
Added some information regarding noexec and read-only partitions.
-
Rewritten how can users help in Debian security issues (FAQ item).
1.5.14 Version 1.93
Changes by Javier Fernández-Sanguino Peña.
-
Fixed location of mail program.
-
Added some new items to the FAQ.
1.5.15 Version 1.92
Changes by Javier Fernández-Sanguino Peña.
-
Added a small section on how Debian handles security
-
Clarified MD5 passwords (thanks to `rocky')
-
Added some more information regarding harden-X from Stephen van Egmond
-
Added some new items to the FAQ
1.5.16 Version 1.91
Changes by Javier Fernández-Sanguino Peña.
-
Added some forensics information sent by Yotam Rubin.
-
Added information on how to build a honeynet using Debian GNU/Linux.
-
Fixed more typos (thanks Yotam!)
1.5.17 Version 1.9
Changes by Javier Fernández-Sanguino Peña.
-
Added patch to fix misspellings and some new information (contributed by Yotam
Rubin)
-
Added some information on configuring Bind options to restrict access to the
DNS server.
-
Added information on how to automatically harden a Debian system (regarding the
harden package and bastille).
-
Removed some done TODOs and added some new ones.
1.5.18 Version 1.8
Changes by Javier Fernández-Sanguino Peña.
-
Added the default user/group list provided by Joey Hess to the debian-security
mailing list.
-
Added information on Proftp contributed by Emmanuel Lacour.
-
Recovered the checklist Appendix from Era Eriksson.
-
Added some new TODO items and removed other fixed ones.
-
Manually included Era's patches since they were not all included in the
previous version.
1.5.19 Version 1.7
Changes by Era Eriksson.
-
Typo fixes and wording changes
Changes by Javier Fernández-Sanguino Peña.
-
Minor changes to tags in order to keep on removing the tt tags and substitute
them for prgn/package tags.
1.5.20 Version 1.6
Changes by Javier Fernández-Sanguino Peña.
-
Added pointer to document as published in the DDP (should supersede the
original in the near future)
-
Started a mini-FAQ (should be expanded) with some questions recovered from my
mailbox.
-
Added general information to consider while securing.
-
Added a paragraph regarding local (incoming) mail delivery.
-
Added some pointers to more information.
-
Added information regarding the printing service.
-
Added a security hardening checklist.
-
Reorganized NIS and RPC information.
-
Added some notes taken while reading this document on my new Visor :)
-
Fixed some badly formatted lines.
-
Added a Genius/Paranoia idea contributed by Gaby Schilders.
1.5.21 Version 1.5
Changes by Josip Rodin and Javier Fernández-Sanguino Peña.
-
Added paragraphs related to BIND and some FIXMEs.
1.5.22 Version 1.4
-
Small setuid check paragraph
-
Found out how to use sgml2txt -f for the txt version
1.5.23 Version 1.3
-
Added a security update after installation paragraph
-
Added a proftpd paragraph
-
This time really wrote something about XDM, sorry for last time
1.5.24 Version 1.2
-
Lots of grammar corrections by James Treacy, new XDM paragraph
1.5.25 Version 1.1
-
Typo fixes, miscellaneous additions
1.5.26 Version 1.0
1.6 Danksagungen
-
Alexander Reelsen schrieb die ursprüngliche Version.
-
Javier Fernández-Sanguino fügte der Originalversion einiges an Informationen
hinzu.
-
Robert van der Meulen stellte den Abschnitt über Quota und viele seiner guten
Ideen zur Verfügung.
-
Ethan Benson korrigierte den PAM-Abschnitt und hatte einige gute Ideen.
-
Dariusz Puchalak trug Information zu verschiedenen Kapiteln bei.
-
Gaby Schilders trug eine nette Genius/Paranoia Idee bei.
-
Era Eriksson gab dem Ganzen an vielen Stellen den sprachlichen Feinschliff und
trug zur Checkliste im Anhang bei.
-
Philipe Gaspar schrieb die LKM-Informationen.
-
Yotam Rubin trug sowohl Korrekturen für viele Tippfehler bei als auch
Informationen über die Versionen von Bind und md5-Passwörter.
-
(Alexander) All den Leuten, die mich ermutigten dieses HOWTO zu schreiben (die
später zu einer ganzen Anleitung wurde).
-
Dem ganzen Debian-Projekt.
1.6.1 Danksagungen des Übersetzers
Auch der Übersetzer hat einigen Leuten zu danken [1], die mir Verbesserungen,
Korrekturen und Ratschläge geschickt haben:
Insbesondere sei den Mitglieder der debian-l10n-german
Mailingliste gedankt, für gute Ideen und fruchtbare Diskussionen.
VIELEN DANK! Ohne euch hätte ich zwar nur halb so viel Arbeit gehabt, aber
viel mehr Leute könnten sich jetzt über meine mangelhaften
Orthographiekenntnisse amüsieren!
[ zurück ]
[ Inhalt ]
[ 1 ]
[ 2 ]
[ 3 ]
[ 4 ]
[ 5 ]
[ 6 ]
[ 7 ]
[ 8 ]
[ 9 ]
[ 10 ]
[ 11 ]
[ A ]
[ B ]
[ C ]
[ D ]
[ E ]
[ F ]
[ weiter ]
Anleitung zum Absichern von Debian
2.5 (beta) 31 mayo 2004Sat, 17 Aug 2002 12:23:36 +0200
Javier Fernández-Sanguino Peña jfs@computer.org