SlideShare a Scribd company logo
1
Multi-Layer DDoS Mitigation Strategies
Sagi Brody, CTO
@webairsagi
sagi@webair.com
Logan Best
Senior Infrastructure Engineer
logan@webair.com
2
Multi-Layer DDoS Mitigation Strategies
Application
Server(s)
Load Balancers/Proxies
IDS/IPS
Network
3rd Party Scrubbing
3rd Party CDN/Proxies
Firewall
3
Fully Managed Web Stack
Application
Server
Load Balancers
IDS/IPS
Network
Scrubbing
CDN/Proxies
FW & Cache plugins
Memcache, Fail2ban,
HAProxy + keepalived, nginx,
SOCaaS, ProtectWise, AlertLogic, Snort
RTBH, FlowSpec, Outbound filters
Network Taps , Analysis, Automated BGP
Redirects to CDN in App or via HTTP rewrite
MikroTik, PaloAlto, JuniperFirewall
4
Why? - New Attack Landscape
• DDoS Ransom on the rise with Bitcoins - Attackers becoming more
anonymous
• Multiple governments issue warnings about DD4BC
• Stress Testers
• Used to be called “booters’, available on IRC (EFnet anyone?)
• DDoS-as-a-Service
• Christmas 2014, Lizard Squad “stress tested” PSN and Xbox
Live. Sets up lizardstresser.su to monetize.
• Inexpensive - as little as $5/attack
• Technically legal, RageBooter.net claims legal,
provides full phone support.
• DDoS Mitigation Companies targeted
5
Why? - Unlikely DDoS Originators
• IoT
• IoCT? Internet of Compromised Things?
• Professor in Berlin creates smart home. Lightbulb
unintentionally launches DoS against controller, causing
home to lock up.
• Proliferation of cheap android devices and LTE will result in
perfect mobile storm.
• 1 billion devices 0.1% vulnerable:
• 100 kilobits per second == 100 gigabits per
second
• 100 pps == 100 million packets per second
• Today:
• 7.2 Billion cell devices globally
• 6.4 Billion IoT devices globally
6
More sophisticated attackers
• Less total attacks, increase in effectiveness
• Attacks are getting more complicated and last longer
• More effective L7 Botnets being used
7
Our Environment
Founded: 1996
Headquarters: Long Island, NY
Services Offered: Public, Private & Hybrid Cloud, Dedicated Servers, Colocation, CDN, Security, DRaaS,
and more
Customers: Enterprise, Healthcare, SMBs, VoIP providers, eCommerce, Information Technology, and more
The Webair Value: 
➢ Over 18 years providing customers with best-in-class Managed Hosting solutions
➢ High-touch Support
➢ Full ownership of our customer’s infrastructure stack so they can focus on their core business.
➢ Manages most secure and redundant facility east of Manhattan with trans-Atlantic bypass (Tier III, HIPPA/SSAE16)
8
Full Stack Management
“Outsourced Devops”
9
Application Layer
• Simple to take sites down with low request volume
• Stay under volumetric detection’s radar
• Uncached dynamic (db backed) URLs fall over quickly (especially if
framework is known)
• Poorly written SQL queries
• Apps written w/o scale in mind
• Cross-site scripting, SQL injection, buffer overflows, file inclusion,
oh my…
• Search result pages, POST to forms, comments, etc
• Botnets storing session cookies, use real ‘hidden’ browsers on
infected PCs
• Simple HTTP floods lead to
state-exhaustion
• Part of larger multi-vector attacks
10
Application Layer Protection
• Framework or App specific plugins - WP (NinjaFirewall, Wordfence)
• HTTP server modules - mod_evasive, mod_security
• Common caching layers can perform rate limiting based on specific
request attributes (nginx, varnish)
• Cache for security
• In memory - (memcache, redis)
• Opcode caching - (APC, xcache, eAccelerator)
• SQL - (sphinx search, solr, elasticsearch)
• File
• Follow best practices for web scale:
• Disable all unnecessary logging
• Scale-out architecture
• In-memory session management
• (many more!..)
11
Server Layer
Linux Kernel /etc/sysctl.conf customization:
• Prevent against the common 'syn flood attack'
#net.ipv4.tcp_syncookies = 1
• Increase the number of outstanding syn requests allowed
#net.ipv4.tcp_max_syn_backlog = 4096
• Reduce # of potential ACK replies (default 5)
#net.ipv4.tcp_synack_retries = 3
• Reduce # of connections in TIME_WAIT state
#net.ipv4.tcp_fin_timeout = 15
• Enable IP spoofing protection (turn on source route verification)
#net.ipv4.conf.all.rp_filter = 1
#net.ipv4.conf.default.rp_filter = 1
• Decrease the time default value for tcp_keepalive_time connection
#net.ipv4.tcp_keepalive_time = 1800
12
Server Layer
IPTables rules:
• Rate limit and block syn flooding:
#iptables -N syn-flood
#iptables -A syn-flood -m limit --limit 100/second --limit-burst 150 -j RETURN
#iptables -A syn-flood -j LOG --log-prefix "SYN flood: “
#iptables -A syn-flood -j DROP
• Drop excessive RST packets to avoid smurf attacks
#iptables -A INPUT -p tcp -m tcp --tcp-flags RST RST -m limit --limit 2/second --limit-burst 2
-j ACCEPT
#iptables -A INPUT -p icmp -m icmp --icmp-type address-mask-request -j DROP
#iptables -A INPUT -p icmp -m icmp --icmp-type timestamp-request -j DROP
#iptables -A INPUT -p icmp -m icmp -j DROP
• Drop Invalid Packets
#iptables -A INPUT -m state --state INVALID -j DROP
#iptables -A FORWARD -m state --state INVALID -j DROP
#iptables -A OUTPUT -m state --state INVALID -j DROP
13
Server Layer
IPTables rules:
•Reject spoofed packets (bogon networks, RFC1918)
#iptables -A INPUT -s 10.0.0.0/8 -j DROP
#iptables -A INPUT -s 169.254.0.0/16 -j DROP
#iptables -A INPUT -s 172.16.0.0/12 -j DROP
#iptables -A INPUT -d 239.255.255.0/24 -j DROP
#iptables -A INPUT -d 255.255.255.255 -j DROP
…….etc
• Reject ports, protocols, and IPs not in use. Are you really using
UDP port 80?
• Fail2Ban/SSHGuard
• Mindful of NFS overhead (stop logging to NFS!)
14
Load Balancers
• Load balancers can shield app/servers from attacks
• Already operating at L7, ability to perform complex L7 rules and
mitigation, https via offload
• Provides inherent synflood protection, slowloris,
• Traditional appliance solutions too rigid. Next gen ADC (Application
delivery controller) to provide LB, WAF, Cache combined
• DIY, our kit: Ansible, Debian/RHEL, HAProxy, keepalived, csync,
git, automation software for provisioning, configuration, attack
defense
• Integrate with 3rd party software easily (geoip, automated
blacklists)
• Tie into caching: (varnish, nginx)
15
Load Balancers (HAProxy)
• Provides rate limiting on many levels:
• Connections per IP
• Connection rate per IP
• Bandwidth usage too high
• Client not respecting RFCs (IE for SMTP)
• HTTP request rate (L7) - Block based on
• Request string/regex
• User-Agent
• Any other tracked variables
• Vulnerability scanners:
• Invalid or truncated requests
• Denied or tarpitted requests
• Failed authentications
• 4xx error pages
16
HAProxy examples
stick-table type ip size 256k expire 300s peers mypeers store
gpc0,http_req_rate(5s),conn_cur,conn_rate(5s),http_err_rate(5s)
acl abuse src_http_req_rate gt 50
acl flag_abuser sc1_inc_gpc0
acl ipwhitelist src -f /path/to/ipwhitelist.txt
acl ipblacklist src -f /path/to/ipblacklist.txt
tcp-request connection track-sc1 src
tcp-request connection reject if ipblacklist
tcp-request connection accept if ipwhitelist
tcp-request connection reject if { sc1_conn_cur ge 30 }
tcp-request connection reject if { sc1_conn_rate ge 20 }
tcp-request connection reject if { sc1_get_gpc0 gt 0 }
tcp-request content reject if { sc1_get_gpc0 gt 0 }
http-request deny if ipblacklist
http-request allow if ipwhitelist
http-request deny if { sc1_get_gpc0 gt 0 }
http-request deny if { sc1_http_err_rate ge 20 } flag_abuser
http-request deny if abuse flag_abuser
17
IDS/IPS
• “Threat Monitoring & Mitigation”
• Sits behind the FW to catch unprotected malicious traffic
• Works in virtual environments as well
• Can be tap/span, logs, or libpcap based
• Graphs and other cool Visual Dashboards!
• No the “be all, end all” solution
• API/Developer friendly
• SOCaaS
• Monitors 24/7/365, SLA backed
• Hands on investigations
• Detailed intrusion information (kill-chain analysis)
• Custom retention periods for all types of compliance
• packet replay
18
IDS/IPS
19
IDS/IPS
20
Firewalls
• WAF capabilities becoming standard w/ all new FWs
• Is WAF even enough? (Palo Alto says no)
• L7 SSL inspect via passthrough certs
• Many great OSS options still exist
• MikroTik:
• SSH/GUI w/ built in easy packet sniffing
• L7 regex matching
• VPN (IPSec, PPTP, SSTP, L2TP), BGP, OSPF, etc..
• Run a whole ISP on it :)
• HW appliance, w/ support and built in virtualization
• Dynamic address lists based on multitude of rules
• ‘Good’ IPv6 support FTW!
21
Firewalls
22
Network
23
Network
• Block Martian and Bogon routes (automate if possible)
• Unicast Reverse Path Forwarding (w/ full routes)
• Filter unknown outbound packets to prevent spoofing + retaliation
• Proper flow monitoring at the edge - CLI + GUI
• Packet sniffing
• Strategy around reflection attacks:
• Detect internally
• Run scan and patch?
• Block outbound if you can or redirect to internal server(s)
•IPv6 /64 assignments are bad - NDP exhaustion
24
Network
• RTBH (remotely triggered blackhole) on your network (but kills dst)
• Blackhole srcs upstream via community strings
• Automate ^^ via scripts/software
• BGP Flowspec: Use BGP to distribute flow specification filters and
dynamically filter on routers.
• communities based actions (accept, discard, rate-limit, sample,
redirect)
• Match on combination of source/dest prefix, source/dest port,
ICMP type/code, packet size, DSCP, TCP flag, fragment
encoding, etc
• Leverage ASIC filtering in routers
• Available today
25
Network
26
3rd Party on-demand scrubbing
Providers:
• Staminus communications
• Level3 (legacy BlackLotus)
• TATA
• Savvis
• Verisign
• Anyone running Arbor gear??
BGP enabled on the fly mitigation
27
3rd Party on-demand scrubbing
• On Demand: Enable Mitigation only when needed. “Insurance Policy”
• Assume potential attack will always have more BW than you
• Many providers now support L7 mitigation via BGP swing
• Upgrading capacity as needed via contracts, not hardware
• On prem device detects attacks and auto-swings on its own (automation)
• “Big Data” play - view details on attack, portal, reports
• A ‘required’ value add these days
• If BGP cannot be maintained to provider, route withdraws, attack comes
back to you. Some providers can instigate their own announcements on
request
28
3rd Party CDN/Proxies
• “Always on” - All connections proxies via 3rd party (for better, or worse)
• Usually work well out of the box with popular applications
• Simple way to handle many security touch points:
• Caching & CDN
• WAF capabilities and common injection detection
• SSL offload
• Custom Rules
• Easy to use for Beginners
• Enterprise offerings can:
• Cache dynamic applications (EdgeCast/VZW + Fast.ly)
• Work with Varnish VCLs and other common formats
• Mid-tier origin caching
• Option of last resort: CAPTCHA for user verification (eww)
• Not a complete solution, origins are usually found
29
3rd Party CDN/Proxies
30
THANK YOU!
Sagi Brody, CTO
@WebairSagi
sagi@webair.com
Logan Best
Senior Infrastructure/Network Engineer
logan@webair.com
*Research data provided via Staminus Communications

More Related Content

PPT
Why Managed Service Providers Should Embrace Container Technology
PDF
Enabling Limitless Connectivity, Opportunity and Growth with Interconnection ...
PDF
How To Set Up SQL Load Balancing with HAProxy - Slides
PDF
Load Balancing MySQL with HAProxy - Slides
PDF
Building your own CDN using Amazon EC2
PPTX
Usenix LISA 2012 - Choosing a Proxy
PPTX
Delivering High Performance Websites with NGINX
PDF
Varnish SSL / TLS
Why Managed Service Providers Should Embrace Container Technology
Enabling Limitless Connectivity, Opportunity and Growth with Interconnection ...
How To Set Up SQL Load Balancing with HAProxy - Slides
Load Balancing MySQL with HAProxy - Slides
Building your own CDN using Amazon EC2
Usenix LISA 2012 - Choosing a Proxy
Delivering High Performance Websites with NGINX
Varnish SSL / TLS

What's hot (20)

PPTX
High Availability Content Caching with NGINX
PDF
Route Origin Validation - A MANRS Approach
PPTX
5 things you didn't know nginx could do
PDF
Integrating multiple CDN providers at Etsy - Velocity Europe (London) 2013
PPTX
Choosing A Proxy Server - Apachecon 2014
PPTX
Automate or die! Rootedcon 2017
PPTX
Multi-Layer DDoS Mitigation Strategies
PDF
DDoS Attacks - Scenery, Evolution and Mitigation
PDF
Scaling Instagram
PPTX
NGINX: High Performance Load Balancing
PDF
Automating Network Infrastructure : Ansible
PDF
Load Balancing Applications with NGINX in a CoreOS Cluster
PPTX
Ceph Day SF 2015 - Deploying flash storage for Ceph without compromising perf...
PPTX
NGINX High-performance Caching
PPTX
Rate Limiting with NGINX and NGINX Plus
PDF
Integrated Cache on Netscaler
PDF
Unity Makes Strength
PDF
Windows Server 2016 Webinar
PDF
Content Caching with NGINX and NGINX Plus
PDF
How to monitor NGINX
High Availability Content Caching with NGINX
Route Origin Validation - A MANRS Approach
5 things you didn't know nginx could do
Integrating multiple CDN providers at Etsy - Velocity Europe (London) 2013
Choosing A Proxy Server - Apachecon 2014
Automate or die! Rootedcon 2017
Multi-Layer DDoS Mitigation Strategies
DDoS Attacks - Scenery, Evolution and Mitigation
Scaling Instagram
NGINX: High Performance Load Balancing
Automating Network Infrastructure : Ansible
Load Balancing Applications with NGINX in a CoreOS Cluster
Ceph Day SF 2015 - Deploying flash storage for Ceph without compromising perf...
NGINX High-performance Caching
Rate Limiting with NGINX and NGINX Plus
Integrated Cache on Netscaler
Unity Makes Strength
Windows Server 2016 Webinar
Content Caching with NGINX and NGINX Plus
How to monitor NGINX
Ad

Viewers also liked (19)

PDF
TroubleShooting as a Service
PDF
Reducing iptables configuration complexity using chains
PDF
Velocity 2011 - Our first DDoS attack
ODP
ChinaNetCloud Training - HAProxy Intro
PPTX
HAProxy
PDF
HAProxy tech talk
PPT
Web Server Load Balancer
PDF
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
ODP
HAProxy scale out using open source
PPT
DDoS Attacks
PDF
Interwiew about ABC Sealants (PVC Vitrini)
PDF
A secure method for hiding secret data on cubism image using hybrid feature d...
PDF
Oscillatory motion control of hinged body using controller
PDF
Deber de informatica
PPTX
Pinetree concept
PPTX
Testailua vaan
PPT
Understanding the Quality of the Student Experience in Blended Learning Envir...
PPT
Patnent Information services
PDF
Local Food Launchpad 2016 Concept Development Workshop
TroubleShooting as a Service
Reducing iptables configuration complexity using chains
Velocity 2011 - Our first DDoS attack
ChinaNetCloud Training - HAProxy Intro
HAProxy
HAProxy tech talk
Web Server Load Balancer
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
HAProxy scale out using open source
DDoS Attacks
Interwiew about ABC Sealants (PVC Vitrini)
A secure method for hiding secret data on cubism image using hybrid feature d...
Oscillatory motion control of hinged body using controller
Deber de informatica
Pinetree concept
Testailua vaan
Understanding the Quality of the Student Experience in Blended Learning Envir...
Patnent Information services
Local Food Launchpad 2016 Concept Development Workshop
Ad

Similar to Multi-Layer DDoS Mitigation Strategies (20)

PDF
PLNOG16: Bezpieczeństwo w sieci operatora, Sebastian Pasternacki
PPTX
PLNOG 18 - Paweł Małachowski - Spy hard czyli regexpem po pakietach
PPTX
Spy hard, challenges of 100G deep packet inspection on x86 platform
PPTX
LACNOG - Logging in the Post-IPv4 World
PPTX
redGuardian DP100 large scale DDoS mitigation solution
PDF
Nanog66 vicente de luca fast netmon
PPTX
Helen Tabunshchyk "Handling large amounts of traffic on the Edge"
PPTX
IRATI: an open source RINA implementation for Linux/OS
PPTX
Practice of large Hadoop cluster in China Mobile
PDF
Tempesta FW - Framework и Firewall для WAF и DDoS mitigation, Александр Крижа...
PPT
MAGPI: Advanced Services: IPv6, Multicast, DNSSEC
PDF
SOHOpelessly Broken
PDF
Is IPv6 Security Still an Afterthought?
PDF
Implementing an IPv6 Enabled Environment for a Public Cloud Tenant
PDF
Larson Macaulay apt_malware_past_present_future_out_of_band_techniques
PDF
Http2 in practice
PDF
RIoT (Raiding Internet of Things) by Jacob Holcomb
PDF
HSB - Secure DNS en BGP ontwikkelingen - Benno Overeinder
PPTX
Building a Router
PDF
Network State Awareness & Troubleshooting
PLNOG16: Bezpieczeństwo w sieci operatora, Sebastian Pasternacki
PLNOG 18 - Paweł Małachowski - Spy hard czyli regexpem po pakietach
Spy hard, challenges of 100G deep packet inspection on x86 platform
LACNOG - Logging in the Post-IPv4 World
redGuardian DP100 large scale DDoS mitigation solution
Nanog66 vicente de luca fast netmon
Helen Tabunshchyk "Handling large amounts of traffic on the Edge"
IRATI: an open source RINA implementation for Linux/OS
Practice of large Hadoop cluster in China Mobile
Tempesta FW - Framework и Firewall для WAF и DDoS mitigation, Александр Крижа...
MAGPI: Advanced Services: IPv6, Multicast, DNSSEC
SOHOpelessly Broken
Is IPv6 Security Still an Afterthought?
Implementing an IPv6 Enabled Environment for a Public Cloud Tenant
Larson Macaulay apt_malware_past_present_future_out_of_band_techniques
Http2 in practice
RIoT (Raiding Internet of Things) by Jacob Holcomb
HSB - Secure DNS en BGP ontwikkelingen - Benno Overeinder
Building a Router
Network State Awareness & Troubleshooting

More from Sagi Brody (7)

PPTX
Ransomware-Recovery-as-a-Service
PPTX
Combating Cyberattacks through Network Agility and Automation
PDF
Ransomware: The Defendable Epidemic
PDF
Automated Ransomware Recovery for Full Cyber Protection
PDF
Pulling Back the Cloud Curtain
PPT
Troubleshooting: A High-Value Asset For The Service-Provider Discipline
PDF
Managing Remote Operation Teams
Ransomware-Recovery-as-a-Service
Combating Cyberattacks through Network Agility and Automation
Ransomware: The Defendable Epidemic
Automated Ransomware Recovery for Full Cyber Protection
Pulling Back the Cloud Curtain
Troubleshooting: A High-Value Asset For The Service-Provider Discipline
Managing Remote Operation Teams

Recently uploaded (20)

PDF
RPKI Status Update, presented by Makito Lay at IDNOG 10
PPTX
artificial intelligence overview of it and more
PDF
An introduction to the IFRS (ISSB) Stndards.pdf
PDF
Tenda Login Guide: Access Your Router in 5 Easy Steps
PPTX
Introduction to Information and Communication Technology
PDF
Triggering QUIC, presented by Geoff Huston at IETF 123
PDF
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
PDF
Cloud-Scale Log Monitoring _ Datadog.pdf
PDF
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
PPTX
international classification of diseases ICD-10 review PPT.pptx
PPTX
Module 1 - Cyber Law and Ethics 101.pptx
PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PDF
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
PPTX
Introuction about WHO-FIC in ICD-10.pptx
PPTX
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
PPTX
INTERNET------BASICS-------UPDATED PPT PRESENTATION
PDF
WebRTC in SignalWire - troubleshooting media negotiation
PDF
The Internet -By the Numbers, Sri Lanka Edition
DOCX
Unit-3 cyber security network security of internet system
PDF
Paper PDF World Game (s) Great Redesign.pdf
RPKI Status Update, presented by Makito Lay at IDNOG 10
artificial intelligence overview of it and more
An introduction to the IFRS (ISSB) Stndards.pdf
Tenda Login Guide: Access Your Router in 5 Easy Steps
Introduction to Information and Communication Technology
Triggering QUIC, presented by Geoff Huston at IETF 123
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
Cloud-Scale Log Monitoring _ Datadog.pdf
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
international classification of diseases ICD-10 review PPT.pptx
Module 1 - Cyber Law and Ethics 101.pptx
SASE Traffic Flow - ZTNA Connector-1.pdf
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
Introuction about WHO-FIC in ICD-10.pptx
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
INTERNET------BASICS-------UPDATED PPT PRESENTATION
WebRTC in SignalWire - troubleshooting media negotiation
The Internet -By the Numbers, Sri Lanka Edition
Unit-3 cyber security network security of internet system
Paper PDF World Game (s) Great Redesign.pdf

Multi-Layer DDoS Mitigation Strategies

  • 1. 1 Multi-Layer DDoS Mitigation Strategies Sagi Brody, CTO @webairsagi sagi@webair.com Logan Best Senior Infrastructure Engineer logan@webair.com
  • 2. 2 Multi-Layer DDoS Mitigation Strategies Application Server(s) Load Balancers/Proxies IDS/IPS Network 3rd Party Scrubbing 3rd Party CDN/Proxies Firewall
  • 3. 3 Fully Managed Web Stack Application Server Load Balancers IDS/IPS Network Scrubbing CDN/Proxies FW & Cache plugins Memcache, Fail2ban, HAProxy + keepalived, nginx, SOCaaS, ProtectWise, AlertLogic, Snort RTBH, FlowSpec, Outbound filters Network Taps , Analysis, Automated BGP Redirects to CDN in App or via HTTP rewrite MikroTik, PaloAlto, JuniperFirewall
  • 4. 4 Why? - New Attack Landscape • DDoS Ransom on the rise with Bitcoins - Attackers becoming more anonymous • Multiple governments issue warnings about DD4BC • Stress Testers • Used to be called “booters’, available on IRC (EFnet anyone?) • DDoS-as-a-Service • Christmas 2014, Lizard Squad “stress tested” PSN and Xbox Live. Sets up lizardstresser.su to monetize. • Inexpensive - as little as $5/attack • Technically legal, RageBooter.net claims legal, provides full phone support. • DDoS Mitigation Companies targeted
  • 5. 5 Why? - Unlikely DDoS Originators • IoT • IoCT? Internet of Compromised Things? • Professor in Berlin creates smart home. Lightbulb unintentionally launches DoS against controller, causing home to lock up. • Proliferation of cheap android devices and LTE will result in perfect mobile storm. • 1 billion devices 0.1% vulnerable: • 100 kilobits per second == 100 gigabits per second • 100 pps == 100 million packets per second • Today: • 7.2 Billion cell devices globally • 6.4 Billion IoT devices globally
  • 6. 6 More sophisticated attackers • Less total attacks, increase in effectiveness • Attacks are getting more complicated and last longer • More effective L7 Botnets being used
  • 7. 7 Our Environment Founded: 1996 Headquarters: Long Island, NY Services Offered: Public, Private & Hybrid Cloud, Dedicated Servers, Colocation, CDN, Security, DRaaS, and more Customers: Enterprise, Healthcare, SMBs, VoIP providers, eCommerce, Information Technology, and more The Webair Value:  ➢ Over 18 years providing customers with best-in-class Managed Hosting solutions ➢ High-touch Support ➢ Full ownership of our customer’s infrastructure stack so they can focus on their core business. ➢ Manages most secure and redundant facility east of Manhattan with trans-Atlantic bypass (Tier III, HIPPA/SSAE16)
  • 9. 9 Application Layer • Simple to take sites down with low request volume • Stay under volumetric detection’s radar • Uncached dynamic (db backed) URLs fall over quickly (especially if framework is known) • Poorly written SQL queries • Apps written w/o scale in mind • Cross-site scripting, SQL injection, buffer overflows, file inclusion, oh my… • Search result pages, POST to forms, comments, etc • Botnets storing session cookies, use real ‘hidden’ browsers on infected PCs • Simple HTTP floods lead to state-exhaustion • Part of larger multi-vector attacks
  • 10. 10 Application Layer Protection • Framework or App specific plugins - WP (NinjaFirewall, Wordfence) • HTTP server modules - mod_evasive, mod_security • Common caching layers can perform rate limiting based on specific request attributes (nginx, varnish) • Cache for security • In memory - (memcache, redis) • Opcode caching - (APC, xcache, eAccelerator) • SQL - (sphinx search, solr, elasticsearch) • File • Follow best practices for web scale: • Disable all unnecessary logging • Scale-out architecture • In-memory session management • (many more!..)
  • 11. 11 Server Layer Linux Kernel /etc/sysctl.conf customization: • Prevent against the common 'syn flood attack' #net.ipv4.tcp_syncookies = 1 • Increase the number of outstanding syn requests allowed #net.ipv4.tcp_max_syn_backlog = 4096 • Reduce # of potential ACK replies (default 5) #net.ipv4.tcp_synack_retries = 3 • Reduce # of connections in TIME_WAIT state #net.ipv4.tcp_fin_timeout = 15 • Enable IP spoofing protection (turn on source route verification) #net.ipv4.conf.all.rp_filter = 1 #net.ipv4.conf.default.rp_filter = 1 • Decrease the time default value for tcp_keepalive_time connection #net.ipv4.tcp_keepalive_time = 1800
  • 12. 12 Server Layer IPTables rules: • Rate limit and block syn flooding: #iptables -N syn-flood #iptables -A syn-flood -m limit --limit 100/second --limit-burst 150 -j RETURN #iptables -A syn-flood -j LOG --log-prefix "SYN flood: “ #iptables -A syn-flood -j DROP • Drop excessive RST packets to avoid smurf attacks #iptables -A INPUT -p tcp -m tcp --tcp-flags RST RST -m limit --limit 2/second --limit-burst 2 -j ACCEPT #iptables -A INPUT -p icmp -m icmp --icmp-type address-mask-request -j DROP #iptables -A INPUT -p icmp -m icmp --icmp-type timestamp-request -j DROP #iptables -A INPUT -p icmp -m icmp -j DROP • Drop Invalid Packets #iptables -A INPUT -m state --state INVALID -j DROP #iptables -A FORWARD -m state --state INVALID -j DROP #iptables -A OUTPUT -m state --state INVALID -j DROP
  • 13. 13 Server Layer IPTables rules: •Reject spoofed packets (bogon networks, RFC1918) #iptables -A INPUT -s 10.0.0.0/8 -j DROP #iptables -A INPUT -s 169.254.0.0/16 -j DROP #iptables -A INPUT -s 172.16.0.0/12 -j DROP #iptables -A INPUT -d 239.255.255.0/24 -j DROP #iptables -A INPUT -d 255.255.255.255 -j DROP …….etc • Reject ports, protocols, and IPs not in use. Are you really using UDP port 80? • Fail2Ban/SSHGuard • Mindful of NFS overhead (stop logging to NFS!)
  • 14. 14 Load Balancers • Load balancers can shield app/servers from attacks • Already operating at L7, ability to perform complex L7 rules and mitigation, https via offload • Provides inherent synflood protection, slowloris, • Traditional appliance solutions too rigid. Next gen ADC (Application delivery controller) to provide LB, WAF, Cache combined • DIY, our kit: Ansible, Debian/RHEL, HAProxy, keepalived, csync, git, automation software for provisioning, configuration, attack defense • Integrate with 3rd party software easily (geoip, automated blacklists) • Tie into caching: (varnish, nginx)
  • 15. 15 Load Balancers (HAProxy) • Provides rate limiting on many levels: • Connections per IP • Connection rate per IP • Bandwidth usage too high • Client not respecting RFCs (IE for SMTP) • HTTP request rate (L7) - Block based on • Request string/regex • User-Agent • Any other tracked variables • Vulnerability scanners: • Invalid or truncated requests • Denied or tarpitted requests • Failed authentications • 4xx error pages
  • 16. 16 HAProxy examples stick-table type ip size 256k expire 300s peers mypeers store gpc0,http_req_rate(5s),conn_cur,conn_rate(5s),http_err_rate(5s) acl abuse src_http_req_rate gt 50 acl flag_abuser sc1_inc_gpc0 acl ipwhitelist src -f /path/to/ipwhitelist.txt acl ipblacklist src -f /path/to/ipblacklist.txt tcp-request connection track-sc1 src tcp-request connection reject if ipblacklist tcp-request connection accept if ipwhitelist tcp-request connection reject if { sc1_conn_cur ge 30 } tcp-request connection reject if { sc1_conn_rate ge 20 } tcp-request connection reject if { sc1_get_gpc0 gt 0 } tcp-request content reject if { sc1_get_gpc0 gt 0 } http-request deny if ipblacklist http-request allow if ipwhitelist http-request deny if { sc1_get_gpc0 gt 0 } http-request deny if { sc1_http_err_rate ge 20 } flag_abuser http-request deny if abuse flag_abuser
  • 17. 17 IDS/IPS • “Threat Monitoring & Mitigation” • Sits behind the FW to catch unprotected malicious traffic • Works in virtual environments as well • Can be tap/span, logs, or libpcap based • Graphs and other cool Visual Dashboards! • No the “be all, end all” solution • API/Developer friendly • SOCaaS • Monitors 24/7/365, SLA backed • Hands on investigations • Detailed intrusion information (kill-chain analysis) • Custom retention periods for all types of compliance • packet replay
  • 20. 20 Firewalls • WAF capabilities becoming standard w/ all new FWs • Is WAF even enough? (Palo Alto says no) • L7 SSL inspect via passthrough certs • Many great OSS options still exist • MikroTik: • SSH/GUI w/ built in easy packet sniffing • L7 regex matching • VPN (IPSec, PPTP, SSTP, L2TP), BGP, OSPF, etc.. • Run a whole ISP on it :) • HW appliance, w/ support and built in virtualization • Dynamic address lists based on multitude of rules • ‘Good’ IPv6 support FTW!
  • 23. 23 Network • Block Martian and Bogon routes (automate if possible) • Unicast Reverse Path Forwarding (w/ full routes) • Filter unknown outbound packets to prevent spoofing + retaliation • Proper flow monitoring at the edge - CLI + GUI • Packet sniffing • Strategy around reflection attacks: • Detect internally • Run scan and patch? • Block outbound if you can or redirect to internal server(s) •IPv6 /64 assignments are bad - NDP exhaustion
  • 24. 24 Network • RTBH (remotely triggered blackhole) on your network (but kills dst) • Blackhole srcs upstream via community strings • Automate ^^ via scripts/software • BGP Flowspec: Use BGP to distribute flow specification filters and dynamically filter on routers. • communities based actions (accept, discard, rate-limit, sample, redirect) • Match on combination of source/dest prefix, source/dest port, ICMP type/code, packet size, DSCP, TCP flag, fragment encoding, etc • Leverage ASIC filtering in routers • Available today
  • 26. 26 3rd Party on-demand scrubbing Providers: • Staminus communications • Level3 (legacy BlackLotus) • TATA • Savvis • Verisign • Anyone running Arbor gear?? BGP enabled on the fly mitigation
  • 27. 27 3rd Party on-demand scrubbing • On Demand: Enable Mitigation only when needed. “Insurance Policy” • Assume potential attack will always have more BW than you • Many providers now support L7 mitigation via BGP swing • Upgrading capacity as needed via contracts, not hardware • On prem device detects attacks and auto-swings on its own (automation) • “Big Data” play - view details on attack, portal, reports • A ‘required’ value add these days • If BGP cannot be maintained to provider, route withdraws, attack comes back to you. Some providers can instigate their own announcements on request
  • 28. 28 3rd Party CDN/Proxies • “Always on” - All connections proxies via 3rd party (for better, or worse) • Usually work well out of the box with popular applications • Simple way to handle many security touch points: • Caching & CDN • WAF capabilities and common injection detection • SSL offload • Custom Rules • Easy to use for Beginners • Enterprise offerings can: • Cache dynamic applications (EdgeCast/VZW + Fast.ly) • Work with Varnish VCLs and other common formats • Mid-tier origin caching • Option of last resort: CAPTCHA for user verification (eww) • Not a complete solution, origins are usually found
  • 30. 30 THANK YOU! Sagi Brody, CTO @WebairSagi sagi@webair.com Logan Best Senior Infrastructure/Network Engineer logan@webair.com *Research data provided via Staminus Communications

Editor's Notes

  • #2: Speaker: Sagi
  • #3: Speaker: Sagi
  • #4: Speaker: Sagi
  • #5: Speaker: Sagi
  • #6: Speaker: Sagi - How exactly do you reboot your home?
  • #7: Speaker: Sagi
  • #8: Speaker: Sagi
  • #9: Speaker: Sagi
  • #10: Speaker: Sagi
  • #11: Speaker: Sagi
  • #12: Speaker: Logan Simple things like per-IP rate limiting, flooding rate limits, and syn cookies should be enabled without a question. The sysctl variables improves the overall network handling efficiency and protects about common SYN/ACK Denial of service attacks. In syslog on server, I saw lots of "nf_conntrack: table full, dropping packet". And netstat showed lots of TIME_WAIT.
  • #13: Speaker: Logan
  • #14: Speaker: Logan
  • #15: Speaker: Logan An application delivery controller (ADC) is a computer network device in a datacenter, often part of an application delivery network (ADN), that helps perform common tasks such as those done by web sites to remove load from the web servers themselves. Many also provide load balancing.
  • #16: Speaker: Logan
  • #17: Speaker: Logan Our Basic HAP ddos config ACL’s. Many many more options to harden applications of all types
  • #18: Speaker: Logan & Sagi
  • #19: Speaker: Logan
  • #20: Speaker: Sagi
  • #21: Speaker: Sagi mention NTP and DNS reflection specifically detail IPv6 Allocation/Assignment flow (Allocate /64 to client, assign /120 etc to vlan)
  • #22: Speaker: Sagi
  • #23: Speaker: Sagi
  • #24: Speaker: Sagi
  • #25: Speaker: Sagi
  • #26: Speaker: Logan
  • #28: Speaker: Sagi