📄 00000017.htm
字号:
LIDS can protect the process whose parent is init(pid=1), you must seal the <BR>kernel with a specified option as below. <BR> <BR> <BR> # lidsadm -I -- +INIT_CHILDREN_LOCK <BR> <BR>4.3 Protect with capability. <BR> <BR>Capabilities are like privileges you can give a process. A root process has all <BR>the capabilities. But there exists a capabilities bounding set. In a normal <BR>kernel, when you remove a capability from the bounding set, nobody can ever <BR>use it again, until next reboot. (see <A HREF="http://www.netcom.com/">http://www.netcom.com/</A> spoon/lcap for <BR>the normal use). <BR> <BR>LIDS modifies this behavior to enable you to switch theses on and off, <BR>whenever you want. An access to the /proc/sys/kernel/cap_bset is <BR>trapped and raise a security alert. lidsadm performs all the job. <BR> <BR>You can list all capability in LIDS by running lidsadm, and you can see what <BR>the exactly meaning of each capability. <BR> <BR>We here discuss two of them, <BR> <BR>CAP_SYS_RAWIO <BR> <BR>With this capability on, we can allow ioperm/iopl and /dev/port access, allow <BR>/dev/mem and /dev/kmem acess and allow raw block devices (/dev/[sh]d??) <BR>acess <BR> <BR>When we disable this capability, we can make all process on the system has <BR>no any right to the raw device, such as runing lilo. <BR> <BR>But some process may want this capability to run, such as XF86_SVGA. In <BR>this case, we can let the program in the exception list when compile the <BR>kernel. <BR> <BR>CAP_NET_ADMIN <BR> <BR>This capability get the following ability, <BR> <BR> interface configuration <BR> administration of IP firewall, masquerading and accounting <BR> setting debug option on sockets <BR> modification of routing tables <BR> setting arbitrary process / process group ownership on sockets <BR> binding to any address for transparent proxying <BR> setting TOS (type of service) <BR> setting promiscuous mode <BR> clearing driver statistics <BR> multicasting <BR> read/write of device-specific registers <BR> <BR>For the security reason, we should disable this to disallow changing network <BR>configuration. When it disallow, the firewall rules will not allow to change. <BR> <BR>Choose the capability and sealing the kernel <BR> <BR>You should choose what capability you should disallow when sealing the <BR>kernel. Here we give an example. <BR> <BR>You may put it in a rc script (rc.local, /etc/init.d/lids, /etc/rc.d/init.d/lids, etc.) <BR>depending upon your distribution and the way you administrate your system. <BR>The command is, for example : <BR> <BR> <BR> lidsadm -I -- -CAP_SYS_MODULE -CAP_SYS_RAWIO -CAP_SYS_ADMIN \ <BR> -CAP_SYS_PTRACE -CAP_NET_ADMIN \ <BR> +LOCK_INIT_CHILDREN <BR> <BR>4.4 Network Security. <BR> <BR>LIDS provide some network security enhancement. <BR> <BR>network security with capability <BR> <BR>With the capability, we can enhance the network security. such as anti <BR>snifferring, can not bind to the port lower than 1024, can not change the <BR>firewall and routing rules. <BR> <BR>so, what I suggest is to view each capability meaning carefully. <BR> <BR>Scanner detector in kernel <BR> <BR>LIDS provide a scanner detector in kernel in order to detect who had scan <BR>your system. The scanner can detect half-open scan, normal scan etc. using <BR>tools like nmap,satan can be detected by the detector. <BR> <BR>It is useful when raw socket is disable. In this case, some user space <BR>detector based on snifferring will not work. And the detector does not use <BR>any socket, it will be more secure than a user space detector. <BR> <BR>If you want this feature, you should select it on when compile the kernel. <BR> <BR>4.5 Intrusion Responsive system. <BR> <BR>When LIDS detect some thing violate the rules defined, it can response to <BR>the action by following method. <BR> <BR>Logging the message <BR> <BR>When someone violate rules, lids_security_log will log a message the klogd, <BR>the logging also have the ability to anti_logging_flood. You can set it when <BR>compile the kernel. <BR> <BR>Logging the message via mail server <BR> <BR>Now, LIDS has a new feature to mail the message to your mail account. you <BR>can define the mail server IP, the out-coming mail address,etc, when compile <BR>the kernel. <BR> <BR>Shutdown the console <BR> <BR>When user violate the rules, the console will shutdown the user's console. <BR> <BR>5. Thanks. <BR> <BR>First of all, I want thank my friend, Kate lee , who always encourage me to <BR>write document of that, this document is dedicated to her. <BR> <BR>I also want to thank Philippe Biond and Christophe Long who give many help <BR>to the project. Without them, the project can not develop so well. <BR> <BR>Many thanks must go to all the LIDS users, without their contribution and <BR>discussion, LIDS can not has so many great ideas. <BR> <BR> <BR>-- <BR>Happy Hacking <BR> <BR>Linux Intrusion Detection System <A HREF="http://www.lids.org/">http://www.lids.org/</A> <BR> <BR>※ 来源:·BBS 水木清华站 smth.org·[FROM: 159.226.40.137] <BR><CENTER><H1>BBS水木清华站∶精华区</H1></CENTER></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -