Article Title: Measures to be taken after Linux Server intrusion. 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.
Although Linux Hosts are highly secure, what should users do if they encounter host server intrusion?
If you can, you should first disconnect the network cable. This is the safest way to disconnect the connection. Apart from protecting yourself, you may also protect other hosts in the same network segment.
After the intrusion, you will not be able to reinstall the host, but also analyze the causes and ways of the Host Intrusion. If you find out the problem, it may make your host more secure in the future, at the same time, it has also improved its Linux level. If you do not know how to find the intrusion path, the same thing may happen next time.
After intrusion, the following tasks are generally performed:
(1) analyze logon files
You can find the IP address of the other party and possible vulnerabilities by analyzing some major logon files. The common analysis files are:/var/log/messages and/var/log/secure. You can also use the last command to find the information of the last hacker.
(2) Check the services opened on the host
Many Linux administrators do not know how many services are available on their hosts. Each Service has vulnerabilities or enhanced or tested functions that should not be enabled. Find out the services on the system and check whether the services have vulnerabilities or missettings one by one.
(3) important data backup
The so-called important data is not the original data on Linux. For example,/etc/passwd,/etc/shadow, WWW webpage data,/home user files, do not back up data in the/etc/*,/usr/,/var, and other directories.
(4) system reinstallation
It is important to select a suitable package and do not install all the packages.
(5) patch Vulnerability
Update the system package immediately after installation. Then, set the firewall mechanism and disable unnecessary services before you plug in the network cable.
(6) shut down or uninstall unnecessary services. The fewer services that are started, the more likely the system will be infiltrated.
(7) data recovery and recovery service settings
The backup data should be copied back to the system and then the provided services should be made available again.
(8) Open the host to the network.