What Is a DDoS Attack and How To Protect Yourself From It

Learn how distributed denial of service attacks work and ways to fight the most frequent internet threat.


Dec 15,2022

DataProt is supported by its audience. When you buy through links on our site, we may earn a commission. This, however, does not influence the evaluations in our reviews. Learn More.

Distributed denial of service attacks have become worryingly common these days. Bad actors, thanks to their networks of bots, have managed to take down entire computer systems, causing millions of dollars in damage to businesses by preventing them from providing services during this downtime.

What is a DDoS attack, how do DDoS attacks work, how harmful are they, and what are the ways to protect yourself and your computers? Keep reading to find out all about this cyber threat.

DDoS Attack Explained

As the name implies, a distributed denial of service attack is a type of cyber attack where the primary goal of the malicious actor is to render the target computer system unresponsive. The target can be a single website, an online service, a server, or even a whole network.

Attackers engaging in DDoS attacks are trying to overwhelm the target system by sending a massive influx of traffic, often through networks of infected computers called botnets. This is the “distributed” part of the name, as the attacks never come from a single computer.

It’s also the main difference between DDoS and DoS attacks, but also why targets of a DDoS attack have a much harder time protecting themselves. A traditional denial of service attack comes from a single source, which is easy to block, while distributed attacks often use thousands of computers and IP addresses.

How a DDoS Attack Works

To carry out a DDoS attack, bad actors require a network of infected devices to control remotely. Each such device is called a bot, and they all form a botnet, a zombie network of sorts. These networks aren’t created overnight. Usually, hackers spread out trojans, infecting thousands of machines in the process and preparing the terrain for remote access.

The attacker then directs their botnet to a single IP address or a web page. Each bot device then starts sending requests to that IP, causing the server to overload as it, after all, has finite resources. This then leads to the denial of service for legitimate users and, in some cases, crashes the server.

Who Is Behind DDoS Attacks?

This is an age-old question in the cybersecurity world. While the point of a DDoS attack is to disrupt normal operation of an online service, the reasoning behind it is multifaceted.

Some hackers do it in protest, driven by socio-political beliefs, as a way to make their ideologies visible to the world. Others may ultimately aim for financial gain through extortion of their targets. This is similar to a ransomware attack, in the sense that the attacker asks for money in return to stopping their malicious actions.

Then there are also the so-called “script kiddies” - people using pre-made scripts for the distributed denial of services and other attacks. Modern hacking tools are often sold as software-as-a-service (SaaS) and require very low computer knowledge to execute.

Whoever is behind the attacks, one thing’s for sure - their intentions are malicious, putting them into the black hat hacker category.

Identifying a DDoS Attack

Knowing how to quickly differentiate attack traffic from legitimate traffic is the key skill in DDoS mitigation and prevention. A traffic jam on your website at peak hours doesn’t necessarily mean you are under attack, but there certainly are telltale signs that something is afoot.

You need to look for odd patterns in your traffic - for example, if the traffic originates from a single IP range. As we’ve explained earlier when discussing DDoS meaning, the attacks are often distributed from a single network or territory, so you can expect either a single IP (masked traffic) or an IP range.

Similarly, a mass influx of users with a near-identical profile - the same browser version, device type, territory, or behavior on site - could also indicate you’re facing malicious traffic. This is especially true if all those users are connecting to a single web page, as DDoS methods typically involve brute-forcing a particular section of the system.

The last surefire sign you’re facing a DDoS attack is traffic spiking at unusual times, mostly outside your regular peak hours. Additionally, a pattern in such spikes is present, usually at set intervals, indicating that visits are automated.

DDoS Attack Types

Computer systems are complex, and different DDoS attack types target different layers. The OSI model of internet connections has seven layers, and depending on what hackers are trying to target with a DDoS, these attacks can be separated into three distinct categories:

1. Application layer attacks

Also called layer 7 attacks, referring to the 7th layer of the OSI Model, the application layer DDoS attacks target a single HTTP web page. By concentrating their attacks on a single HTTP request, bad actors can easily bring down a whole website without spending too much resources on their end.

2. Protocol attacks

These types of DDoS attacks are aimed at crashing down whole servers. Attackers are mostly targeting firewalls and routing protocols with them, overloading the servers with data packets that include fake IP addresses. 

This causes the server to initiate a TCP handshake with each request and wait for a response. Since there won’t be any response, the numerous time-outs on the server cause it to crash.

3. Volumetric attacks

The simplest of the bunch. These attacks work at sheer scale and target DNS servers. Hackers’ intention is to overflood the server with so many requests that they exhaust the allotted bandwidth.

DDoS Attack Protection and Prevention

As we’ve seen so far, the consequences of a DDoS attack can be rather severe. Your online service can become slow, unusable, and even go offline depending on how the attack was performed. That’s why it’s important to implement certain measures to prevent damage to your business.

Here are some of the ways you can mitigate DDoS attacks:

  1. Implement a web application firewall: Like home firewalls, the web application firewalls (WAF) serve as filters for the incoming traffic. They’re the best way to prevent an application layer attack and are highly configurable, making them also a great tool to have during an ongoing DDoS attack.
  2. Rate limiting: As we’ve previously discussed, DDoS attackers try to flood your server with requests. Therefore, to prevent DDoS attacks from taking down your web service, you can set hard limits on the number of requests the server will accept during one period of time.
  3. Minimizing the attack surface area: Attackers should have as few entry points as possible. Try to reduce the number of ports your web application uses and only allow protocols absolutely needed for the service to work. Consider using a Content Distribution Network (CDN) to offset your data or a load balancer to finetune what parts of your system have internet access.
  4. Upgrade your web server: One way to slow down volumetric DDoS attacks is to simply have more resources available. While this won’t protect you from the largest DDoS attack, it is a way to give your service a breather while you’re working on a solution.
  5. Consider a dedicated DDoS protection system: Several companies offer dedicated, out-of-the-box solutions for protection and DDoS mitigation. They’re especially handy for mitigating sophisticated DDoS attacks as they work on several layers, routing and re-balancing your traffic on the fly.

What To Do if You’re Attacked

Despite all the prevention measures you might’ve applied to your server, hackers can still try to take your service down by launching attacks on different parts of the system.

The most important thing to remember is not to panic if you notice an ongoing DDoS attack. Try to identify the IP range engaged in the attack and work on blocking those addresses to at least slow down the attackers.

A targeted DDoS attack will usually pinpoint a single resource on your server. Your goal, then, is to re-route that traffic. This method is called black hole routing, and it involves routing all traffic to the null route, causing it to ultimately drop from the network. While effective, the black hole isn’t ideal as it causes legitimate users to drop out, but at least it gives you time to reinforce your service.

If your hosting provider offers on-the-fly upgrades and similar services, it’s another way to provide service to legitimate users while you’re working on stopping the attackers. Scattering the traffic across the network is another solution, which is available if you’re running a larger online service.

Ultimately, you might have to take your service down while you work on upgrading it. Regular backups, software updates, and techniques discussed in this article should help you mitigate any incoming attacks and maybe even prevent any damage.

Final Thoughts

So, we’ve looked into the DDoS attack definition and presented some ways to prepare our servers and mitigate ongoing attacks. The act of DDoS-ing, unfortunately, isn’t a passing trend. With malicious software being distributed so widely and at a lower entry price, the risk of becoming a victim of a DDoS is higher than ever.

That’s why it’s important to learn methods of mitigating DDoS and differentiating between legitimate and malicious traffic. With a bit of know-how, your online service will stand against even the most stubborn hackers.

What does a DDoS attack do?

A typical DDoS attack aims to destabilize, slow down, and potentially take down the whole online service. The targets can be single websites or even whole servers, and the attacks can come from thousands of IP addresses at the same time.

Is a DDoS attack harmful?

Yes, a DDoS attack is very harmful, especially if running over a longer period. What is a DDoS attack capable of damaging, then? It renders your service unusable, can crash the whole server, and will cost your business a lot of money in the process. That’s why proper DDoS mitigation is something every cybersecurity professional needs to know by heart.

How long do DDoS attacks last?

The attacks can come in short bursts and last just a minute or so, or they can be much longer hacking campaigns that can last for days. It all depends on the complexity of the target and the hacker’s goal.

There are no comments yet
Leave your comment

Your email address will not be published.*