[ назад ] [ Содержание ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ вперед ]

Securing Debian HOWTO
Глава 5 - Before the compromise


5.1 Follow Debian security updates

As soon as new security bugs are revealed in packages, debian maintainers and upstream authors generally patch them within days or even hours. After the bug is fixed, a new package is provided on http://security.debian.org. Put the following line in your sources.list and you will get security updates automatically, whenever you update your syste m.

deb http://security.debian.org/debian-security potato/updates main contrib non-free Most people, who don't live in a country which prohibits importing or using strong cryptography, should add this line as well: deb http://security.debian.org/debian-non-US stable/non-US main contrib non -free If you want, you can add the deb-src lines to apt as well. See the apt manpage for further details.


5.2 Exchange software

Вы должны попытаться избавиться от сетевых сервисов, которые отправляют и принимают пароли по сети открытым текстом, таких как FTP/Telnet/NIS/RPC. Автор всем советует использовать ssh вместо telnet и ftp. Также, по возможности не используйте NIS, Network Information Service, поскольку он разрешает совместное использование паролей. При неаккуратной настройке это очень небезопасно. Last, but not least, disable RPC wherever possible. Many security holes for this service are known and can be easily exploited. On the other hand NFS services are quite important in some networks, so find a balance of security and usability in a network. Most of the DDoS (distributed denial of service) attacks use rpc exploits to get into the system and act as a so called agent/handler. Запретить portmap проще простого. Есть два способа. Простейший способ для системы Debian состоит в том, чтобы дать команду update-rc.d portmap remove. This in fact removes every symlink relating to portmap in /etc/rc${runlevel}.d/ (you could do this manually yourself) . You could as well chmod 644 /etc/init.d/portmap, but that gives an error message when booting. You can also strip off the "start-stop-daemon" part in the /etc/init.d/portmap shell script. Имейте в виду, что переход с telnet на ssh с использованием других протоколов, передающих незакрытый текст, в ЛЮБОМ случае не увеличит вашу защиту! Лучше было бы удалить ftp, telnet, pop, imap, http и установить вместо них соответствующие им сервисы, поддерживающие шифрование. Вы должны подумать над переходом на SSL-версии этих сервисов: ftp-ssl, telnet-ssl, pop-ssl, https ... Большинство из вышеприведенных советов применимы к каждой системе Unix.


5.3 Полезные заплаты для ядра

Для ядра существуют заплатки, значительно повышающие защиту системы. Вот некоторые из них:

  • OpenWall patch by Solar Designer. Это полезный набор ограничений для ядра, таких как ограниченные ссылки, FIFOs в /tmp, ограниченный /proc, специальная обработка файловых дескрипторов, неисполняемый стек в пользовательской области и многое другое. Домашняя страница: http://www.openwall.com/linux/
  • LIDS - Linux intrusion detection system. Авторы: Huagang Xie & Philippe Biondi. Эта заплата облегчает процесс создания защищенной системы Linux. Вы можете вводить ограничения для каждого процесса, давать им права писать и читать файлы, или удалять, умолчания, возможность читать файлы. К тому же вы можете также установить возможности для определенных процессов. Несмотря на то, что это пока бета-версия, это отличный инструмент для администратора-параноика. Домашняя страница: http://www.lids.org
  • POSIX Access Control Lists (ACLs) for Linux. Эта заплата добавляет в ядро Linux списки управления доступом (access control lists), мощный метод для ограничения прав для файлов. Домашняя страница: http://acl.bestbits.at/
  • Linux trustees. This patch adds a decent advanced permissions system to your Linux kernel. All the objects are stored in the kernel memory, which allows fast lookup of all permissions. Домашняя страница: http://www.braysystems.com/linux/trustees.html
  • International kernel patch. This is a crypt-oriented kernel patch, therefore you have to pay attention to your local laws regarding the use of cryptography. It basically ad ds use of encrypted file systems. Домашняя страница: http://www.kerneli.org
  • SubDomain. A kernel extension to create a more secure and easier to setup chroot environment. You can specify the files needed for the chrooted service manually and do not have to compile the services statically. Домашняя страница: http://www.immunix.org/subdomain.html
  • UserIPAcct. This is not really a security related patch, but it allows you to create quotas for the traffic on your server per user. And you can fetch statistics about the user traffic. Домашняя страница: http://ramses.smeyers.be/useripacct

5.4 Genius/Paranoia Ideas, what you could do

This is probably the most unstable and funny section, since I hope that some of the "duh. that sounds crazy"-ideas might be realized. Following here you will find some - well, it depends on the point of view whether you say they are genius, paranoid, crazy or secure - ideas to increase your security rapidly but you will not come unscathed out of it.

  • Playing around with PAM. As said in the phrack 56 PAM article the nice thing with PAM is that "You are limited only by what you can think of." It is true. Imagine суперпользователь login only possible with fingerprint or eyescan or cryptocard (hmm, why did I do an OR conjunction and not AND here).
  • Fascist Logging. I would say everything we talked about logging above is "soft logging". If you want to perform real logging, get a printer with fanfold paper and log everything hard by printing on it. Sounds funny, but it's reliable and it cannot be removed.
  • CD distribution. This idea is very easy to realize and extremely secure. Create a hardened debian distribution, a damned good firewall, make an ISO of it and burn it on CD. Make it bootable. Upshot of all this is a ro whole distribution with about 600 MB space for services and the fact to make it impossible for intruders to get read write access on this system. Just make sure every data which should get written, gets written over the wires. Anyway, the intruder cannot change firewall rules, routing entries or start own daemons (he can, but reboot and he has to hack into your system again to change them).
  • Switch module capability off. When you disable the usage of kernel modules at kernel compile time many kernel based back doors are impossible to implement, since most of them are based on installing modified kernel modules.

[ назад ] [ Содержание ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ вперед ]

Securing Debian HOWTO

v1.1 14 February 2003Thu, 7 Dec 2000 19:10:13 +0100
Alexander Reelsen ar@rhwd.net
Перевод: Ильгиз Кальметьев, ilgiz@mail.rb.ru



Наш баннер
Вы можете установить наш баннер на своем сайте или блоге, скопировав этот код:
RSS новости