What is a DoS Attack: Threats, Tactics, and Defenses.
Published: 2023-12-20 18:26:42

Denial of Service (DoS) attacks are a disruptive force capable of rendering vital online services and networks inaccessible. 

These attacks, designed to overwhelm a target's resources, can have profound consequences for businesses, governments, states, and individuals. Their threat is significantly elevated because the world is increasingly adopting digital technologies in different areas. 

As more people interact online, so do the risks, and security professionals, business leaders, and individuals must understand how DoS works to prevent the far-reaching consequences. 

This article will discuss DoS attacks, their threats, tactics used by attackers, and the defenses organizations can use to mitigate against them. 
## What is a Denial of Service (DoS) Attack?
A  DoS attack is a form of cyberattack designed to target and overwhelm a system, network, or service’s resources, such as bandwidth, processing power, or memory, with an excessive amount of traffic such that it becomes slow, unresponsive, or completely unusable by its users.


![DoS attack](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9g5xh1c8ng5juaoexi1b.png)

You can think of a DoS attack as a shopkeeper with such overwhelming customer requests simultaneously that they cannot serve even one customer.


When this happens, organizations get exposed to a variety of negative consequences, such as theft of assets, not to mention that such attacks usually require a lot of time and money to fix.

Ultimately, businesses stand to suffer significant reputational damage, legal liability, and even loss of customers if the DoS attack happens during peak hours.
## Types of DoS Attacks
There are many types of DoS attacks. Thanks to rapidly advancing technology, threat actors have created an almost mindboggling amount of DoS attack methods targeting a wide range of vulnerabilities. 
There are five main types of DoS attacks:
### Flooding Attacks

![Flood attacks](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e5rexeg9et5ic4g0vai7.jpg)

Flood attacks involve sending overwhelming packets to a server and oversaturating its capacity. This puts the server offline since it cannot handle the avalanche of packets.

When executing a flood attack, threat actors can target bandwidth consumption by overwhelming the network’s bandwidth or exhaust available resources ([resource exhaustion attack](https://nordvpn.com/cybersecurity/glossary/resource-exhaustion/), where they deplete server resources such as its capacity to handle connections).

There are several types of flood attacks:

- SYN Flood Attacks: This involves sending an overwhelming amount of SYN (Synchronize) requests to a server in packets. The request is designed to simulate the first stages of a TCP connection.
- UDP Flood Attack: It involves sending overwhelming UDP packets to a target server. While UDP packets are connectionless, they can still overwhelm the server resources and deprive legitimate users.
- ICMP Flood Attacks: This attack involves sending too many ICMP packets to a target server. Since ICMP packets are used for network diagnostics, they are not usually blocked by firewalls, thus making them an attractive method for attackers to overwhelm the server.
- Ping of Death: This attack uses an ICMP protocol but involves sending an oversized packet bigger than 64kb. This overloads the server and causes it to crash.

### Application Layer Attacks

![Application layer attacks](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gcoczmq6v9lcryhutof8.png)


In an application layer attack, the threat actors target vulnerabilities found in the Application Layer of the OSI model.
 
The [OSI model](https://www.forcepoint.com/cyber-edu/osi-model) is a communication framework that categorizes the functions of a communication system into 7 distinct layers. 

The application layer is responsible for processing user requests and generating responses. The attacks usually lead to data leaks, unauthorized access, and service disruptions. Below are some of the most common application layer attacks:

- HTTP Flood: An HTTP flood involves sending so many HTTP requests that it gets overwhelmed. This, in turn, prevents the server from responding to legitimate requests.
- SQL Injections: This involves introducing malicious code into an SQL query, which, when executed by the database server, can lead to data theft or unauthorized access.
- Cross-site Scripting (XSS):  This involves introducing malicious scripts into a web page or application, which is then executed by the victim’s browser when they visit that page or use the application. Malicious actors can then steal their victims' cookies, session tokens, and other sensitive information.
- Slowloris: This attack aims to keep as many connections to the target server as possible by slowly sending a small amount of data over each connection. This consumes resources and overwhelms the server’s capacity to handle new legitimate connections.
- Slowpost: This attack involves sending many HTTP POST requests to a target server, each with a small amount of data. This forces the server to remain open over long periods, which consumes resources and can eventually lead to a denial of service.
- Cross-site Forgery: With this attack, the threat actor gains access to a victim’s web browser and manipulates it to act on another website without the victim’s knowledge or consent. It is also known as session riding or one-click attack.
- Session Flood: A session flood involves creating many sessions with the target server and overwhelming it, thus preventing it from handling new sessions.
- Direct Traversal: This attack exploits vulnerabilities in web applications to access files and directories that are generally inaccessible to users. This can be used to steal sensitive information or to install malicious code on the target system.

### Resource Depletion Attacks


![Resource Depletion Attacks](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qyw5kmrcjb8nhnqu9l7o.png)

Resource Depletion Attacks are designed to exhaust critical resources within a targeted system or network. This leads to service disruptions, slowdowns, and even system crashes. 

During an attack, malicious actors exploit system vulnerabilities to allocate and manage resources, such as memory, CPU processing power, disk space, network connections, etc.

There are several types of Resource Depletion Attacks:

- Buffer Overflow: A buffer overflow involves adding more data to the buffer than its allocated memory space can hold. This has the potential to overwrite adjacent memory areas and eventually cause a crash, allowing an attacker to execute malicious code on the system.
- CPU exhaustion attacks: These attacks consume all of the target system's CPU resources. This can be done by sending many requests that require a lot of CPU time to process.
- Memory exhaustion attacks: These attacks consume the target system's memory resources. This can be done by sending many requests requiring a lot of memory.
- Bandwidth exhaustion attacks: These attacks consume the target system's bandwidth resources. This can be done by sending many requests that require a lot of bandwidth to process.

```
Ready to elevate your company's 
technical prowess and unlock a world of possibilities? 

Explore how my in-depth technical articles 
and specialized solutions can drive innovation 
and boost your business. 

Let's collaborate to achieve your tech goals!
```

### Protocol Attacks

![Protocol attacks](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fxzqr8eahubkqln6iwct.jpg)

Protocol attacks target weaknesses In the internet communications protocols, hence the name. They manipulate or abuse the rules and standards used to govern network communication between devices and systems. 

Protocol attacks can be very difficult to detect and prevent because they exploit vulnerabilities in the underlying protocols themselves. Attackers usually use protocol attacks to disrupt communication, compromise data integrity, and gain unauthorized access to systems.

Common types of protocol attacks include:

- Man-in-the-Middle (MitM) Attack: The attacker positions themselves between two communicating parties to intercept or alter their communication without their knowledge. [Man-in-the-middle attack](https://www.imperva.com/learn/application-security/man-in-the-middle-attack-mitm/)s usually occur at various protocol layers, such as the network and transport layers. 
- ARP Poisoning (ARP Spoofing): In an [Address Resolution Protocol](https://www.techtarget.com/searchnetworking/definition/Address-Resolution-Protocol-ARP) poisoning attack, a malicious actor sends false ARP messages to associate their MAC address with the IP address of a legitimate device. This usually allows them to redirect or intercept traffic at will. 
- DNS Spoofing and Cache Poisoning: In DNS spoofing, threat actors manipulate the DNS responses to redirect users to malicious websites or intercept their communication. 
- Cache Poisoning: This attack uses fraudulent data to corrupt the DNS cache. 
- Ping Flood: This attack involves sending an overwhelming amount of ICMP Echo Request (ping) packets to a target, potentially causing network congestion and service disruption.

SYN and UDP flood attacks are common forms of protocol attacks.

### DDoS Attacks


![DDoS attacks](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7i2u1w2kt7qjz16jb721.jpg)


Distributed Denial of Service (DDoS) attacks involve harnessing a network of compromised devices, collectively called a botnet, to orchestrate an attack. Unlike a DoS attack, where the attacker is using a single computer, the DDoS attack could involve hundreds or even thousands of computers at the same time to send unwanted traffic to a server. 

A central attacker or botnet controller controls these compromised devices, ranging from computers and servers to Internet of Things (IoT) devices. 

DDoS attacks come in various forms, including UDP floods, ICMP floods, SYN floods, and application-layer attacks, each targeting different aspects of a target's infrastructure.
 
The anatomy of a DDoS attack involves several key elements:

**Step 1:** Botnet Formation. The attacker compromises many devices, often through malware or vulnerabilities. These devices become part of the botnet without their owners' knowledge.
**Step 2:** Coordination. The attacker remotely controls the botnet, issuing commands to launch the attack at a specific target.
**Step 3:** Traffic Flood. The botnet generates massive traffic, overwhelming the target's resources, such as bandwidth, server capacity, or network connections.

## Motivations Behind DoS Attacks
There’s no one specific reason why organizations get DoS attacks. The reasons can vary widely and depend on the goals and objectives of the attackers. These goals and objectives also often determine the methods employed and the intensity of the attack. 

Here are some common reasons anyone would want to set up a DoS attack. 

- For Financial gain through ransom: Attackers can target an organization to demand a ransom. This form of extortion is usually associated with criminal groups. 
- For Ideological or political motivations: Attackers could target organizations, websites, or services that they perceive as representing opposing ideologies or that they believe have engaged in actions they disagree with. These kinds of attackers are usually called [hacktivists](https://www.sciencedirect.com/topics/computer-science/hacktivist). 
- To Gain Competitive Advantage: Businesses and individuals may launch DoS attacks against competitors to gain a competitive advantage. By disrupting their competitor’s services, they may attempt to divert customers to their own services. 
- Cyber warfare and espionage: Government agencies may use DoS attacks as Part of cyber warfare campaigns to disrupt the operations of rival nations. These attacks could be politically motivated and aimed at undermining the target country’s infrastructure and national security. 
- Vandalism and Malicious Intent: Some DoS attacks are carried out for no other reason than to cause chaos and disruption. Attackers could target systems, websites, and services for the thrill of causing harm and inconvenience. 
- Revenge and Grudges: Individuals may launch DoS attacks as revenge against individuals or organizations they feel have harmed or caused them harm.

```
Ready to elevate your company's 
technical prowess and unlock a world of possibilities? 

Explore how my in-depth technical articles 
and specialized solutions can drive innovation 
and boost your business. 

Let's collaborate to achieve your tech goals!
```


## Impact of DoS Attacks
DoS attacks are no joke; they can severely impact individuals, organizations, and online services. Usually, the impact and severity depend on various factors, such as the type and scale of the attack, the target’s resources and preparedness, and the attacker’s objectives. 

A DoS attack leading to a data breach could have legal and regulatory repercussions in fines, penalties, and lawsuits if the attack results in data breaches or service disruptions.  

This is especially true if organizations fail to maintain a robust security posture.

Here are some of the most impactful effects of DoS attacks. 
### 1. Financial losses due to downtime
Businesses stand to lose money due to DoS attacks. This is especially the case with organizations that serve millions of customers. Even an hour of downtown could see a significant loss of revenue. 
### 2. Reputational damage
It is also possible for organizations to suffer reputational damage in the event of a DoS attack. For example, financial institutions stand to suffer if people get the idea that their services are down. 
### 3. Legal and regulatory consequences
Many organizations that handle user data must follow specific regulations to protect their personal information. For example, health organizations are usually bound by authorities such as HIPAA and GDPR, which put stringent data protection requirements for user data. 

## Preventive Measures and Best Practices
Preventative measures and practices protect an organization's network against a DoS attack. They allow them to maintain a sound security posture and recover quickly during an incident. 

Below are a few measures and practices organizations can take to keep their networks free from DoS attacks. 

- Regular security audits and vulnerability assessments: These allow security teams to identify network, system, and application weaknesses. It is a proactive approach to security that makes it easier for organizations to discover and address potential vulnerabilities before attackers can exploit them. 
- Patch management and software updates: Organizations should strive to keep all software, including operating systems, web servers, and applications, updated with security patches. Malicious actors usually target outdated software to gain access to systems and cause damage. 
- Network segmentation and redundancy: Network segmentation involves dividing a network into separate segments or zones. This limits the potential impact of an attack by isolating an affected area. Redundancy, such as backup servers and failover mechanisms, helps maintain service availability during disruptions. 
- Incident response planning: Organizations can create a comprehensive incident response plan that outlines procedures for detecting, responding to, and recovering from security incidents such as DoS attacks. This includes assigning roles and responsibilities within an incident response team and conducting regular training and drills to ensure a swift and effective response. 
- Adopt Scalable Architecture: Organizations can design their network and infrastructure to be scalable to handle traffic spikes during attacks. This involves implementing strategies such as load balancing to distribute traffic across multiple servers or data centers. 
- Set up [Web Application Firewalls](https://www.cloudflare.com/learning/ddos/glossary/web-application-firewall-waf/) (WAFs): Web application firewalls protect web applications from DoS attacks by identifying and filtering out malicious traffic, including application layer attacks like SQL injection and XSS.

## Conclusion
The threat of Denial of Service (DoS) attacks cannot be underestimated. These disruptive cyberattacks, fueled by various motivations, have the potential to bring organizations, businesses, and individuals to their knees by rendering essential services unavailable.

What’s worse is that the tactics used by malicious actors grow as the digital landscape continues to evolve. Therefore, organizations and security teams looking to maintain their systems' continued availability and integrity should maintain vigilance, provide proper education, and put strategic defences in place to collectively stand resilient in the face of DoS attacks.