Providers that protect against DDoS attacks

Shielded

Lead Image © Igor Stevanovic, 123RF.com

Lead Image © Igor Stevanovic, 123RF.com

Article from Issue 206/2018
Author(s):

To ward off DDoS attacks, websites and services often seek the protection of Internet giants, such as Amazon, but you have other ways to protect your connectivity.

Distributed Denial of Service (DDoS) attacks are a plague with consequences just as horrific as ransomware attacks. As a blackmail scheme, a targeted attack, or a form of virtual vandalism, a swarm of attackers floods a website with an influx of requests in an attempt to shut it down. In the past, attackers often used reflection attacks, which involve an attacker sending several packets with the IP address of the victim as the sender to servers, which then acknowledge the requests with long answers. Because of the spoofed IP address, however, these massive responses go to the victim's address.

Even companies with Internet connectivity in the 10 to 40Gbps range can be powerless against attacks with several hundreds of gigabits per second bandwidth. An Internet search with the keywords "biggest DDoS" regularly shows new and increasing values for such attacks; the peak is currently around 1Tbps. With the Internet of Things, attackers can now choose platforms that are much easier to use; for example, hacked surveillance cameras, refrigerators, and cheap routers have been responsible for recent attacks. In this article, I look at methods, providers, and the costs of protecting your connectivity.

The DDoS Family

Roughly three categories of DDoS attacks can be distinguished. Flooding, as the method described above is known, occurs when a large group of computers send many large data packets to a victim, exhausting the bandwidth or loading the infrastructure to its full capacity from the excessive number of individual packets.

In a state exhaustion attack, firewalls or load balancers maintain a state for each connection and enter these states simultaneously in a table. Keeping many connection attempts open will quickly fill this table; Linux acknowledges full tables with the message nf_conntrack: table full, dropping packet. If a customer tries to access your website at this stage, their request is rejected. I am aware of cases in which an attack with a bandwidth of 2Mbps was enough to take down a network behind a firewall. SYN flooding does the same thing with the kernel's TCP connection table. In the course of the three-way handshake when establishing a connection, the attacker only sends the first packet, which means an entry has been created for the connection. Once the table is full, any subsequent connection attempts receive a Connection Refused response.

Finally, in sophisticated attacks against vulnerabilities in applications, attackers often don't even need the first D in DDoS. As a penetration tester, I once encountered a search function in a web portal that was implemented in Java and launched a gigabyte-scale subthread for each search. A script with 10 queries per second paralyzed the entire platform.

Building Floodwalls

The firewall is regarded as a standard tool in network defense. However, because it only uses the data of a single package as a criterion for allowing or rejecting connections – not the quantity and volume of packets – the firewall is easily negotiated. Better firewalls (as in the Linux kernel) provide features for controlling the bandwidth per connection, but the CPU handles these and not the network hardware.

A separate class of devices filters like a firewall, but as a function of the quantity of packets (total and per connection). Dedicated application-specific integrated circuits (ASICs) or field-programmable gate arrays (FPGAs) define rules in the hardware, but the devices are quite expensive. If you want to intercept attacks of 150Gbps, you are looking at a six-figure sum.

Unfortunately these approaches are of little help if the defender of the network is sitting at the narrow end of the pipe. Before the device starts to filter, the pipe is already blocked. Although the measures protect the infrastructure, neither the internal network nor the company website can be reached from outside.

Basically, the defense must be implemented in two steps: First, you need to identify an attack as such; second, you need to divert the attack traffic. You can detect attacks by reference to various parameters:

  • The quantity and size of packets per source and target port or IP address.
  • The quantity and size of packets within a single connection; because a connection usually comprises just one request and one response packet, 20 request packages are already suspicious.
  • The totals of these data.

Collecting Data

Only a few protocols and applications follow static rules. If up to 100 requests per hour is usually normal in a web store, that number might multiply quickly in the pre-Christmas period or during marketing campaigns. Regular shifts in values according to the time of day or day of week are also common. Statistics programs can discover what is normal and plot it against a timeline. If deviations from the norm then emerge, they can be classified as an attack.

Two approaches allow for collecting traffic data: (1) Installing a device inline (i.e., using two cables) that acts as a bridge between the inside and outside. The device then records all data in promiscuous mode and thus collects statistics. (2) Connecting such a device to the mirror port of a switch so that a failure does not interrupt the connection.

Another option is to use NetFlow [1], sFlow [2], or Ipfix (Internet Protocol flow information export) [3]. These protocols provide the sought-after connection data (with different levels of detail). Network components such as routers or switches send statistics to a receiver, which then carries out the statistical analysis and alerting.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • DDos Attack Map Charts Denial of Service

    A new web application helps users visualize distributed denial-of-service attacks.

  • ARP Spoofing

    Any user on a LAN can sniff and manipulate local traffic. ARP spoofing and poisoning techniques give an attacker an easy way in.

  • Backdoors

    Backdoors give attackers unrestricted access to a zombie system. If you plan to stop the bad guys from settling in, you’ll be interested in this analysis of the tools they might use for building a private entrance.

  • Honeynet

    Security-conscious admins can use a honeynet to monitor, log, and analyze intrusion techniques.

  • TCP Hijacking

    It is quite easy to take a TCP connection down using a RST attack, and this risk increases with applications that need long-term connections, such as VPNs, DNS zone transfers, and BGP. We’ll describe how a TCP attack can happen, and we’ll show you some simple techniques for protecting your network.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News