| < Day Day Up > |
12.3 Unix Denial-of-Service Attacks
Denial-of-service (DoS) attacks are
Pedants in computer security sometimes define DoS attacks as the "prevention or delay of authorized access to IT resources." However, many things can affect computers and networked systems; thus, a wide array of attacks is covered under denial-of-service.
This section covers local DoS attacks, relevant network attacks, and some distributed denial-of-service (DDos) attacks. While physically destroying computing resources
Standalone host DoS attacks can work through crashing applications or operating systems or through exhausting memory, disk, or CPU resources. They can be loosely categorized into resource exhausting (such as cat /dev/zero > /tmp/file ) and resource destruction (such as rm /etc/passwd ).
Network denial-of-service attacks attempt to incapacitate systems from the network via weaknesses of network protocols, networking code
DoS attacks are a nuisance. Sometimes, however, they can have a major effect on the target. DoS attacks are common on the Internet, and they comprise a growing part of hacker wars and hacktivism . 12.3.1 Local AttacksThis section covers local DoS attacks requiring the attacker's presence at the system console or a working remote shell connection (via telnet, ssh, rlogin, etc.). 12.3.1.1 Destruction of resources
Destruction of resources on Unix be accomplished by removing or overwriting critical system files and by crashing server processes and other applications. In addition, it may be possible to harm system hardware under the right circumstances, especially in Unix systems running on i386 architecture (Linux, BSD). However, most of these attacks require system privileges. For example, only root users can erase the password file. Root access enables the attacker to do much more damage, such as removing or reformatting all data on the system. As long as
Table 12-2. Local DoS resource attacks
Overall, these attacks are easy to prevent. However, their power should not be underestimated ”attackers who have
Buggy applications are known to crash without any malicious influence. However, with a little help from creative intruders, they do it much more willingly. Examples of this are plentiful; for example, using a device
12.3.1.2 Resource exhaustion
Rogue processes can
Classic resource attacks include the following examples:
12.3.1.3 Filling kernel data structuresAnother way to attack a Unix system is to fill the kernel data structures. The famous "fork bomb" (which can be written in many languages, from C to shell script) is an example of this strategy. Example 12-2 shows the shortest fork bomb known (in bash shell script). It's a fork bomb bash from http://www.voltronkru.com/library/fork.html. Recursive directory creation can be used to disable or slow down the system just as effectively. It uses up all available inodes (usually defined at kernel compile time). Example 12-2. An elegant shell script fork bomb
:( ){ ::&};:
int main( )
{
while(1)
{
fork( );
}
}
while : ;
mkdir .xxx
cd .xxx
done
Unix is often not configured by default to withstand resource starvation attacks. However, using resource limits (available in many Unix flavors), you can build an effective defense against users attempting to access all available resources. Disk quotas, memory limits, and file limits can go a long way toward preventing these attacks. It is worth noting, however, that these imposed limits most likely will not stop a resource allocation attack launched by root.
One last class of attack we'd like to mention here involves using the security measures of the system
12.3.2 Network Attacks
The field of network DoS is extremely rich and varied,
Network attacks can be loosely categorized as application crashing or resource consumption . However, in the case of network attacks, the attacker can consume both host and network resources. SYN flooding is an example of the former, while UDP or ICMP flooding is an example of the latter.
Consuming network resources simply involves flooding the network pipe; i.e., sending the victim so much extra traffic that normal traffic cannot get through. Any kind of IP packet can be used to fill the pipe. In addition, the source addresses of the packets are often spoofed. Sometimes third parties also add to the flood ”below, we consider reflexive DoS attacks in which the attacker sends traffic to some systems that in
Consuming host resources sometimes requires more ingenuity than just sending enough traffic. A SYN flood sent over a relatively slow line can bring the victim system to a crawl. Host resources can
Reassembling packet
The majority of DoS attacks are in the category of
remote OS
or
application crashing
. Application-level network DoS attacks could involve mail
In the rest of this section, we'll
Smurfing
saturates the network connection of a victim by recruiting the help of multiple machines willing to respond to a broadcast. To successfully smurf, one has to find a network willing to amplify the attack through misconfiguration. However, similar attacks are possible via any network system that can send a response larger than a request (i.e., can work as an amplifier). Acting as an
Even DNS queries are reported to cause denial-of-service conditions if the
The land attack , which is only of historic interest, consists of sending a packet with an identical source and destination. It used to crash many TCP/IP stacks, especially in early Windows versions.
IP fragmentation abuse is represented by the
teardrop attack
. Fragments with a corrupted offset sent by the attacker are used to crash Linux and Windows machines. A variety of DoS attacks with
The ping of death is the granddaddy of many network DoS attacks. The ping of death is simply an oversized ping packet (65,536 bytes instead of the normal 28 bytes) that used to crash very old Unix TCP stack implementations. A buffer overflow in the stack source code was to blame for this once lethal attack.
Many other DoS tools exist, from plain TCP flooders to more exotic ones such as
puke
(which sends ICMP unreachable packets, thus attempting to reset connections of the target host) and
jolt
(which
The ultimate creations of the point-to-point (i.e., nondistributed) DoS are the multiDoS kits such as
spike
,
7plagues
,
targa
, or
Network DoS attacks are by no means a thing of the past; there are still enough vulnerable machines deployed on the Internet for the attackers to have their share of "fun," and new exploits arise every day. 12.3.3 Distributed Denial-of-Service AttacksThe road to fame for distributed denial-of-service (DDoS) attacks started in 1999, when the first rumors of massive "attack zombie" deployments appeared. However, it was not until February 2000 that DDoS became a household word. On February 6 and 7 of 2000, floods of packets from multiple sources hit many popular sites such as Yahoo!, eBay, Amazon, and CNN. The floods overloaded the sites and they either became unavailable or slowed to a crawl.
Dave Dittrich from Washington University has
Trinoo
is an early DDoS kit that consists of a set of zombies that are deployed on multiple machines, usually hacked via some exploit. A master program controlled by an attacker commands the zombies. The master sends commands to the zombies in order to start flooding the victim with (in the case of Trinoo) UDP packets. Trinoo did not used source spoofing; thus, the
TFN (Tribal Flood Network) is a similar tool that can flood in UDP and TCP SYN (
TFN2K (a
Stacheldraht
(German for barbed wire) is another tool with features similar to TFN2K. Newer versions have added several more attacks, such as TCP ACK flood (only the ACK bit is set, so it might pass through a badly configured firewall), TCP NUL flag (no flags set), and improved ICMP flooding with smurf support. Also, the author has worked on quality control and the software has fewer bugs than its predecessors. It also uses spoofed packets in all protocols. However, by the time the tool appeared, the techniques to trace spoofed floods had been perfected and the zombies could be found quickly. Such tracing usually involves
Several other tools have been found as well. Shaft , for example, can send a mix of UDP, TCP SYN, and ICMP floods. Mstream is designed to send an ACK flood with spoofed addresses. The reason that ACK floods are more effective than, say, UDP floods is that they elicit multiple responses, thus increasing bandwidth consumption and stress on the host resources. 12.3.3.1 Coordinated and reflexive denial-of-service attacks
In addition to "regular" distributed DoS, there are two DoS variations called
coordinated denial of service
and
reflexive denial of service
. Coordinated DoS simply involves a great many people simultaneously doing something
In a reflexive DoS attack, a mild DoS flood is sent toward an intermediate victim with the spoofed source address of the true victim. The responses go straight to the victim. If several (or as many as available)
12.3.3.2 Application-level denial-of-service attacks
Unix applications can be used for denial-of-service attacks as well. Mail bombing, which originated on Unix, is still a threat. If someone decided to send a number of multimegabyte attachments to your
|
| < Day Day Up > |