[펌] 불 필요한 데몬 죽이기로 기본 보안 설정하기

  • authorbibaram
  • 02 October 2006, 10:03:43

부팅시 필요없는 데몬을 죽이는 것 만으로도 80% 이상의 방어를 할 수 있다.
대부분 해킹이 이루어 지는 방식이 80% 이상이 local 사용자이지만 그 이외나 local
사용자일지라도 보안이 약한 데몬이 떠 있지 않다면 그만큼 안전하다는 것이다.

이번 강좌에서는 필요없는 데몬을 부팅시 부터 죽이는 간단한 방법을 알아보겠다.

[root@woogi root]#ntsysv --level 345

//본인은 이 방법을 선호한다. 파란 화면이 뜰 것이다. 체크를 하느냐 안하느냐에 따라
서 실행 여부를 설정할 수 있다. 커널 화면에서도 설정이 가능하니 누구나 가능할 것이
다.


# 반드시 체크를 해야 하는 데몬들..

* network  // 굳이 설명하지 않아도... 리눅스는 네트웍이 없으면 아무짝에도 쓸모없
는 OS 이다. 요즘은 모든 것이 그렇겠지만...
* syslog  // log 를 남겨야...
* identd  // 확실치는 않지만 login 시 응답 목적으로 있어야 한다.
* ssh  // 본인은 반드시 띄운다. xinetd 는 사용하지 않기 때문에...


# 부가적으로 체크를 해야 하는 데몬들..

* xfs  // x-window 의 폰트데몬이다. x-window 를 사용한다면 반드시 필요. 서버라
면 필요없다.
* kudzu  // 부팅시 새로운 하드웨어를 검색한다. 설치 후 하드웨어를 추가할 일이 없
으면 죽여놓는다. 나중에 필요할때 다시 실행해서 띄우면 된다.
* crond  // cron 을 사용할 일이 없다면 꺼 놓는다.
* pcmcia  // 노트북이 아니라면 끈다.
* lpd  // 프린터 데몬이다. 프린터 쓸 일이 없다면 꺼 놓는다.
* sendmail // 메일 데몬이다. 본인의 생각으로는 굳이 취약점이 많은 sendmail 을
구동시킬 이유가 있을지 의문이다. 서버를 한동안 구동했었지만 sendmail은 구동하지
않았다. 이유는 요즘 무료 메일이 얼마나 많은가? 메일 서버가 반드시 필요할 경우 업데
이트를 필수적으로 해 주고 구동하기 바란다. 또한 분명한 사용방법으로 스템서버가 되
는 일이 없도록 하기 바란다.
* httpd  // 웹서버... 사용하지 않는다면 꺼 놓는다. 괜히 설치시 안내문을 띄울거
면 꺼 놓으라는 소리다.
* mysqld  // mysqld 서버. 필요없으면 끈다.
* xinetd (inetd) // 텔넷을 사용하거나 ftp를 inetd 데몬으로 돌릴경우 사용하는데
본인은 ftp는 standalone 으로 telnet 은 ssh 를 사용하므로 필요치 않았다.
* ftp  // proftpd 등등.. 필요하지 않다면 꺼 놓는다. standalone 으로 구동시 필
요할때만 구동시켜서 사용 할 수 있을 것이다.
* named  // 자신의 서버가 네임서버가 아니라면 끈다.
* dhcpd  // 유동 ip 라면 있어야 한다.
* iptables  //(ipchains) 굳이 띄울 필요 없다. 부팅 후 스크립트를 이용해서 띄우
는게 더 편리한 느낌이다.


# 필요없는 데몬들..

위에서 언급한 데몬이 아니면 모두 체크를 해제한다. 개인적으로 사용하면서 클러스터링
에서 사용하는 apmd 같은 데몬을 띄울 필요가 있는가?


// 위와 같이 만 해도 sniffing 에 의한 local 사용자가 아니라면 띄우는 데몬의 업데
이트만 제대로 해도 안전한 서버가 될 것이다.


[출처 oops.org > mini Lecture : http://oops.org/SERVICE/jsboard/read.php?table=jsboard_oopsFAQ&no=65&page=17]


대표적인 데몬 목록

영어라 머가 먼지.. 쩝..

amd - auto mount daemon
apmd - advanced power management
arpwatch - keeps track of ethernet/IP address pairings
atd - daemon for the "at" command
autofs - control script for amd
bootparamd - server that provides config data to diskless systems
crond - daemon that handles cron jobs, etc
dhcpd - Dynamic Host Configuration Protocol server
gated - gateway routing daemon
gpm - console mouse daemon
httpd - Apache web server
inet - general internet services (telnet, ftp, etc)
innd - INN news server
keytable - Loads keymap set by "kbdconfig" command
linuxconf - Installs any linuxconf policies
lpd - Print server
mars-nwe - NetWare-compatible file and print server
mcserv - server to allow users to use Midnight Commander remotely
named - DNS server
netfs - Mounts NFS/SMB/NCP mount points
network - Brings up all network interfaces configured to start at boot
nfs - NFS file server
nscd - Name Switch Cache Daemon -- useful for NIS, NIS+, etc
pcmcia - Starts PCMCIA services
portmap - RPC portmapper, used by servers such as NFS and NIS
postgresql - Starts Postgresql server
random - Seeds random number generator with previously-acquired entropy
routed - Performs automatic IP router table updates
rstatd - Server to allow users to retrieve performance metrics over a
LAN
rusersd - Allows users to locate other users anywhere on their network
rwalld - Allows remote users to display messages on all active terminals
on a system
rwhod - Allows users to get a list of all users logged into a machine
remotely
sendmail - Mail transport agent
smb - Samba (SMB server)
snmpd - Simple Network Management Protocol Daemon
sound - Saves and restores mixer settings
squid - Heirarchial web cache
syslog - System log daemon
xfs - X Font Server
xntpd - Network Time Protocol daemon
ypbind, yppasswdd, ypserv - various NIS services

Press ESC to close