Article Title: how to defend against attacks on Linux servers hierarchically. 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.
With the expansion of Linux enterprise applications, a large number of network servers use the Linux operating system. The security and performance of Linux servers have received increasing attention. Here we list the depth of attacks against Linux servers in a hierarchical manner and propose different solutions.
Linux Server attacks are defined as an unauthorized action designed to impede, damage, weaken, or damage the security of Linux servers. The attack range can be from denial of service to completely endangering and damaging the Linux server. There are many types of Linux Server attacks. This article describes the attack depth in four levels.
Attack Level 1: DoS)
Due to the proliferation of DoS attack tools and the fact that the protocol layer defects cannot be changed for a short time, DoS has become the most widely spread and the most difficult way to prevent attacks.
Denial-of-Service (DoS) attacks include distributed denial-of-service (DoS) attacks, reflected distribution Denial-of-Service (DoS) attacks, DNS distribution Denial-of-Service (DoS) attacks, and FTP attacks. Most denial-of-service attacks cause relatively low-level risks. Even attacks that may cause system restart are only temporary problems. This type of attacks, unlike those that want to obtain network control, generally do not affect data security. However, Service Denial of Service (DoS) attacks may last for a long time and are very difficult.
So far, there is no absolute way to stop such attacks. However, this does not mean that we should stick to it. In addition to emphasizing the importance of personal hosts to strengthen protection against exploitation, it is very important to strengthen the management of servers. Be sure to install the verification software and filter function to check the real address of the source address of the message. In addition, you can take the following measures for Service Denial: disable unnecessary services, limit the number of Syn semi-connections opened at the same time, shorten the time out time of Syn semi-connections, and timely update system patches.
Attack Level 2: Local Users obtain the read and write permissions for unauthorized files
A local user is a user who has a password on any machine on the local network and thus has a directory on a drive. Whether the local user has obtained the read and write permissions of their unauthorized files constitutes a risk depends largely on the key of the accessed files. Arbitrary access to the temporary file directory (/tmp) by any local user is dangerous. It can potentially lay a path to the next level of attacks.
Level 2: hackers trick legitimate users into telling them confidential information or executing tasks. Sometimes hackers pretend that network administrators send emails to users, ask the user to give the password for the system upgrade.
Attacks initiated by local users generally start with remote logon. For Linux servers, the best way is to place all shell accounts on a single machine, that is, only one or more servers allocated with shell access are registered. This makes it easier to manage logs, access control, release protocols, and other potential security issues. The system that stores user CGI should also be differentiated. These machines should be isolated in specific network segments, that is, they should be surrounded by routers or network switches according to network configurations. Its topology structure should ensure that the hardware address spoofing cannot go beyond this segment.
Attack Level 3: remote users can read and write privileged files.
Level 3 attacks not only verify the existence of specific files, but also read and write these files. This is caused by the following vulnerabilities in Linux server configuration: remote users can execute a limited number of commands on the server without a valid account.
Password Attack is the primary attack method in level 3, and password damage is the most common attack method. Password cracking is a term used to describe the penetration of networks, systems, or resources to unlock password-protected resources when using or without tools. Users often ignore their passwords and the password policy is difficult to implement. Hackers have a variety of tools to defeat passwords protected by technology and society. It mainly includes Dictionary attack, Hybrid attack, and Brute force attack ). Once a hacker has a user's password, he has many privileges. Password conjecture means to manually enter the common password or get the password by compiling the original program. Some users choose simple passwords-such as birthdate, birthdate, and spouse name, but do not follow the rules of mixed use of letters and numbers. It does not take long for a hacker to guess a string of 8-character birthday data.
The best way to defend against Level 3 attacks is to strictly control access to privileges, that is, to use valid passwords.
◆ The password should be followed by a mix of letters, numbers, and cases (because Linux is case sensitive.
◆ Complexity is also added when special characters such as "#", "%", or "$" are used. For example, if you use the word "countbak" and add "# $" (countbak # $) to it, you have a valid password.
In computer systems, users generally do not directly deal with the kernel. There is also a layer of application layer as an interface between users and the kernel, however, this design can protect the kernel from being freely modified and tested by users, but it also brings security problems. Because the application layer is not completely trusted, in the operating system security function, the trusted path function is often provided [This is also the B2-level security requirement of the orpi book].
What is the concept of a trusted path [trusted path? As the name suggests, it is the implementation of such a function: to avoid the application layer, open a direct and trusted interaction channel between the user and the kernel. Is it really necessary that you have to use a trusted path to interact with the kernel during high-risk operations? Sorry to tell you: Yes indeed! Experienced System Administrators generally know how serious threats come from the network. Black Hats can use the Trojan horse [Trojan horse] to record your actions during login and other sensitive operations, and steal your valuable passwords.
You must be very impressed with the "ctrl + alt + del" Three-Key sequence. In the DOS era, we used it to quickly restart the machine and call it "Hot Boot". In the WINDOWS 9X era, we use it to view the process, but you may not have noticed that after the transition from Windows 9x to WINNT, our PC also runs the WIN2000/XP of the NT kernel, in fact, the function of the "ctrl + alt + del" three keys has changed slightly. In its official documents, Microsoft, press ctrl + alt + del to SAS [Secure Attention Sequence] and list it as a component of the security function-trusted path. in linux, similar Key sequence is also available.
Safety Note Key in Linux environment-SAK [Secure Attention Key]. This SAK is a group of keys. On our common X86 platform, it is "alt + sysrq + k ", in the case of table store (or table store), the SAK is "alt + STOP + k". The SAK is disabled by default. You need to use the echo "1">/proc/sys/kernel/sysrq command to activate it, of course, you can also write it into the login script, so you don't have to worry about it every time. If you are interested in SAK implementation, refer to linux/drivers/char/sysrq. c and linux/drivers/char/tty_io.c: do_SAK
The SAK sequence key is actually a group called "magic sysrq key", and "magic sysrq key" has some special keys, just like SAK, they all use "alt + sysrq +... "format, where... some special letters, such as "I", can be exchanged in the MAGIC SYSRQ KEY DOCUMENTATION v1.32 manual, the behavior represented by "alt + sysrq + I" is "Send a SIGKILL to all processes, wait t for init. "means to send a kill signal to all processes except init; now let's look
[1] [2] Next page