Adding per-subscriber anti-DDoS to an existing DPI platform

A per-subscriber mitigation, built on a DPI platform the business already had, that moved a subscriber under attack into a filtering container and back out again, automatically.

Challenge

A run of DDoS attacks hit ISPs, and some of their customers. Most were not aimed at the network. They were aimed at one subscriber, normally a gamer, and the traffic was enough to ruin that subscriber's service. Attacks under 300 Mb/s happened all the time. They were too small to trigger the bigger defences, but big enough to hurt the person on the receiving end. The business already had a deep packet inspection (DPI) platform. The aim was to add automatic mitigation to it, without affecting other customers. See deciding where DDoS protection was needed for the wider review.

Approach

I came up with the concept, designed it, tested it and handed it over to the team that ran it.

  • Removed the obvious traffic first. Before this work, filters had already been applied to the subscriber part of the network for NTP and for other easily identifiable malicious traffic. The ISP's own NTP service was allowed, and NTP traffic that arrived unsolicited was dropped. The NTP monlist command was handled by dropping the specific instructions and their responses. That left the harder cases.
  • Used the platform the business already had. It could already tell traffic types apart and see traffic for each subscriber, so it was a natural place to detect attack traffic.
  • Measured traffic per subscriber against their provisioned rate. The rate came from RADIUS, so the threshold followed each subscriber's service as it changed, with no manual upkeep. A DDoS against one customer shows up here before it is large enough to affect the network.
  • Moved a subscriber into a filtering container when they went over the threshold. The threshold allowed up to 150% of their provisioned rate. The container kept the effects of filtering and attack traffic away from the rest of the subscribers.
  • Targeted the top 10 DDoS traffic profiles. The container applied limits for each of those profiles, set at the top end so that legitimate use was not caught. The limits did not apply to the ISP's own services. It also dealt with traffic flowing in the wrong direction for the protocol.
  • Worked from the protocols. To know what could be done, and what the impact would be, I had to understand each protocol. NTP is a good example. A client polls a server at intervals and keeps several samples, so a delayed or dropped reply costs it one sample and it carries on. A rate limit, which delays or drops packets above a rate, is safe for NTP. The same limit on voice would be audible. The limit for each profile was chosen with that kind of difference in mind.
  • Moved them back out when traffic fell below 100%. The gap between 150% and 100% stopped a subscriber flapping in and out of the container.
  • Automated the whole cycle. Nobody had to move a subscriber in or out, so the first response did not wait for a person.
  • Left everyone else alone. Only the subscriber over the threshold was filtered, so other customers' traffic carried on unaffected.

Outcome

  • The business gained an automatic first response to the small, frequent attacks that the bigger defences never saw, built on a platform it already ran.
  • The impact on the subscriber under attack was greatly reduced. They could still browse and make phone calls while the attack was filtered.
  • Other customers saw no impact.

What I learned

  • A profile only covers the protocols it knows. Attacks that did not match the popular DDoS protocols needed finer control, which is why a separate blackhole system sat alongside it.