簡易防駭設定法
Copyright 2001 OLS3,本講義僅供教育人員參考,任何引用,請先取得作者的同意.
Email: ols3@www.tnc.edu.tw
網站: http://www.ols3cgi.com 或 http://www.perl.ms 臥龍小三CGI天堂
一.注意
國內學術網路轄域內,各級學校的網路主機,經常被駭客(Cracker)入侵,(注意:Hacker 本指對某方面有深入研究之人,但 Hacker 絕不是駭客!),這些被入侵的學校主機,其本身對駭客而言,甚少有任何實質價值(無財無利),許多學校主事者對該校的主機亦有類似的想法,有些人竟誤以為主機內又沒什麼重要的檔案或機密,無所謂!殊不知,醉翁之意不在酒,這些駭客,大部份,只想將它拿來當作中繼的跳板,然後利用這些被入侵的主機,攻擊其心目中主要的目標,將來,萬一東窗事發,追查起來,頂多,只找到代罪羔羊而已,駭客即可全身而退!(那麼你說,屆時,帳會算在誰頭上呢?)
一旦了解這一層,您還可再輕忽貴校主機的安全嗎?
二.觀念
以下有幾個觀念,要先建立起來:
三.簡易防駭設定法

# # inetd.conf This file describes the services that will be available # through the INETD TCP/IP super server. To re-configure # the running INETD process, edit this file, then send the # INETD process a SIGHUP signal. # # Version: @(#)/etc/inetd.conf 3.10 05/27/93 # # Authors: Original taken from BSD UNIX 4.3/TAHOE. # Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> # # Modified for Debian Linux by Ian A. Murdock <imurdock@shell.portal.com> # # Modified for RHS Linux by Marc Ewing <marc@redhat.com> # # <service_name> <sock_type> <proto> <flags> <user> <server_path> <args> # # Echo, discard, daytime, and chargen are used primarily for testing. # # To re-read this file after changes, just do a 'killall -HUP inetd' # #echo stream tcp nowait root internal #echo dgram udp wait root internal #discard stream tcp nowait root internal #discard dgram udp wait root internal #daytime stream tcp nowait root internal #daytime dgram udp wait root internal #chargen stream tcp nowait root internal #chargen dgram udp wait root internal #time stream tcp nowait root internal #time dgram udp wait root internal # # These are standard services. # ftp stream tcp nowait root /usr/sbin/tcpd in.proftpd telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd # # Shell, login, exec, comsat and talk are BSD protocols. # #shell stream tcp nowait root /usr/sbin/tcpd in.rshd #login stream tcp nowait root /usr/sbin/tcpd in.rlogind #exec stream tcp nowait root /usr/sbin/tcpd in.rexecd #comsat dgram udp wait root /usr/sbin/tcpd in.comsat #talk dgram udp wait nobody.tty /usr/sbin/tcpd in.talkd #ntalk dgram udp wait nobody.tty /usr/sbin/tcpd in.ntalkd #dtalk stream tcp wait nobody.tty /usr/sbin/tcpd in.dtalkd # # Pop and imap mail services et al # #pop-2 stream tcp nowait root /usr/sbin/tcpd ipop2d pop-3 stream tcp nowait root /usr/sbin/tcpd ipop3d #imap stream tcp nowait root /usr/sbin/tcpd imapd # # The Internet UUCP service. # #uucp stream tcp nowait uucp /usr/sbin/tcpd /usr/lib/uucp/uucico -l # # Tftp service is provided primarily for booting. Most sites # run this only on machines acting as "boot servers." Do not uncomment # this unless you *need* it. # #tftp dgram udp wait root /usr/sbin/tcpd in.tftpd #bootps dgram udp wait root /usr/sbin/tcpd bootpd # # Finger, systat and netstat give out user information which may be # valuable to potential "system crackers." Many sites choose to disable # some or all of these services to improve security. # #finger stream tcp nowait nobody /usr/sbin/tcpd in.fingerd #cfinger stream tcp nowait root /usr/sbin/tcpd in.cfingerd #systat stream tcp nowait guest /usr/sbin/tcpd /bin/ps -auwwx #netstat stream tcp nowait guest /usr/sbin/tcpd /bin/netstat -f inet # # Authentication # #auth stream tcp wait root /usr/sbin/in.identd in.identd -e -o # # End of inetd.conf #linuxconf stream tcp wait root /bin/linuxconf linuxconf --http #swat stream tcp nowait.400 root /usr/sbin/swat swat
ftp stream tcp nowait root /usr/sbin/tcpd in.proftpd telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd pop-3 stream tcp nowait root /usr/sbin/tcpd ipop3d之後,記得要重新啟動 inetd :

四.維護工作
經常查看系統記錄檔,監控主機運作,了解使用者的行為,追蹤異常的現象,定期做好備份的工作.萬一不幸被入侵,務必要清查入侵來源,了解漏洞何在,然後清除後門,備份重要檔案,重新安裝系統.(必要時,請求中心協助)
五.不定期更新(update)系統
請務必查看 http://www.redhat.com/apps/support/updates.html,根據其說明,更新系統的版本,修補系統各種可能的漏洞.
六.隨時注意網路上的安全議題
台灣電腦網路危機處理中心 http://www.cert.org.tw/ ,有電子報可供訂閱.
網路上也有非常多的相關站台,這就要靠您自行去發掘啦!
(http://www.rootshell.com 這個站台,您不可不去喲!)
希望這份講義對台南縣中小學能有所助益....
Written by OLS3 All right reserved. 01/05/2000 pm 4:00