A DDoS attack, short for distributed denial of service, knocks a website or app offline by sending it more traffic than it can handle. The aim is to keep real users out.
DoS and DDoS
A denial-of-service (DoS) attack is any attempt to make a service unavailable to the people who should be able to use it. When the traffic comes from one machine, you can often stop it by blocking that machine's IP address.
A distributed attack comes from thousands of machines at once, usually a botnet: computers, routers and smart devices that malware has taken over and that the attacker controls remotely. There's no single address to block, and the attack traffic arrives mixed in with legitimate visitors.
What gets overwhelmed
Every server has limits on bandwidth, memory, open connections and CPU time. A DDoS attack aims at one of them.
- Volumetric attacks fill the network link with junk traffic, so legitimate packets can't get through.
- Protocol attacks use up connection state. A SYN flood starts thousands of TCP handshakes and never finishes them, so the server's table of half-open connections fills up.
- Application-layer attacks send requests that look normal, such as a search, but each one makes the server do expensive work. A modest number of these can bring down a site that would cope with a much larger flood of junk traffic.
A worked example
Picture a small online shop on one server that handles a few hundred requests a second at most. A botnet of 20,000 devices each requests the shop's search page once every two seconds. That's 10,000 requests a second, and every one runs a database query.
The database slows down, requests queue up and pages time out, so customers see errors. To the server, each bot looks like an ordinary shopper, which is why this kind of attack is hard to filter.
How sites defend themselves
Wondering how this was made? How we make these