📄 00000017.htm
字号:
# cd linux_install_path <BR> # patch -p0 </lids_install_path/lids-0.9pre4-2.2.14.patch <BR> # cd linux <BR> # make dep clean <BR> # make bzImage <BR> # make modules <BR> # make modules_install <BR> <BR> 4. copy the bzImage to /boot/ and edit the /etc/lilo.conf <BR> <BR> 5 running /sbin/lilo to install the new kernel. <BR> <BR> # /sbin/lilo <BR> <BR> <BR> <BR>3.3 Configure the linux kernel <BR> <BR>Now, it it time to configure the linux kernel, turn the following option on, <BR> <BR> <BR> [*] Prompt for development and/or incomplete code/drivers <BR> [*] Sysctl support <BR> <BR> <BR> <BR> <BR> 4. configurate the linux kernel <BR> # cd linux <BR> # make menuconfig or make xconfig <BR> <BR> <BR> <BR>3.4 Initial the lids system <BR> <BR>Now before reboot, you must configurate you lids system to meet you <BR>security need. You can define protected files, protected process,etc. In the <BR>next chapter, we will show your the details about this topic. <BR> <BR>3.5 Reboot the system <BR> <BR>After your configurate your system, reboot your system. When lilo appear, <BR>select the lids enable kernel to load. After then, you enter the wonderful <BR>world of LIDS. <BR> <BR>3.6 Sealing the kernel. <BR> <BR>After your system boots up, do not forget to seal the kernel with lidsadm, you <BR>can put the command in latest line of /etc/rc.local. <BR> <BR> <BR> <BR> <BR> # /sbin/lidsadm -I -- -CAP_SYS_RAWIO -CAP_NET_ADMIN <BR> <BR> <BR> <BR>You can check the LIDS HOWTO to view the details meaning of each <BR>options of lidsadm. <BR> <BR>3.7 Online administration <BR> <BR>After you seal the kernel, your system is now protected by LIDS. You can do <BR>some test on it. If you want to change some configuration, such as modify <BR>the capability option, you can change your lids security level online by <BR>providing a password. <BR> <BR> <BR> <BR> <BR> # /sbin/lidsadm -S -- -LIDS <BR> <BR> <BR> <BR>4. Configurate LIDS <BR> <BR>In this chapter, we will show you how to configurate the lids. <BR> <BR>4.1 Protect you files. <BR> <BR>Firstly, you must determine which files you will protect. In most case, you <BR>may protect the system binary files and system configuration files, such as <BR>/usr/, /sbin/, /etc/, /var/log/. <BR> <BR>Secondly, you must decide the way to protect the files. LIDS provide 3 <BR>protection type: <BR> <BR> Read Only Files. The files marked with Read Only means that <BR> nobody can change the files. We can think that the following files are <BR> in this catalog, /etc/passwd, /bin/passwd, etc. <BR> <BR> USAGE: <BR> lidsadm -A -r filename_to_protect <BR> <BR> example, <BR> <BR> 1. to protect the whole /sbin/ as read-only. <BR> <BR> # /sbin/lidsadm -A -r /sbin/ <BR> <BR> 2. to protect /etc/passwd as read-only <BR> <BR> # /sbin/lidsadm -A -r /etc/passwd <BR> <BR> Append Only Files. Most of the append only files are system log <BR> files, such as /var/log/message ,/var/log/secure. The files can only <BR> open with append mode and can not truncate or modify its previous <BR> contents. <BR> <BR> USAGE: <BR> lidsadm -A -a filename_to_protect <BR> <BR> example, <BR> <BR> 1. to protect the system log files <BR> <BR> # /sbin/lidsadm -A -a /var/log/message <BR> # /sbin/lidsadm -A -a /var/log/secure <BR> <BR> 2. to protect the apache httpd log files <BR> <BR> # /sbin/lidsadm -A -a /etc/httpd/logs/ <BR> # /sbin/lidsadm -A -a /var/log/httpd/ <BR> <BR>Here is the example from LIDS HOWTO by Philippe Biond, <BR> <BR> lidsadm -Z <BR> lidsadm -A -r /boot <BR> lidsadm -A -r /vmlinuz <BR> lidsadm -A -r /lib <BR> lidsadm -A -r /root <BR> lidsadm -A -r /etc <BR> lidsadm -A -r /sbin <BR> lidsadm -A -r /usr/sbin <BR> lidsadm -A -r /bin <BR> lidsadm -A -r /usr/bin <BR> lidsadm -A -r /usr/lib <BR> lidsadm -A -a /var/log <BR> <BR>4.2 Protect your process. <BR> <BR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -