How to handle a Distributed Denial of Service (DDoS) attack
A Denial of Service (DoS) attack is an attempt to overload an infrastructure (component) to cause disruption of a service. This overload can lead to downtime of a system, disabling an organization to do its business.
There are two types of DoS attacks: those that target the resources on a (web) server - a resource depletion attack, and those that try to consume all network bandwidth to a server (bandwidth depletion attack).
To perform a DoS attack, an attacker fires off a large number of requests to a (web) server, either normal requests, of malformed requests. Because of the high load the server needs to process, or because the requests fill up the request queues (like the TCP WAIT queue), the server either crashes, or gets so slow that in effect it is not functioning anymore.
Because usually one attacking computer alone has not enough power or bandwidth available to bring down a server or a cluster of servers, most of the time a Distributed Denial of Service (DDoS) attack is used. In this case the attacker uses many (end user) computers to overload the server (cluster).
Since nowadays attackers are often professionally organized, they use groups of computers that are infected by malicious code, called botnets, to perform an attack remotely. These botnets are readily available and can be ordered online (if you know where to look for these services). It takes only fifty dollars to buy you a small DDoS attack on a defined target these days.
There is not much we can do about this kind of attack when it occurs. Shutting down the connection to the Internet is no solution, as this has the same result as the DoS attack intended in the first place. Some ways to handle a DDoS attack are:
- In some cases policies can be applied that isolate bad portions of traffic from normal traffic(for instance, dropping all malformed TCP packets). But in most cases, when a website is under attack, the attacker uses normal web traffic, which cannot be isolated from normal users of the web site.
- Rejecting incoming connections and data from a particular attacking machine only works when the amount of attacking machines is relatively limited – this does not work for a DDoS attack that has typically thousands of attacking machines. In this scenario traceback mechanisms could be used that localize the origin of an IP data stream and apply filtering it as close to the source as possible. This can only be imlemented by ISPs.
- Another option is to implement extensive redundancy/load balancing in the system, for instance by outscaling webservers to a web farm in the cloud. This only works if it is well planned before an attack occurs.
- Since often spoofed IP addresses are used for a DDoS attack, another preventive measure can be to implement an extra network router in the network path that authenticates the source address of an incoming connection.
- Running a script to terminate all connections coming from the same source IP address if the amount of connections is larger than ten can help getting the attack under control.
- Changing to an alternative server (with another IP address) might also help.
- The receiving server can implement some delay when a new connection is established, slowing down the rate of new connections coming in.
- Or the receiving router or load balancer implements throttling on incoming connections to the server to allow at least some connections to work normally, providing a degregated service to clients.
This entry was posted on Wednesday 17 April 2013