歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> Linux資訊 >> 更多Linux >> 保護SUN Solaris系統安全小竅門

保護SUN Solaris系統安全小竅門

日期:2017/2/27 14:26:57   编辑:更多Linux
  1.防止基於堆棧的緩沖區溢出     對/etc/system文件做備份。   #cp /etc/system /etc/system.backup     用vi編輯器編輯system文件,在system文件的最後加如下2行內容。   set noexec_user_stack=1   set noexec_user_stack_log=1     保存文件,退出編輯器。   2.關閉不用的服務     在inetd.conf中關閉不用的服務   首先復制/etc/inet/inetd.conf。   #cp /etc/inet/inetd.conf /etc/inet/inetd.conf.backup   然後用vi編輯器編輯inetd.conf文件,   對於需要注釋掉的服務在相應行開頭標記“#”字符即可,保留服務如代碼1所示。   注: FTP和Telnet服務在不需要時也可注釋掉。     在Services中關閉不用的服務   首先復制/etc/inet/services。   #cp /etc/inet/services /etc/inet/services.backup   然後用vi編輯器編輯Services文件,對於需要注釋掉的服務在相應行開頭標記“#”字符即可。可停用服務如代碼2所示。   在inetd.conf、services中進行修改後,找到inetd進程的ID號,用kill向其發送HUP信號進行刷新。舉例如下。   #ps -ef grep inetd   #kill -HUP 進程號   代碼1   ftp stream tcp nowait root /usr/sbin/in.ftpd in.ftpd  telnet stream tcp nowait root /usr/sbin/in.telnetd in.telnetd  talk dgram udp wait root /usr/sbin/in.                           talkd in.talkd  uUCp stream tcp nowait root /usr/sbin/in.                           uucpd in.uucpd  time stream tcp nowait root internal  time dgram udp wait root internal  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    代碼2     echo 7/tcp  echo 7/udp  discard 9/tcp sink null  discard 9/udp sink null  systat 11/tcp users  daytime 13/tcp  daytime 13/udp  netstat 15/tcp  chargen 19/tcp ttytst source  chargen 19/udp ttytst source  whois 43/tcp nicname # usually to sri-nic  tftp 69/udp  rje 77/tcp  finger 79/tcp  link 87/tcp ttylink  supdup 95/tcp  iso-tsap 102/tcp  x400 103/tcp # ISO Mail  x400-snd 104/tcp  csnet-ns 105/tcp  pop-2 109/tcp # Post Office   uucp-path 117/tcp    3.根據需要停用以下服務(如附表所示)     4.下載補丁程序並安裝     ---- 您可以訪問http://www.sunsolve.com站點,下載最新補丁程序並安裝,修復軟件錯誤和安全漏洞。




Copyright © Linux教程網 All Rights Reserved