Cybersecurity

DDoS Attacks Explained

Learn how distributed denial-of-service attacks overwhelm websites, the main attack types and how defenders respond.

Key takeaways

  • A DDoS attack exhausts some limited resource, such as bandwidth, connection tables or server processing, using traffic from many sources.
  • The main families are volumetric floods, protocol attacks and application-layer attacks, and each needs a different defense.
  • Reflection and amplification let attackers bounce traffic off other people's servers and make it larger on the way.
  • Large floods must be absorbed upstream by a provider or distributed network, because a filter at your own door can't help once the pipe is full.
  • Preparation means hiding origin addresses, arranging protection in advance and writing down who to call.

A distributed denial-of-service (DDoS) attack tries to make a website, game server or network unusable by sending it more work than it can handle, from many sources at once. Nothing has to be broken into. The target's capacity is simply used up, and real visitors get timeouts and error pages.

The word "distributed" is what makes it hard to stop. Traffic from one machine can be blocked with one rule. Traffic from tens of thousands of devices, each looking more or less like a visitor, has to be filtered somewhere with enough room to absorb it.

Which resource runs out

Every service has bottlenecks. An attacker looks for the cheapest one to exhaust.

  • Network bandwidth: the links into your server or office can carry only so many bits per second.
  • Packet processing: routers and firewalls can handle only so many packets per second, however small.
  • Connection state: servers, firewalls and load balancers keep a table of open connections, and tables fill.
  • Application resources: processor time, memory, database connections and calls to outside services.
  • Money: where capacity scales automatically, absorbing junk traffic can raise the bill sharply.

An outage can look the same from outside in all these cases. Telling them apart is the first diagnostic job, because adding web servers does nothing for a saturated network link.

The three main families

Volumetric attacks aim to fill the pipe with sheer traffic, often UDP packets, which require no connection setup.

Protocol attacks abuse how network protocols work to tie up equipment. The classic example is the SYN flood. A TCP connection begins with a SYN packet, a reply and a final acknowledgment. The attacker sends many SYNs and never finishes, so the server holds half-open connections. A technique called SYN cookies lets a server encode the needed information in its reply and store nothing until the handshake completes.

Application-layer attacks send requests that look legitimate but are expensive to answer, such as repeated searches, logins or report downloads. The volume may be modest. A few well-chosen requests per second from each of many bots can exhaust a database while network graphs look unremarkable.

Three families of denial-of-service traffic
Volumetric Goal: fill the network link Often large UDP floods Measured in bits per second Absorbed upstream Protocol Goal: exhaust connection handling SYN floods are the classic case Measured in packets per second Handled by hardened network gear Application Goal: exhaust servers or databases Requests look nearly normal Measured in requests per second Needs caching, limits and filtering Volumetric Goal: fill the network link Often large UDP floods Measured in bits per second Absorbed upstream Protocol Goal: exhaust connection handling SYN floods are the classic case Measured in packets per second Handled by hardened network gear Application Goal: exhaust servers or databases Requests look nearly normal Measured in requests per second Needs caching, limits and filtering

Attackers often combine them, or switch when one stops working.

Reflection and amplification

Some of the largest floods use other people's servers as unwitting megaphones. The attacker sends a small request to a public server but forges the source address to be the victim's. The server sends its answer to the victim. This is reflection.

If the answer is much bigger than the question, the attacker gets amplification: a modest outbound stream becomes a far larger inbound one at the target. UDP-based services are the usual vehicles, including misconfigured open DNS resolvers, old NTP monitoring features and exposed caching servers.

Reflection and amplification, in outline
Attacker's bots Open public server Victim Small request with the victim's address as sender 1 The source address is forged Much larger reply 2 Sent to an address that never asked No useful way to refuse at the source 3 The traffic has already filled the link Attacker's bots Open public server Victim Small request with the victim's address as sender 1 The source address is forged Much larger reply 2 Sent to an address that never asked No useful way to refuse at the source 3 The traffic has already filled the link

Two fixes lie outside the victim's control. Operators can stop offering services that amplify to strangers, and networks can drop outgoing packets whose source addresses don't belong to their customers, a practice described in BCP 38 (RFC 2827). Adoption is incomplete, so reflection persists.

Who does it and why

Motives vary: extortion with a demand for payment to stop, disputes among gamers, protest or political messaging, sabotage by a rival, or cover that distracts staff while another intrusion goes on. Attack capacity is rented through services that sometimes call themselves "stress testers". Using one against a system you aren't authorized to test is a crime in many countries.

The traffic usually comes from a botnet of compromised devices or rented servers. That means the attacking addresses mostly belong to other victims.

How to recognize an attack

A sudden traffic spike isn't automatically hostile. A news mention or a sale looks similar at first. Signs that point toward an attack include:

  • Many requests to one expensive page or endpoint with no matching increase in sales or sign-ups
  • Traffic with oddly uniform characteristics, such as identical headers or unusual regions for your audience
  • Floods of a protocol your service doesn't use
  • Half-open connections piling up
  • Users timing out while server processors sit idle, which suggests the network is full

Baselines make this much easier. Monitoring metrics and logs during normal weeks tells you what unusual looks like.

Defenses by layer

For volumetric floods you need capacity larger than the attack, which in practice means someone else's. Internet providers can filter or temporarily discard traffic, and DDoS protection services route traffic through large networks that scrub it. Many use anycast, where one IP address is announced from many locations so a flood is split among them.

For protocol attacks, enable SYN cookies, tune connection timeouts and make sure firewalls and load balancers aren't the weakest link.

For application attacks:

  • Cache whatever you can, ideally on a content delivery network, so most requests never reach your server.
  • Apply rate limits per client, key or session. A polite limit returns HTTP status 429, Too Many Requests.
  • Use a web application firewall to challenge or block suspicious patterns.
  • Make expensive features degrade gracefully: queue reports, require sign-in, or switch them off temporarily.
  • Put time limits on database queries and outbound calls.

Keep your origin address hidden. If a protection service fronts your site but attackers can reach the server directly, they will. Restrict the origin firewall to the provider's published ranges, and check old DNS records and mail headers that might reveal it.

Preparing a response plan

Write down, before you need it:

  1. How you will know: alerts on availability, traffic and error rates.
  2. Who decides, and how to reach them if your own systems are down.
  3. Your provider's and protection service's emergency contacts and account details.
  4. Which switches to flip: stricter filtering, static fallback pages, disabled features.
  5. How you will tell customers, using a status page hosted somewhere separate.
  6. What you will save: logs, timestamps and any extortion messages, for investigators.

Don't test by flooding yourself without written agreement from your hosting and network providers. Authorized load tests have rules.

Telling an attack from your own mistake

Plenty of incidents that look like attacks turn out to be self-inflicted. A mobile app that retries a failed request immediately, with no pause, can multiply traffic the moment your service slows down. A cache that expires all at once can send every visitor to the database together. A search engine or AI crawler walking an endless set of filter pages can occupy servers for hours.

The immediate relief is often similar: rate limits, caching and refusing the most expensive work. The lasting fix differs. Clients should wait longer after each failure and add some randomness, as described in retries and backoff; you can see the effect in the retry and backoff simulator. Well-behaved crawlers can be guided with robots rules, and badly behaved ones need limits at the edge.

Read the logs before choosing. Look at which addresses, user agents, paths and status codes dominate, and compare them with a normal day. Blocking whole countries or large providers in a panic can cut off real customers, so apply narrow rules first, watch their effect, and set a time to review or remove each one.

Afterward, hold a short review. Note which limit gave way first, which alert fired, how long it took to reach the right person and which temporary rules are still in place. Fix the weakest of those while the details are fresh.

For home users and gamers

If someone attacks your home connection, you can't filter it at your router once the link is saturated. Contact your internet provider. Restarting the modem may obtain a new address on some services. Avoid exposing your IP address to strangers, for example by using game platforms that relay connections and being cautious with unknown links in voice or chat apps.

Customers also deserve a plain account afterward: what was unavailable, for how long and what you are changing. Say only what you have confirmed, and avoid guessing in public about who was responsible.

Common questions

Does a DDoS attack mean data was stolen?

Not by itself. It affects availability. Because floods are sometimes used as a distraction, it is still worth checking logins and logs during and after one.

Can a small site be protected cheaply?

Often, to a useful degree. Many hosting and delivery providers include basic DDoS filtering and caching in entry-level plans. Terms and limits differ, so read what your provider commits to and what it does during a large attack, including whether it may take your site offline to protect other customers.

Written for 4Internet with AI writing tools and not reviewed line by line by a person. Check anything you rely on with the maker, provider or standard concerned. Report an error.

Keep reading

All 45 articles in Cybersecurity →

Latest news on this topic