Article title: trapping intruders in Linux (4 ). Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Author: Hong Xiaoye
Kernel test
Kernel testing requires more system resources. Once this function is enabled, a large amount of information is displayed on the screen, and we do not even touch the keyboard. You can monitor the following calls: open, setuid, setgid, chown, link, mkdir, chroot, and exit. I only tried a few commands (such as creating a directory ). I have to disable the "instant enable log" function, because the information is displayed too quickly on the screen, and I cannot see it clearly.
Kernel logs record your exact intent. So if you want to know some kernel-level details or want to monitor the performance of an application on the system, it is still very useful.
Practical application
In Linux, there are many available log files, but in comparison, using SNARE can be more detailed than using Syslog. Syslog focuses more on the kernel and processes (email, resident programs, printing and authentication), while SNARE also focuses on connections, file access, and file modifications. In addition, SNARE is more flexible when setting rules. We can use a general expression to create a filter, which is not allowed in syslog.
To prevent hackers from modifying log files and hiding their tracks after intrusion, we can build a secure and central log server. SNARE is ideal for this configuration. On the Audit Configuration screen, just a few clicks to complete the settings. You can select local logs, host logs on the network, or both, depending on the available disk space on the local host and the available disk space on the remote host.
SNARE is not a typical host-based IDS. In fact, many host-based IDS record operations on some key files in the system in the database. In this way, if you suspect that there is a problem, you can re-run the script to see the consequences of running the script. While SNARE focuses on real-time observation of whether files are modified, and when an event occurs, the system administrator can be notified by email. In SNARE, we can set the types of events that need to be notified to us (mainly based on different levels of Critical-, Warning-, Priority-, Information-, and Clear ), and the maximum number of information that can be transmitted per hour.
In addition, when an accident occurs, the audit log files can help Court investigations. Therefore, it is recommended to rename the monitoring File (note that if you rename the monitoring file, you need to reconfigure the startup file because it will look for the auditd process), that is, do not use audit. In this way, intruders will not be aware of the existence of the audit monitoring program. Afterwards, you will have a complete record of intruders.
Review and judicial requirements are another important reason for using such a log system. If you need C2-level logging or you need to retain the log details for legal reasons, SNARE can perform these tasks flexibly for you.
Advantages and disadvantages
It should be said that there are not many shortcomings of SNARE. First, SNARE will occupy a certain amount of CPU and memory, and this situation is especially serious when the system is busy. The solution is to make more detailed configuration for your audit. conf file. Secondly, it can only run in newer kernels, so if you are using a Linux version earlier than Red Hat 7.1, you will not be able to use it. Again, I found that it has high requirements on the hardware configuration of the system, so you need to test it before using it to see if your CPU has enough capacity to run it.
The advantages of these exhausting system administrators are obvious. The SNARE installation and configuration process is very simple, and once audit is set up. conf file, and after compiling and running the system, you can package the entire system, and then place the file in the corresponding location on other servers, you can use the same configuration. The most important thing is the biggest advantage: it is free of charge.
SNARE is an excellent tool provided by Intersect Alliance for the Linux community. It is configurable, portable, and easy to use. Unlike most host-based IDS systems, SNARE monitors specific ports and closes some threatening connections. It is a more comprehensive kernel logging tool. although it occupies some CPU, memory and disk resources, it implements the review function in a very simple way in Linux.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service