How to launch and defend against a DDoS
John Graham-Cumming
October 9, 2013
The simplest way to a safer, faster and smarter website
DDoSing web sites is... easy
•  Motivated groups of non-technical individuals
•  Followers of Anonymous etc.
•  Simple tools like LOIC

•  People with money to spend
•  Botnets
•  Online ‘booter’ services

•  Anyone with a grudge

2
What gets attacked
•  TCP
•  92% against port 80
•  SYN flooding

•  UDP
•  97% against DNS
•  Reflection/amplification attacks

•  Other significant attack ports
•  TCP port 53 (DNS)
•  UDP port 514 (syslog)

3
And when...

4
Three things make DDoS easy
•  Fire and forget protocols
•  Anything based on UDP
•  ICMP

•  No source IP authentication
•  Any machine can send a packet “from” any machine

•  Internet Amplifiers
•  Authoritative DNS servers that don’t rate limit
•  Open DNS recursors
•  Open SNMP devices
5
DDoS Situation is Worsening
•  Size and Frequency Growing
•  In 2012 the largest DDoS attack we saw was 65 Gbps
•  In 2013 it was 309 Gbps (almost 5x size increase)
•  DNS-based DDoS attacks grew in frequency by 200% in

2012

6
March 24, 2013

• 309 Gbps sustained for 28 minutes
• 30,956 open DNS resolvers
• Each outputting 10 Mbps

• 3 networks that allowed spoofing

7
March 25, 2013

• 287 Gbps sustained for 72 minutes
• 32,154 open DNS resolvers
• Each outputting 9 Mbps

• 3 networks that allowed spoofing

8
Controlling
Machine

Amplification Attacks

Compromised
Trigger Machine

Compromised
Trigger Machine

10Mbps

Compromised
Trigger Machine

1x

10x

1Gbps
AMP
AMP

AMP
AMP
AMP

AMP

AMP

AMP
AMP

AMP

AMP
AMP

AMP
AMP

AMP
AMP

10000x
1Gbps

Victim
9
DNS and SNMP Amplification
•  Small request to DNS or SNMP server with spoofed

source IP address
•  DNS or SNMP server responds with large packet to

‘source’: the victim
•  DNS multiplier is 8x (Req: 64B; Resp: 512B)
•  EDNS multiplier is 53x (Req: 64B; Resp: 3,364B)
•  SNMP multiplier is 650x (Req: 100B; Resp: 65kB)

10
HOWTO: 1 Tbps DDoS
•  Get a list of 10,000 open DNS recursors
•  Each machine will produce 1 Tbps / 10,000 = 100 Mbps
•  Use more machines if that’s too high

•  DNS amplification factor is 8x so need 1 Tbps / 8 = 125

Gbps trigger traffic
•  So 100 compromised servers with 1Gbps connections will do

•  If DNS recursors support EDNS then only need 1 Tbps / 50 = 20

Gbps trigger traffic

11
SNMP etc.
•  We have seen a 25 Gbps DDoS attack using SNMP

amplification
•  Came from Comcast Broadband Modems

•  NTP?

12
28 Million Open Resolvers

13
24.6% of networks allow spoofing

14
Spamhaus DDoS Was Easy
•  1 attacker’s laptop controlling
•  10 compromised servers on
•  3 networks that allowed spoofing of
•  9Gbps DNS requests to
•  0.1% of open resolvers resulted in

•  300Gbps+ of DDoS attack traffic.

15
Solving This Problem
•  Close Open DNS Recursors
•  Please do this!

•  Stop IP Spoofing
•  Implement BCP38 and BCP84

16
IP Spoofing
•  Used to ICMP attacks, TCP SYN floods and amplification

attacks
•  Vast majority of attacks on CloudFlare are spoofed attacks

Victim IP

DNS Server IP

64 byte request

512 byte reply

Victim IP

DNS Server IP

•  Dealing with IP spoofing stops amplification, hurts botnets

17
Mars Attacks!
•  23% from Martian addresses
•  3.45% from China Telecom
•  2.14% from China Unicom
•  1.74% from Comcast
•  1.45% from Dreamhost
•  1.36% from WEBNX
•  Larger point: spoofed packets come from everywhere
18
Ingress Filtering: BCP38 and BCP84
•  BCP38 is RFC2827
•  Been around since 2000

•  http://www.bcp38.info/
•  https://en.wikipedia.org/wiki/Ingress_filtering

•  BCP84 is RFC3704
•  Addresses problems with multi-homed networks

19
Why isn’t BCP38 implemented widely?
•  Simple: economic incentives are against it
•  IP-spoofing based DDoS attacks are an “externality”: like a polluting factory
•  IP-spoofing based DDoS attacks are not launched by the networks

themselves: a factory that only pollutes on someone else’s command
•  Networks have a negative incentive to implement because of impact on

their customers’ networks

•  Externalities get fixed by regulation
•  Better to fix this without government intervention
•  Governments will intervene when they are threatened (and they are!)

20
We’ve been here before
•  SMTP Open Relays
•  Let’s not get to the point that BL are created
•  Or that governments intervene

21
DDoS Defense

22
Start with a global network

23
Use Anycast

24
Anycast Attack Dilution

310 Gbps
/ 23 PoPs
= 14 Gbps per PoP

25
Hide Your Origin
•  If you use a DDoS service make sure your origin

IP is hidden
•  Change it when signing up
•  Make sure no DNS records (e.g. MX) leak the IP

•  and make sure that IP only accepts packets from

the service

26
Separate Protocols By IP
•  For example, have separate IPs for HTTP and

DNS
•  Filter by IP and protocol
•  No UDP packets should be able to hit your HTTP server
•  No HTTP packets should be able to hit your SMTP server

27
Protect your infrastructure
•  Separate IPs for infrastructure
•  Internal switches, routers

•  Filters those IPs at the edge
•  No external access to internal infrastructure

•  Otherwise attackers will attack your infrastructure

28
Work closely with your upstream
•  Get to know who to call when trouble strikes
•  Enable them to perform filtering in their

infrastructure
•  Share you IP/Protocol architecture with them

29

More Related Content

PDF
API Management - Why it matters!
PDF
Spotify architecture - Pressing play
PDF
Graph database Use Cases
PDF
Past, Present & Future of Recommender Systems: An Industry Perspective
PPTX
An Introduction To NoSQL & MongoDB
PPTX
Vulnerabilities in modern web applications
PPTX
What is an API Gateway?
PDF
Spotify: P2P music streaming
API Management - Why it matters!
Spotify architecture - Pressing play
Graph database Use Cases
Past, Present & Future of Recommender Systems: An Industry Perspective
An Introduction To NoSQL & MongoDB
Vulnerabilities in modern web applications
What is an API Gateway?
Spotify: P2P music streaming

What's hot (20)

PPTX
PDF
The Evolution of Big Data at Spotify
PPTX
Dynatrace
PDF
Common MongoDB Use Cases
PDF
OWASP Mobile Top 10
PDF
The Evolution of Hadoop at Spotify - Through Failures and Pain
ODP
Introduction to MongoDB
PDF
클라우드 엔지니어 취업 고군 분투기
PDF
Distributed "Web Scale" Systems
PDF
5 Important Secure Coding Practices
PDF
Search @ Spotify
PPTX
Api-First service design
PDF
Google Spanner : our understanding of concepts and implications
PPTX
DevOps and Tools
PDF
GCP for Apache Kafka® Users: Stream Ingestion and Processing
PPTX
Web 3.0?
PPTX
MongoDB Atlas
PPT
Neo4J : Introduction to Graph Database
ODP
Monitoring via Datadog
PDF
Introduction to Apache NiFi dws19 DWS - DC 2019
The Evolution of Big Data at Spotify
Dynatrace
Common MongoDB Use Cases
OWASP Mobile Top 10
The Evolution of Hadoop at Spotify - Through Failures and Pain
Introduction to MongoDB
클라우드 엔지니어 취업 고군 분투기
Distributed "Web Scale" Systems
5 Important Secure Coding Practices
Search @ Spotify
Api-First service design
Google Spanner : our understanding of concepts and implications
DevOps and Tools
GCP for Apache Kafka® Users: Stream Ingestion and Processing
Web 3.0?
MongoDB Atlas
Neo4J : Introduction to Graph Database
Monitoring via Datadog
Introduction to Apache NiFi dws19 DWS - DC 2019
Ad

Viewers also liked (9)

PPTX
Ddos and mitigation methods.pptx (1)
PDF
DDoS Open Threat Signaling (DOTS) Working Group Presentation on draft-ietf-do...
PDF
Practical steps to mitigate DDoS attacks
PPT
DDoS Attacks
PDF
Denial of Service Attacks
PPT
10 DDoS Mitigation Techniques
PPTX
NetScout nGeniusONE overview
PDF
DDoS mitigation EPIC FAIL collection - 32C3
PDF
Top 10 DDoS Trends for 2013 Infographic
Ddos and mitigation methods.pptx (1)
DDoS Open Threat Signaling (DOTS) Working Group Presentation on draft-ietf-do...
Practical steps to mitigate DDoS attacks
DDoS Attacks
Denial of Service Attacks
10 DDoS Mitigation Techniques
NetScout nGeniusONE overview
DDoS mitigation EPIC FAIL collection - 32C3
Top 10 DDoS Trends for 2013 Infographic
Ad

Similar to How to launch and defend against a DDoS (20)

PDF
A10 issa d do s 5-2014
PDF
A survey of trends in massive ddos attacks and cloud based mitigations
PDF
A survey of trends in massive ddos attacks and cloud based mitigations
PDF
A SURVEY OF TRENDS IN MASSIVE DDOS ATTACKS AND CLOUD-BASED MITIGATIONS
PDF
KHNOG 3: DDoS Attack Prevention
PDF
DDoS in India, presented at INNOG 8 by Dave Phelan
PPT
Protecting your business from ddos attacks
PDF
DNS DDoS Attack and Risk
PDF
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
PPTX
PLNOG15 :DDOS Attacks & Collateral Damage. Can we avoid it? Asraf Ali
PPTX
PLNOG15 :DDOS Attacks & Collateral Damage. Can we avoid it? Asraf Ali
PDF
ECE560 Denial of Service Attacks Fall2020.pdf
PPTX
Denial of Service (DoS) and Distributed DoS (DDoS) Attacks
PDF
EuroBSDCon 2013 - Mitigating DDoS Attacks at Layer 7
PDF
Denial of Service - Service Provider Overview
PDF
DDoS mitigation in the real world
PDF
An Ultimate Guide to DDos Attacks: Detection, Prevention and Mitigation
PPT
DDoS Attack PPT by Nitin Bisht
PDF
nitinbisht-170409175645 (2).pdf
PDF
FS-ISAC 2014 Troubleshooting Network Threats: DDoS Attacks, DNS Poisoning and...
A10 issa d do s 5-2014
A survey of trends in massive ddos attacks and cloud based mitigations
A survey of trends in massive ddos attacks and cloud based mitigations
A SURVEY OF TRENDS IN MASSIVE DDOS ATTACKS AND CLOUD-BASED MITIGATIONS
KHNOG 3: DDoS Attack Prevention
DDoS in India, presented at INNOG 8 by Dave Phelan
Protecting your business from ddos attacks
DNS DDoS Attack and Risk
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
PLNOG15 :DDOS Attacks & Collateral Damage. Can we avoid it? Asraf Ali
PLNOG15 :DDOS Attacks & Collateral Damage. Can we avoid it? Asraf Ali
ECE560 Denial of Service Attacks Fall2020.pdf
Denial of Service (DoS) and Distributed DoS (DDoS) Attacks
EuroBSDCon 2013 - Mitigating DDoS Attacks at Layer 7
Denial of Service - Service Provider Overview
DDoS mitigation in the real world
An Ultimate Guide to DDos Attacks: Detection, Prevention and Mitigation
DDoS Attack PPT by Nitin Bisht
nitinbisht-170409175645 (2).pdf
FS-ISAC 2014 Troubleshooting Network Threats: DDoS Attacks, DNS Poisoning and...

More from jgrahamc (11)

PPTX
Better living through microcontrollers
PDF
Big O London Meetup April 2015
PDF
Go Containers
PPTX
Lua: the world's most infuriating language
PPTX
Software Debugging for High-altitude Balloons
PDF
Go memory
PDF
Highlights of Go 1.1
PDF
Go Concurrency
PPTX
That'll never work!
PPTX
HAB Software Woes
PPTX
Javascript Security
Better living through microcontrollers
Big O London Meetup April 2015
Go Containers
Lua: the world's most infuriating language
Software Debugging for High-altitude Balloons
Go memory
Highlights of Go 1.1
Go Concurrency
That'll never work!
HAB Software Woes
Javascript Security

Recently uploaded (20)

PPT
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PPT
What is a Computer? Input Devices /output devices
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
Five Habits of High-Impact Board Members
PDF
STKI Israel Market Study 2025 version august
PPT
Geologic Time for studying geology for geologist
PPTX
2018-HIPAA-Renewal-Training for executives
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PDF
A review of recent deep learning applications in wood surface defect identifi...
PPTX
Benefits of Physical activity for teenagers.pptx
PDF
Architecture types and enterprise applications.pdf
PDF
Zenith AI: Advanced Artificial Intelligence
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
DOCX
search engine optimization ppt fir known well about this
PDF
OpenACC and Open Hackathons Monthly Highlights July 2025
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
What is a Computer? Input Devices /output devices
Enhancing emotion recognition model for a student engagement use case through...
Five Habits of High-Impact Board Members
STKI Israel Market Study 2025 version august
Geologic Time for studying geology for geologist
2018-HIPAA-Renewal-Training for executives
1 - Historical Antecedents, Social Consideration.pdf
A contest of sentiment analysis: k-nearest neighbor versus neural network
A review of recent deep learning applications in wood surface defect identifi...
Benefits of Physical activity for teenagers.pptx
Architecture types and enterprise applications.pdf
Zenith AI: Advanced Artificial Intelligence
Custom Battery Pack Design Considerations for Performance and Safety
search engine optimization ppt fir known well about this
OpenACC and Open Hackathons Monthly Highlights July 2025
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...

How to launch and defend against a DDoS

  • 1. How to launch and defend against a DDoS John Graham-Cumming October 9, 2013 The simplest way to a safer, faster and smarter website
  • 2. DDoSing web sites is... easy •  Motivated groups of non-technical individuals •  Followers of Anonymous etc. •  Simple tools like LOIC •  People with money to spend •  Botnets •  Online ‘booter’ services •  Anyone with a grudge 2
  • 3. What gets attacked •  TCP •  92% against port 80 •  SYN flooding •  UDP •  97% against DNS •  Reflection/amplification attacks •  Other significant attack ports •  TCP port 53 (DNS) •  UDP port 514 (syslog) 3
  • 5. Three things make DDoS easy •  Fire and forget protocols •  Anything based on UDP •  ICMP •  No source IP authentication •  Any machine can send a packet “from” any machine •  Internet Amplifiers •  Authoritative DNS servers that don’t rate limit •  Open DNS recursors •  Open SNMP devices 5
  • 6. DDoS Situation is Worsening •  Size and Frequency Growing •  In 2012 the largest DDoS attack we saw was 65 Gbps •  In 2013 it was 309 Gbps (almost 5x size increase) •  DNS-based DDoS attacks grew in frequency by 200% in 2012 6
  • 7. March 24, 2013 • 309 Gbps sustained for 28 minutes • 30,956 open DNS resolvers • Each outputting 10 Mbps • 3 networks that allowed spoofing 7
  • 8. March 25, 2013 • 287 Gbps sustained for 72 minutes • 32,154 open DNS resolvers • Each outputting 9 Mbps • 3 networks that allowed spoofing 8
  • 9. Controlling Machine Amplification Attacks Compromised Trigger Machine Compromised Trigger Machine 10Mbps Compromised Trigger Machine 1x 10x 1Gbps AMP AMP AMP AMP AMP AMP AMP AMP AMP AMP AMP AMP AMP AMP AMP AMP 10000x 1Gbps Victim 9
  • 10. DNS and SNMP Amplification •  Small request to DNS or SNMP server with spoofed source IP address •  DNS or SNMP server responds with large packet to ‘source’: the victim •  DNS multiplier is 8x (Req: 64B; Resp: 512B) •  EDNS multiplier is 53x (Req: 64B; Resp: 3,364B) •  SNMP multiplier is 650x (Req: 100B; Resp: 65kB) 10
  • 11. HOWTO: 1 Tbps DDoS •  Get a list of 10,000 open DNS recursors •  Each machine will produce 1 Tbps / 10,000 = 100 Mbps •  Use more machines if that’s too high •  DNS amplification factor is 8x so need 1 Tbps / 8 = 125 Gbps trigger traffic •  So 100 compromised servers with 1Gbps connections will do •  If DNS recursors support EDNS then only need 1 Tbps / 50 = 20 Gbps trigger traffic 11
  • 12. SNMP etc. •  We have seen a 25 Gbps DDoS attack using SNMP amplification •  Came from Comcast Broadband Modems •  NTP? 12
  • 13. 28 Million Open Resolvers 13
  • 14. 24.6% of networks allow spoofing 14
  • 15. Spamhaus DDoS Was Easy •  1 attacker’s laptop controlling •  10 compromised servers on •  3 networks that allowed spoofing of •  9Gbps DNS requests to •  0.1% of open resolvers resulted in •  300Gbps+ of DDoS attack traffic. 15
  • 16. Solving This Problem •  Close Open DNS Recursors •  Please do this! •  Stop IP Spoofing •  Implement BCP38 and BCP84 16
  • 17. IP Spoofing •  Used to ICMP attacks, TCP SYN floods and amplification attacks •  Vast majority of attacks on CloudFlare are spoofed attacks Victim IP DNS Server IP 64 byte request 512 byte reply Victim IP DNS Server IP •  Dealing with IP spoofing stops amplification, hurts botnets 17
  • 18. Mars Attacks! •  23% from Martian addresses •  3.45% from China Telecom •  2.14% from China Unicom •  1.74% from Comcast •  1.45% from Dreamhost •  1.36% from WEBNX •  Larger point: spoofed packets come from everywhere 18
  • 19. Ingress Filtering: BCP38 and BCP84 •  BCP38 is RFC2827 •  Been around since 2000 •  http://www.bcp38.info/ •  https://en.wikipedia.org/wiki/Ingress_filtering •  BCP84 is RFC3704 •  Addresses problems with multi-homed networks 19
  • 20. Why isn’t BCP38 implemented widely? •  Simple: economic incentives are against it •  IP-spoofing based DDoS attacks are an “externality”: like a polluting factory •  IP-spoofing based DDoS attacks are not launched by the networks themselves: a factory that only pollutes on someone else’s command •  Networks have a negative incentive to implement because of impact on their customers’ networks •  Externalities get fixed by regulation •  Better to fix this without government intervention •  Governments will intervene when they are threatened (and they are!) 20
  • 21. We’ve been here before •  SMTP Open Relays •  Let’s not get to the point that BL are created •  Or that governments intervene 21
  • 23. Start with a global network 23
  • 25. Anycast Attack Dilution 310 Gbps / 23 PoPs = 14 Gbps per PoP 25
  • 26. Hide Your Origin •  If you use a DDoS service make sure your origin IP is hidden •  Change it when signing up •  Make sure no DNS records (e.g. MX) leak the IP •  and make sure that IP only accepts packets from the service 26
  • 27. Separate Protocols By IP •  For example, have separate IPs for HTTP and DNS •  Filter by IP and protocol •  No UDP packets should be able to hit your HTTP server •  No HTTP packets should be able to hit your SMTP server 27
  • 28. Protect your infrastructure •  Separate IPs for infrastructure •  Internal switches, routers •  Filters those IPs at the edge •  No external access to internal infrastructure •  Otherwise attackers will attack your infrastructure 28
  • 29. Work closely with your upstream •  Get to know who to call when trouble strikes •  Enable them to perform filtering in their infrastructure •  Share you IP/Protocol architecture with them 29