Skip to content
Threats Guide

DDoS (Distributed Denial of Service) Attacks

Not reviewedNo review date recordedEdit this page on GitHub

Description

A Distributed Denial of Service (DDoS) attack attempts to make an online service unavailable by overwhelming it with traffic from multiple sources. Attackers use botnets—networks of compromised devices—to generate massive amounts of requests.

Attack Types

1. Volume-Based Attacks

  • UDP Flood: Overwhelms with UDP packets
  • ICMP Flood: Ping of death, smurf attacks
  • Amplification: DNS, NTP, SSDP amplification

2. Protocol Attacks

  • SYN Flood: Exploits TCP handshake
  • Ping of Death: Oversized packets
  • Smurf Attack: Spoofed broadcast requests

3. Application Layer Attacks

  • HTTP Flood: Legitimate-looking HTTP requests
  • Slowloris: Slow connections exhausting resources
  • DNS Query Flood: Overwhelming DNS servers

Detection Methods

Key Indicators

  • Unusual traffic patterns
  • Spike in traffic from single IP/geography
  • Sudden increase in specific protocol types
  • Incomplete connections (SYN floods)
  • Slow network performance

Detection Scripts

Prevention Strategies

Infrastructure Level

  • Rate Limiting: Control request rates
  • Traffic Filtering: Block malicious patterns
  • Load Balancing: Distribute traffic
  • Anycast Networks: Distribute across multiple nodes

Service Level

  • Web Application Firewall (WAF)
  • CDN Services (Cloudflare, Akamai)
  • Auto-scaling resources
  • CAPTCHA for suspicious requests

Prevention Scripts

Detection Logic

Network Traffic → Traffic Analysis → Pattern Recognition →Threshold Checking → Anomaly Detection → Alert Generation

Best Practices

  1. Defense in Depth: Multiple layers of protection
  2. Regular Testing: Simulate attacks in controlled environments
  3. Incident Response Plan: Have clear procedures
  4. Monitoring: 24/7 traffic monitoring
  5. Collaboration: Work with ISP for upstream filtering

Tools & Resources

  • Detection: Snort, Suricata, Wireshark
  • Prevention: mod_evasive (Apache), fail2ban
  • Cloud Services: AWS Shield, Cloudflare, Akamai
  • Testing: hping3, LOIC, Slowloris (educational only!)

Warning

Only test these techniques on your own infrastructure or with explicit written permission. Unauthorized DDoS testing is illegal.