What is a DDoS attack?
A Denial of Service (DoS) attack is a malicious attempt to affect the availability of a targeted system, such as a website or application, to legitimate end users. Typically, attackers generate large volumes of packets or requests ultimately overwhelming the target system. In case of a Distributed Denial of Service (DDoS) attack, and the attacker uses multiple compromised or controlled sources to generate the attack.
In general, DDoS attacks can be segregated by which layer of the Open Systems Interconnection (OSI) model they attack. They are most common at the Network (layer 3), Transport (Layer 4), Presentation (Layer 6) and Application (Layer 7) Layers.
# | Layer | Application | Description | Vector Example |
7 | Application | Data | Network process to application | HTTP floods, DNS query floods |
6 | Presentation | Data | Data representation and encryption | SSL abuse |
5 | Session | Data | Interhost communication | N/A |
4 | Transport | Segments | End-to-end connections and reliability | SYN floods |
3 | Network | Packets | Path determination and logical addressing | UDP reflection attacks |
2 | Datalinks | Frames | Physical addressing | N/A |
1 | Physical | Bits | Media, signal, and binary transmission | N/A |
DDOS Attack Classification
While thinking about mitigation techniques against these attacks, it is useful to group them as Infrastructure layer (Layers 3 and 4) and Application Layer (Layer 6 and 7) attacks.
Application Layer Attacks
Infrastructure Layer Attacks
DDoS Protection Techniques
Reduce Attack Surface Area
One of the first techniques to mitigate DDoS attacks is to minimize the surface area that can be attacked thereby limiting the options for attackers and allowing you to build protections in a single place. We want to ensure that we do not expose our application or resources to ports, protocols or applications from where they do not expect any communication. Thus, minimizing the possible points of attack and letting us concentrate our mitigation efforts. In some cases, you can do this by placing your computation resources behind Content Distribution Networks (CDNs) or Load Balancers and restricting direct Internet traffic to certain parts of your infrastructure like your database servers. In other cases, you can use firewalls or Access Control Lists (ACLs) to control what traffic reaches your applications.
Plan for Scale
The two key considerations for mitigating large scale volumetric DDoS attacks are bandwidth (or transit) capacity and server capacity to absorb and mitigate attacks.
Transit capacity. When architecting your applications, make sure your hosting provider provides ample redundant Internet connectivity that allows you to handle large volumes of traffic. Since the ultimate objective of DDoS attacks is to affect the availability of your resources/applications, you should locate them, not only close to your end users but also to large Internet exchanges which will give your users easy access to your application even during high volumes of traffic. Additionally, web applications can go a step further by employing Content Distribution Networks (CDNs) and smart DNS resolution services which provide an additional layer of network infrastructure for serving content and resolving DNS queries from locations that are often closer to your end users.
Server capacity. Most DDoS attacks are volumetric attacks that use up a lot of resources; it is, therefore, important that you can quickly scale up or down on your computation resources. You can either do this by running on larger computation resources or those with features like more extensive network interfaces or enhanced networking that support larger volumes. Additionally, it is also common to use load balancers to continually monitor and shift loads between resources to prevent overloading any one resource.
Know what is normal and abnormal traffic
Deploy Firewalls for Sophisticated Application attacks
A good practice is to use a Web Application Firewall (WAF) against attacks, such as SQL injection or cross-site request forgery, that attempt to exploit a vulnerability in your application itself. Additionally, due to the unique nature of these attacks, you should be able to easily create customized mitigations against illegitimate requests which could have characteristics like disguising as good traffic or coming from bad IPs, unexpected geographies, etc. At times it might also be helpful in mitigating attacks as they happen to get experienced support to study traffic patterns and create customized protections.
Ready to start?
Sign up for an AWS account
Your account will be within the AWS Free Tier, which enables you to gain free, hands-on experience with the AWS platform, products, and services.
Learn with a preconfigured template and step-by-step tutorials
Experiment and learn about DDoS protection on AWS with step-by-step tutorials.
Set up your DDoS protection on AWS
All AWS customers benefit from the automatic protections of AWS Shield Standard, at no additional charge.