SlideShare a Scribd company logo
1 of 57
Download to read offline
DDOS ATTACKS:
PREPARATION-DETECTION-MITIGATION
Mohammad Fakrul Alam
dhakaCom Limited
fakrul [at] dhakacom [dot] com
SANOG 21
January 27 - Feb 4, 2013
Cox's Bazar, Bangladesh
AGENDA
1.  Overview of (D)DoS
2.  How to (D)DoS
3.  Motivation
4.  Attack Type
5.  Detection
6.  Preparation
7.  Mitigation
•  Layer 4 DDoS
•  Layer 7 DDoS
•  Link-Local DoS: IPv6 RA Attack
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
WHAT DDOS IS NOT
•  May companies think this is random and not happen to
them. It doesn’t happen everyday.
•  You can be prepared.
•  You can have insurance.
•  ….so don’t get panic ;-)
•  And you don’t need magical power to deal with it.
•  You just need proper training.
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
(D)DOS: A REAL WORLD EXAMPLE
Imagine a Restaurant
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
1. People come & order
2. The waiter takes
their order
3. Served as the waiter
becomes free
(D)DOS: A REAL WORLD EXAMPLE
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
That is a (D)DoS:
making a resource unavailable by overloading.
Suddenly, hundreds or thousands of
customers come in and order a
glass of water.
The waiter becomes overwhelmed
with the quantity of requests. As
m o r e c u s t o m e r s e n t e r t h e
restaurant the waiter is unable to
attend to them because they are so
overwhelmed.
(D)DOS: IN THE COMPUTING WORLD
•  In computing, a denial-of-service attack (DoS attack) or
distributed denial-of-service attack (DDoS attack) is an
attempt to make a machine or network resource
unavailable to its intended users.
•  It is a "Denial of Service". The server is never
compromised, the databases never viewed, and the data
never deleted. Throughout and after the attack, the server
remains intact.
•  Compromise “A” of CIA.
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
Confidentiality Integrity Availability
(D)DOS: IN THE COMPUTING WORLD
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
DO I HAVE TO CARE
“To expect the world to treat you fairly, because you’re a
good person, is somewhat like asking a bull not to
attack you, because you’re a vegetarian!”
- Quote from the Reader’s Digest
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
HOW TO (D)DOS
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
Click really, really fast the “retry/reload” button
Scale vertically-> Recruit your friends/kids to do so
Scale horizontally -> Get a BOT
HOW TO (D)DOS: BOT
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
Conventional way of creating
BOT.
New technique, Rouge AP
HOW TO (D)DOS: C&C
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
MOTIVATION
Financial
• Competition
• Extortion
• Divert attention
• Proof of Power
Political
• Hacktivism
• “I’m a cooler kid than you”
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
CONSIDER THIS
•  How is a DDoS different from CNN pointing to
your home page?
•  How is that different from your primary Internet
connection goes down or servers crash?
•  Reactive vs. nonreactive handling?
•  DDoS absorption == being able to serve more
users faster
•  Change your attitude!
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
INSURANCE
•  Insurance is money you pay to be protected
from.
•  Happen / Might Not Happen.
•  You can be prepared:
•  Incident response plan
•  Tools
•  Gear
•  Partnerships
•  It may not be sufficient – you should have picked
the higher premium policy…
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
ATTACK TYPE
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
•  Asymmetric
•  DNS queries
•  SYN flood
•  Symmetric
•  GET flood
•  Reflected
•  Smurf/DNS (spoofed source)
•  Brute force or logic state attacks
•  Distributed
•  Any of the above (and many more)
•  Bandwidth
•  PPS
•  Storage
•  CPU
•  Application specific
•  Last but not least – patience - Who gets tired
first?
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
DETECTION:
GAME OF RESOURCE EXHAUSTION
ATTACK SURFACE
(CLASSIFIED BY LAYER)
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
Application Layer
Transport Layer
Internet Layer
Network Access Layer
Application Layer
Presentation Layer
Session Layer
Transport Layer
Network Layer
Data Link Layer
Physical Layer
TCP/IP Model OSI Model
LAYER 1 & 2 ATTACK
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
Physical
Data Link
Network
Transport
Session
Presentation
Application
•  Think?
LAYER 1 & 2 ATTACK
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
Physical
Data Link
Network
Transport
Session
Presentation
Application
•  Cut cables
•  Jamming
•  Power surge
•  EMP
•  MAC Spoofing
•  MAC flood
LAYER 3 ATTACK
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
Physical
Data Link
Network
Transport
Session
Presentation
Application
•  Think?
LAYER 3 ATTACK
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
Physical
Data Link
Network
Transport
Session
Presentation
Application
•  Floods (ICMP)
•  Teardrop (overlapping IP
segments)
LAYER 4 ATTACK
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
Physical
Data Link
Network
Transport
Session
Presentation
Application
•  Think?
LAYER 4 ATTACK
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
Physical
Data Link
Network
Transport
Session
Presentation
Application
•  SYN Flood
•  RST Flood
•  FIN Flood
•  Connect Attack (Socket
Exhaustion)
•  LAND (same IP as src/dst)
LAYER 5 ATTACK
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
Physical
Data Link
Network
Transport
Session
Presentation
Application
•  Think?
LAYER 5 ATTACK
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
Physical
Data Link
Network
Transport
Session
Presentation
Application
•  Sloworis
LAYER 6 ATTACK
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
Physical
Data Link
Network
Transport
Session
Presentation
Application
•  Think?
LAYER 6 ATTACK
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
Physical
Data Link
Network
Transport
Session
Presentation
Application
•  XML Attacks
<!DOCTYPE lolz
[
<!ENTITY lol1 "&lol2;">
<!ENTITY lol2 "&lol1;">
]>
<lolz>&lol1;</lolz>
LAYER 7 ATTACK
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
Physical
Data Link
Network
Transport
Session
Presentation
Application
•  Think?
LAYER 7 ATTACK
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
Physical
Data Link
Network
Transport
Session
Presentation
Application
•  SPAM
•  DNS Queries
•  HTTP GET Flood
SIMPLIFIED TCP STATE MACHINE
•  LISTEN – waiting for a connection request
•  SYN_RECV – received request still negotiating
•  ESTABLISHED – connection working OK
•  FIN-WAIT1 & 2 – one side closed the
connection
•  TIME-WAIT – waiting for a while
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
LIFE OF A SOCKET
•  Socket = TCP/UDP port + IP address
•  Normal connection
root@access:/home/fakrul# netstat -nap | grep 8080!
tcp !0 !0 :::8080 !:::* !LISTEN 1426/apache2 !
!
root@access:/home/fakrul# netstat -nap | grep 8080 !
tcp 0 0 192.168.1.250:8080 192.168.1.35:49560 ESTABLISHED
3918/apache2!
!
root@access:/home/fakrul# netstat -nap | grep 8080!
tcp 0 0 192.168.1.250:8080 192.168.1.35:49557 TIME_WAIT
- !
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
DETECTION ON THE HOST
•  Your best friend: netstat
netstat –nap!
•  Your next best friend: tcpdump
tcpdump –n –i <interface> –s 0 –w <target_file.pcap>
–c <packet_count>!
•  Dedicated IDS (snort/suricata)
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
PREPARATION & MITIGATION
Key Points to Note:
1.  You can only stop DDoS attacks after your own
perimeter.
2.  You can’t stop DDoS attacks before your
perimeter – unless others are ready to help you.
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
IN PEACE TIME
•  You should have your monitoring ahead of time.
•  Have a Incident response plan.
•  When do you need to escalate?
•  Your security gear (if at all present).
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
MONITORING IMPACT
•  The most neglected resource.
•  No matter how much traffic they throw at you,
there is no problem until your users start seeing
it.
•  Use internal monitoring.
•  Use external monitoring services.
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
IN THE HEAT OF THE MOMENT
•  What is actually happening? Focus on the facts.
•  Collect data (from Systems, Network Graphs,
Capture Traffic).
•  Create a response plan.
•  Execute.
•  Observe.
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
MITGATION
•  Depends on the layer of attack
•  Depends on the resource affected
•  Do it yourself
•  Dedicated hardware
•  Tune (change) your software
•  Scrubbing providers
•  Firewalls and challenges
•  Horizontally scaled server frontends
•  “To the cloud!” ;
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
SYN FLOOD
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
What does it take:
•  Think 3-way handshake.
•  Server has a number of
s l o t s f o r i n c o m i n g
connections.
•  When slots are full no more
connections are accepted.
HOW TO RECOGNIZE SYN FLOOD
Active Internet connections (servers and established)!
Proto Recv-Q Send-Q Local Address Foreign Address State PID/
Program!
name!
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1339/rpcbind!
tcp 0 0 0.0.0.0:33586 0.0.0.0:* LISTEN 1395/rpc.statd!
tcp 0 0 192.168.122.1:53 0.0.0.0:* LISTEN 1962/dnsmasq!
tcp 0 0 192.168.1.250:631 0.0.0.0:* LISTEN 1586/cupsd!
tcp 0 0 192.168.1.250:25 0.0.0.0:* LISTEN 2703/sendmail: acce!
tcp 0 0 192.168.1.250:25 192.168.1.35:49718 SYN_RECV -!
tcp 0 0 192.168.1.250:25 192.168.1.35:49717 SYN_RECV -!
tcp 0 0 192.168.1.250:25 192.168.1.35:49722 SYN_RECV -!
tcp 0 0 192.168.1.250:25 192.168.1.35:49720 SYN_RECV -!
tcp 0 0 192.168.1.250:25 192.168.1.35:49719 SYN_RECV -!
tcp 0 0 192.168.1.250:25 192.168.1.35:49721 SYN_RECV -!
tcp 0 0 192.168.1.250:25 192.168.1.35:49716 SYN_RECV -!
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
SYN MITIGATION
SYN Cookies
•  Special hash
•  Enable by:
•  echo 1 > /proc/sys/net/ipv4/tcp_syncookies!
•  Other timeouts to tweak (in /proc/sys/net/ipv4/):
•  tcp_max_syn_backlog [how many SYN requests to keep in memory that we have
yet to get the third packet in a 3-way handshake from]
•  tcp_synack_retries [how many times to retransmit the SYN,ACK reply to an SYN
request]
•  tcp_syn_retries [how many times to try to retransmit the initial SYN packet for an
active TCP connection attempt]
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
Active Internet connections (servers and established)!
Proto Recv-Q Send-Q Local Address Foreign Address State PID/
Program!
Name!
tcp 0 0 192.168.1.250:631 0.0.0.0:* LISTEN 1586/cupsd!
tcp 0 0 192.168.1.250:25 0.0.0.0:* LISTEN 2703/sendmail: acce!
tcp 0 0 192.168.1.250:25 192.168.1.35:49718 TIME_WAIT -!
tcp 0 0 192.168.1.250:25 192.168.1.35:49717 TIME_WAIT -!
tcp 0 0 192.168.1.250:25 192.168.1.35:49722 TIME_WAIT -!
tcp 0 0 192.168.1.250:25 192.168.1.35:49720 TIME_WAIT -!
tcp 0 0 192.168.1.250:25 192.168.1.35:49719 TIME_WAIT -!
tcp 0 0 192.168.1.250:25 192.168.1.35:49721 TIME_WAIT -!
tcp 0 0 192.168.1.250:25 192.168.1.35:49716 TIME_WAIT -!
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
HOW TO RECOGNIZE SOCKET
EXHAUSTION
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
•  Enable socket reuse
•  echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle!
•  echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse!
•  Increase local port range
•  echo 1024 65535 > /proc/sys/net/ipv4/
ip_local_port_range!
•  Check learn about the value in
•  /proc/sys/net/ipv4/tcp_*!
SOCKET EXHAUSTION/CONNECT
MITIGATION
UPPER LAYER (D)DOS ATTACK
•  SlowLoris
•  Send incomplete GET request.
•  Freeze apache with one packet per second.
•  It’s specific to Apache only, other webserver will not be effected.
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
$ ./slowloris.pl -dns
[www.example.com] –options!
UPPER LAYER (D)DOS ATTACK
•  OWASP HTTP POST Tool & R-U-Dead-Yet
•  Incomplete HTTP POSTs.
•  Stops IIS, but requires thousand of packet per seconds.
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
$ ./r-u-dead-yet.py
http://localhost/
upload.html!
MITIGATION UPPER LAYER
•  Architecture of applications
•  Apache – process based – In Linux kernel level
threads
•  Nginx – event based
•  Mitigation through challenges
•  Nginx plugin – Roboo (ECL-LABS.ORG)
•  Apache - ModSecurity
•  Load Balancer
•  Split DNS!!
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
MITIGATION UPPER LAYER
•  Nginx plugin – Roboo Configuration
perl Roboo::handler;!
!set $Roboo_challenge_modes "SWF,gzip";!
!set $Roboo_cookie_name "Anti-Robot”;!
!set $Roboo_validity_window 600;!
!set $Roboo_whitelist "IP(),UA(''),URI('')”;!
!set $Roboo_charset "UTF-8”;!
!set $Roboo_challenge_hash_input $remote_addr;!
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
Sample challenged.log
192.168.1.250 - - [08/Nov/2012:13:03:47 +0600] "GET /Anti-Robot-
GET-f9e5de6f1f226fbb7472.swf HTTP/1.1" 200 1023 "http://
192.168.1.1/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5)
AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/
537.4”!
MITIGATION UPPER LAYER
•  Split DNS!!
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
•  DNS resolve based on the users source.
•  Possible to distribute the (D)DoS load.
•  BIND ACL with IP.
•  GeoDNS BIND patch.
DNS AMPLIFICATION DDOS ATTACK
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
•  Attacks using IP spoofed DNS query
•  Generating a traffic overload
•  Bandwidth attack
•  Similar to ‘smurf attacks’
•  Components are:
•  IP spoofing
•  DNS amplification
DNS AMPLIFICATION DDOS ATTACK
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
DNS AMPLIFICATION DDOS ATTACK
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
•  dig ANY isc.org @x.x.x.x +edns=0!
-->output truncated<--!
;; AUTHORITY SECTION:!
isc.org. ! !3569 !IN !NS !ams.sns-pb.isc.org.!
isc.org. ! !3569 !IN !NS !sfba.sns-pb.isc.org.!
isc.org. ! !3569 !IN !NS !ord.sns-pb.isc.org.!
isc.org. ! !3569 !IN !NS !ns.isc.afilias-nst.info.!
!
;; ADDITIONAL SECTION:!
ns.isc.afilias-nst.info. 82769 !IN !A !199.254.63.254!
ns.isc.afilias-nst.info. 82769 !IN !AAAA !2001:500:2c::254!
!
;; Query time: 79 msec!
;; SERVER: 103.12.179.12#53(103.12.179.12)!
;; WHEN: Mon Nov 26 16:50:09 2012!
;; MSG SIZE rcvd: 3191!
That's a 64 byte query that resulted in
a 3,191 byte response. In other words,
an attacker is able to achieve a 50x
amplification over whatever traffic they
can initiate to an open DNS resolver.
MITIGATION DNS AMPLIFICATION
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
•  Disable Open Recursive DNS
•  For BIND 9.x authoritative servers, apply the
following global options:
options {!
recursion no;!
additional-from-cache no;!
};!
•  For BIND 9.x caching servers
acl "trusted" {!
192.0.2.0/24;!
};!
options {!
recursion no;!
additional-from-cache
no;!
allow-query { none; };!
};!
view "trusted" in {!
match-clients
{ trusted; };!
allow-query { trusted; };!
recursion yes;!
additional-from-cache yes;!
};!
LINK LOCAL DOS: IPV6 RA ATTACK
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
1.  A single device can instantly stop all the Windows
machines on a Local Area Network.
2.  Effected OS:
•  Windows XP, Vista, Windows 7, Server 2008
•  It is also reported that X-Box & PS3 is also effected.
•  FreeBSD
3.  CVE-2010-4669
•  CVSS Severity: High
LINK LOCAL DOS: IPV6 RA ATTACK
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
Live Demonstration
MITIGATION LINK LOCAL DOS
•  Disable IPv6.
•  Turn of Router Discovery.
•  Use a firewall to block rogue Router Advertisements.
•  Microsoft’s “IPv6 Readiness Update” provides some
protection.
•  Released November 13, 2012
•  KB 2750841
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
FEW RECOMMENDATION
1.  Stop spoofed TCP attacks at your perimeter.
2.  Don’t let dark address packets pass your perimeter.
3.  Block unused protocols and ports.
4.  Limit number of access per second per source IP.
5.  Limit number of concurrent connections per source IP.
6.  Don’t forward packets with header anomalies.
7.  Monitor self similarity in traffic.
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
MAKE YOUR FRIENDS
•  Look around, who else might be suffering this?
•  Build partnerships.
•  Build social contacts.
•  Prepare before it hits.
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
QUESTIONS?
SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh

More Related Content

Viewers also liked

20140418 iso27002 - information security foundation based on isoiec 27002 (...
20140418   iso27002 - information security foundation based on isoiec 27002 (...20140418   iso27002 - information security foundation based on isoiec 27002 (...
20140418 iso27002 - information security foundation based on isoiec 27002 (...
Alessandro Grillo
 

Viewers also liked (14)

Community tools to fight against DDoS
Community tools to fight against DDoSCommunity tools to fight against DDoS
Community tools to fight against DDoS
 
Windows 2012 and DNSSEC
Windows 2012 and DNSSECWindows 2012 and DNSSEC
Windows 2012 and DNSSEC
 
DDoS-bdNOG
DDoS-bdNOGDDoS-bdNOG
DDoS-bdNOG
 
Fighting Abuse with DNS
Fighting Abuse with DNSFighting Abuse with DNS
Fighting Abuse with DNS
 
20140418 iso27002 - information security foundation based on isoiec 27002 (...
20140418   iso27002 - information security foundation based on isoiec 27002 (...20140418   iso27002 - information security foundation based on isoiec 27002 (...
20140418 iso27002 - information security foundation based on isoiec 27002 (...
 
Policy SIG (3) Agenda
Policy SIG (3) AgendaPolicy SIG (3) Agenda
Policy SIG (3) Agenda
 
Bangladesh Cyber Security Status in Global Perspective
Bangladesh Cyber Security Status in Global PerspectiveBangladesh Cyber Security Status in Global Perspective
Bangladesh Cyber Security Status in Global Perspective
 
IPv6 Deployment in Bangladesh
IPv6 Deployment in BangladeshIPv6 Deployment in Bangladesh
IPv6 Deployment in Bangladesh
 
Linux15 dynamic dns-2
Linux15 dynamic dns-2Linux15 dynamic dns-2
Linux15 dynamic dns-2
 
Linux14 Dynamic DNS
Linux14 Dynamic DNSLinux14 Dynamic DNS
Linux14 Dynamic DNS
 
Iptsp bangladesh shohel shikdar
Iptsp bangladesh shohel shikdarIptsp bangladesh shohel shikdar
Iptsp bangladesh shohel shikdar
 
LSC Technology Initiative Grant Conference 2015 | Session Materials - Trust t...
LSC Technology Initiative Grant Conference 2015 | Session Materials - Trust t...LSC Technology Initiative Grant Conference 2015 | Session Materials - Trust t...
LSC Technology Initiative Grant Conference 2015 | Session Materials - Trust t...
 
DNS High-Availability Tools - Open-Source Load Balancing Solutions
DNS High-Availability Tools - Open-Source Load Balancing SolutionsDNS High-Availability Tools - Open-Source Load Balancing Solutions
DNS High-Availability Tools - Open-Source Load Balancing Solutions
 
What is new in BIND 9.11?
What is new in BIND 9.11?What is new in BIND 9.11?
What is new in BIND 9.11?
 

Similar to DDoS Attacks : Preparation Detection Mitigation

Drupal for Project Managers, Part 3: Launching
Drupal for Project Managers, Part 3: LaunchingDrupal for Project Managers, Part 3: Launching
Drupal for Project Managers, Part 3: Launching
Acquia
 
11g r2 rac grid clusterware doug presentation 10 21-10
11g r2 rac grid clusterware doug presentation 10 21-1011g r2 rac grid clusterware doug presentation 10 21-10
11g r2 rac grid clusterware doug presentation 10 21-10
admdbarac
 
Introduction to Cloud Computing
Introduction to Cloud ComputingIntroduction to Cloud Computing
Introduction to Cloud Computing
Siva Arunachalam
 
Automating a Secure MongoDB Deployment with Opscode and Gazzang
Automating a Secure MongoDB Deployment with Opscode and GazzangAutomating a Secure MongoDB Deployment with Opscode and Gazzang
Automating a Secure MongoDB Deployment with Opscode and Gazzang
MongoDB
 

Similar to DDoS Attacks : Preparation Detection Mitigation (20)

Bangladesh Cyber Incident Trends 2012 & bdCERT Update
Bangladesh Cyber Incident Trends 2012 & bdCERT UpdateBangladesh Cyber Incident Trends 2012 & bdCERT Update
Bangladesh Cyber Incident Trends 2012 & bdCERT Update
 
Drupal for Project Managers, Part 3: Launching
Drupal for Project Managers, Part 3: LaunchingDrupal for Project Managers, Part 3: Launching
Drupal for Project Managers, Part 3: Launching
 
Dns security threats and solutions
Dns security   threats and solutionsDns security   threats and solutions
Dns security threats and solutions
 
11g r2 rac grid clusterware doug presentation 10 21-10
11g r2 rac grid clusterware doug presentation 10 21-1011g r2 rac grid clusterware doug presentation 10 21-10
11g r2 rac grid clusterware doug presentation 10 21-10
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Databricks Fundamentals
Databricks FundamentalsDatabricks Fundamentals
Databricks Fundamentals
 
Topic 12: NoSQL in Action
Topic 12: NoSQL in ActionTopic 12: NoSQL in Action
Topic 12: NoSQL in Action
 
"How overlay networks can make public clouds your global WAN" by Ryan Koop o...
 "How overlay networks can make public clouds your global WAN" by Ryan Koop o... "How overlay networks can make public clouds your global WAN" by Ryan Koop o...
"How overlay networks can make public clouds your global WAN" by Ryan Koop o...
 
CloudAustin Black Friday 2013
CloudAustin Black Friday 2013CloudAustin Black Friday 2013
CloudAustin Black Friday 2013
 
JBoss Architect Meetup - December 2013 - JBoss Fuse in Vodafone’s Global Inte...
JBoss Architect Meetup - December 2013 - JBoss Fuse in Vodafone’s Global Inte...JBoss Architect Meetup - December 2013 - JBoss Fuse in Vodafone’s Global Inte...
JBoss Architect Meetup - December 2013 - JBoss Fuse in Vodafone’s Global Inte...
 
Getting Started with Meteor
Getting Started with MeteorGetting Started with Meteor
Getting Started with Meteor
 
NoSQL and MongoDB Introdction
NoSQL and MongoDB IntrodctionNoSQL and MongoDB Introdction
NoSQL and MongoDB Introdction
 
NetCommunity New Features Preview
NetCommunity New Features Preview NetCommunity New Features Preview
NetCommunity New Features Preview
 
Coming to cassandra from relational world (New)
Coming to cassandra from relational world (New)Coming to cassandra from relational world (New)
Coming to cassandra from relational world (New)
 
Making MySQL Flexible with ParElastic Database Scalability, Amrith Kumar, Fou...
Making MySQL Flexible with ParElastic Database Scalability, Amrith Kumar, Fou...Making MySQL Flexible with ParElastic Database Scalability, Amrith Kumar, Fou...
Making MySQL Flexible with ParElastic Database Scalability, Amrith Kumar, Fou...
 
Introduction to Cloud Computing
Introduction to Cloud ComputingIntroduction to Cloud Computing
Introduction to Cloud Computing
 
Automating a Secure MongoDB Deployment with Opscode and Gazzang
Automating a Secure MongoDB Deployment with Opscode and GazzangAutomating a Secure MongoDB Deployment with Opscode and Gazzang
Automating a Secure MongoDB Deployment with Opscode and Gazzang
 
Oracle SOA Suite Performance Tuning- UKOUG Application Server & Middleware SI...
Oracle SOA Suite Performance Tuning- UKOUG Application Server & Middleware SI...Oracle SOA Suite Performance Tuning- UKOUG Application Server & Middleware SI...
Oracle SOA Suite Performance Tuning- UKOUG Application Server & Middleware SI...
 
Future of Data Intensive Applicaitons
Future of Data Intensive ApplicaitonsFuture of Data Intensive Applicaitons
Future of Data Intensive Applicaitons
 
DNS Security Threats and Solutions
DNS Security Threats and SolutionsDNS Security Threats and Solutions
DNS Security Threats and Solutions
 

More from Fakrul Alam

Electornic evidence collection
Electornic evidence collectionElectornic evidence collection
Electornic evidence collection
Fakrul Alam
 

More from Fakrul Alam (9)

bdNOG Update in APRICOT 2015
bdNOG Update in APRICOT 2015bdNOG Update in APRICOT 2015
bdNOG Update in APRICOT 2015
 
Global Cyber Security trend & impact of Internet on the society of Bangladesh...
Global Cyber Security trend & impact of Internet on the society of Bangladesh...Global Cyber Security trend & impact of Internet on the society of Bangladesh...
Global Cyber Security trend & impact of Internet on the society of Bangladesh...
 
A week with analysing RPKI status
A week with analysing RPKI statusA week with analysing RPKI status
A week with analysing RPKI status
 
RPKI Deployment Status in Bangladesh
RPKI Deployment Status in BangladeshRPKI Deployment Status in Bangladesh
RPKI Deployment Status in Bangladesh
 
Bangladesh Cyber Incident Trends 2013 & bdCERT Update
Bangladesh Cyber Incident Trends 2013 & bdCERT UpdateBangladesh Cyber Incident Trends 2013 & bdCERT Update
Bangladesh Cyber Incident Trends 2013 & bdCERT Update
 
RPKI (Resource Public Key Infrastructure)
RPKI (Resource Public Key Infrastructure)RPKI (Resource Public Key Infrastructure)
RPKI (Resource Public Key Infrastructure)
 
bdNOG Update (APRICOT 2014)
bdNOG Update (APRICOT 2014)bdNOG Update (APRICOT 2014)
bdNOG Update (APRICOT 2014)
 
IPv6 deployment status in Bangladesh
IPv6 deployment status in BangladeshIPv6 deployment status in Bangladesh
IPv6 deployment status in Bangladesh
 
Electornic evidence collection
Electornic evidence collectionElectornic evidence collection
Electornic evidence collection
 

Recently uploaded

Thalassery Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call G...
Thalassery Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call G...Thalassery Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call G...
Thalassery Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call G...
Call Girls In Delhi Whatsup 9873940964 Enjoy Unlimited Pleasure
 
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
nirzagarg
 
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
nilamkumrai
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
JOHNBEBONYAP1
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Chandigarh Call girls 9053900678 Call girls in Chandigarh
 

Recently uploaded (20)

Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
 
Thalassery Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call G...
Thalassery Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call G...Thalassery Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call G...
Thalassery Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call G...
 
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
 
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
 
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
 
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
 
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls DubaiDubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
 
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
 
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
 

DDoS Attacks : Preparation Detection Mitigation

  • 1. DDOS ATTACKS: PREPARATION-DETECTION-MITIGATION Mohammad Fakrul Alam dhakaCom Limited fakrul [at] dhakacom [dot] com SANOG 21 January 27 - Feb 4, 2013 Cox's Bazar, Bangladesh
  • 2. AGENDA 1.  Overview of (D)DoS 2.  How to (D)DoS 3.  Motivation 4.  Attack Type 5.  Detection 6.  Preparation 7.  Mitigation •  Layer 4 DDoS •  Layer 7 DDoS •  Link-Local DoS: IPv6 RA Attack SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
  • 3. WHAT DDOS IS NOT •  May companies think this is random and not happen to them. It doesn’t happen everyday. •  You can be prepared. •  You can have insurance. •  ….so don’t get panic ;-) •  And you don’t need magical power to deal with it. •  You just need proper training. SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
  • 4. (D)DOS: A REAL WORLD EXAMPLE Imagine a Restaurant SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh 1. People come & order 2. The waiter takes their order 3. Served as the waiter becomes free
  • 5. (D)DOS: A REAL WORLD EXAMPLE SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh That is a (D)DoS: making a resource unavailable by overloading. Suddenly, hundreds or thousands of customers come in and order a glass of water. The waiter becomes overwhelmed with the quantity of requests. As m o r e c u s t o m e r s e n t e r t h e restaurant the waiter is unable to attend to them because they are so overwhelmed.
  • 6. (D)DOS: IN THE COMPUTING WORLD •  In computing, a denial-of-service attack (DoS attack) or distributed denial-of-service attack (DDoS attack) is an attempt to make a machine or network resource unavailable to its intended users. •  It is a "Denial of Service". The server is never compromised, the databases never viewed, and the data never deleted. Throughout and after the attack, the server remains intact. •  Compromise “A” of CIA. SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh Confidentiality Integrity Availability
  • 7. (D)DOS: IN THE COMPUTING WORLD SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
  • 8. DO I HAVE TO CARE “To expect the world to treat you fairly, because you’re a good person, is somewhat like asking a bull not to attack you, because you’re a vegetarian!” - Quote from the Reader’s Digest SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
  • 9. HOW TO (D)DOS SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh Click really, really fast the “retry/reload” button Scale vertically-> Recruit your friends/kids to do so Scale horizontally -> Get a BOT
  • 10. HOW TO (D)DOS: BOT SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh Conventional way of creating BOT. New technique, Rouge AP
  • 11. HOW TO (D)DOS: C&C SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
  • 12. MOTIVATION Financial • Competition • Extortion • Divert attention • Proof of Power Political • Hacktivism • “I’m a cooler kid than you” SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
  • 13. CONSIDER THIS •  How is a DDoS different from CNN pointing to your home page? •  How is that different from your primary Internet connection goes down or servers crash? •  Reactive vs. nonreactive handling? •  DDoS absorption == being able to serve more users faster •  Change your attitude! SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
  • 14. INSURANCE •  Insurance is money you pay to be protected from. •  Happen / Might Not Happen. •  You can be prepared: •  Incident response plan •  Tools •  Gear •  Partnerships •  It may not be sufficient – you should have picked the higher premium policy… SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
  • 15. ATTACK TYPE SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh •  Asymmetric •  DNS queries •  SYN flood •  Symmetric •  GET flood •  Reflected •  Smurf/DNS (spoofed source) •  Brute force or logic state attacks •  Distributed •  Any of the above (and many more)
  • 16. •  Bandwidth •  PPS •  Storage •  CPU •  Application specific •  Last but not least – patience - Who gets tired first? SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh DETECTION: GAME OF RESOURCE EXHAUSTION
  • 17. ATTACK SURFACE (CLASSIFIED BY LAYER) SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh Application Layer Transport Layer Internet Layer Network Access Layer Application Layer Presentation Layer Session Layer Transport Layer Network Layer Data Link Layer Physical Layer TCP/IP Model OSI Model
  • 18. LAYER 1 & 2 ATTACK SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh Physical Data Link Network Transport Session Presentation Application •  Think?
  • 19. LAYER 1 & 2 ATTACK SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh Physical Data Link Network Transport Session Presentation Application •  Cut cables •  Jamming •  Power surge •  EMP •  MAC Spoofing •  MAC flood
  • 20. LAYER 3 ATTACK SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh Physical Data Link Network Transport Session Presentation Application •  Think?
  • 21. LAYER 3 ATTACK SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh Physical Data Link Network Transport Session Presentation Application •  Floods (ICMP) •  Teardrop (overlapping IP segments)
  • 22. LAYER 4 ATTACK SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh Physical Data Link Network Transport Session Presentation Application •  Think?
  • 23. LAYER 4 ATTACK SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh Physical Data Link Network Transport Session Presentation Application •  SYN Flood •  RST Flood •  FIN Flood •  Connect Attack (Socket Exhaustion) •  LAND (same IP as src/dst)
  • 24. LAYER 5 ATTACK SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh Physical Data Link Network Transport Session Presentation Application •  Think?
  • 25. LAYER 5 ATTACK SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh Physical Data Link Network Transport Session Presentation Application •  Sloworis
  • 26. LAYER 6 ATTACK SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh Physical Data Link Network Transport Session Presentation Application •  Think?
  • 27. LAYER 6 ATTACK SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh Physical Data Link Network Transport Session Presentation Application •  XML Attacks <!DOCTYPE lolz [ <!ENTITY lol1 "&lol2;"> <!ENTITY lol2 "&lol1;"> ]> <lolz>&lol1;</lolz>
  • 28. LAYER 7 ATTACK SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh Physical Data Link Network Transport Session Presentation Application •  Think?
  • 29. LAYER 7 ATTACK SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh Physical Data Link Network Transport Session Presentation Application •  SPAM •  DNS Queries •  HTTP GET Flood
  • 30. SIMPLIFIED TCP STATE MACHINE •  LISTEN – waiting for a connection request •  SYN_RECV – received request still negotiating •  ESTABLISHED – connection working OK •  FIN-WAIT1 & 2 – one side closed the connection •  TIME-WAIT – waiting for a while SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
  • 31. LIFE OF A SOCKET •  Socket = TCP/UDP port + IP address •  Normal connection root@access:/home/fakrul# netstat -nap | grep 8080! tcp !0 !0 :::8080 !:::* !LISTEN 1426/apache2 ! ! root@access:/home/fakrul# netstat -nap | grep 8080 ! tcp 0 0 192.168.1.250:8080 192.168.1.35:49560 ESTABLISHED 3918/apache2! ! root@access:/home/fakrul# netstat -nap | grep 8080! tcp 0 0 192.168.1.250:8080 192.168.1.35:49557 TIME_WAIT - ! SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
  • 32. DETECTION ON THE HOST •  Your best friend: netstat netstat –nap! •  Your next best friend: tcpdump tcpdump –n –i <interface> –s 0 –w <target_file.pcap> –c <packet_count>! •  Dedicated IDS (snort/suricata) SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
  • 33. PREPARATION & MITIGATION Key Points to Note: 1.  You can only stop DDoS attacks after your own perimeter. 2.  You can’t stop DDoS attacks before your perimeter – unless others are ready to help you. SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
  • 34. IN PEACE TIME •  You should have your monitoring ahead of time. •  Have a Incident response plan. •  When do you need to escalate? •  Your security gear (if at all present). SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
  • 35. MONITORING IMPACT •  The most neglected resource. •  No matter how much traffic they throw at you, there is no problem until your users start seeing it. •  Use internal monitoring. •  Use external monitoring services. SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
  • 36. IN THE HEAT OF THE MOMENT •  What is actually happening? Focus on the facts. •  Collect data (from Systems, Network Graphs, Capture Traffic). •  Create a response plan. •  Execute. •  Observe. SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
  • 37. MITGATION •  Depends on the layer of attack •  Depends on the resource affected •  Do it yourself •  Dedicated hardware •  Tune (change) your software •  Scrubbing providers •  Firewalls and challenges •  Horizontally scaled server frontends •  “To the cloud!” ; SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
  • 38. SYN FLOOD SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh What does it take: •  Think 3-way handshake. •  Server has a number of s l o t s f o r i n c o m i n g connections. •  When slots are full no more connections are accepted.
  • 39. HOW TO RECOGNIZE SYN FLOOD Active Internet connections (servers and established)! Proto Recv-Q Send-Q Local Address Foreign Address State PID/ Program! name! tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1339/rpcbind! tcp 0 0 0.0.0.0:33586 0.0.0.0:* LISTEN 1395/rpc.statd! tcp 0 0 192.168.122.1:53 0.0.0.0:* LISTEN 1962/dnsmasq! tcp 0 0 192.168.1.250:631 0.0.0.0:* LISTEN 1586/cupsd! tcp 0 0 192.168.1.250:25 0.0.0.0:* LISTEN 2703/sendmail: acce! tcp 0 0 192.168.1.250:25 192.168.1.35:49718 SYN_RECV -! tcp 0 0 192.168.1.250:25 192.168.1.35:49717 SYN_RECV -! tcp 0 0 192.168.1.250:25 192.168.1.35:49722 SYN_RECV -! tcp 0 0 192.168.1.250:25 192.168.1.35:49720 SYN_RECV -! tcp 0 0 192.168.1.250:25 192.168.1.35:49719 SYN_RECV -! tcp 0 0 192.168.1.250:25 192.168.1.35:49721 SYN_RECV -! tcp 0 0 192.168.1.250:25 192.168.1.35:49716 SYN_RECV -! SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
  • 40. SYN MITIGATION SYN Cookies •  Special hash •  Enable by: •  echo 1 > /proc/sys/net/ipv4/tcp_syncookies! •  Other timeouts to tweak (in /proc/sys/net/ipv4/): •  tcp_max_syn_backlog [how many SYN requests to keep in memory that we have yet to get the third packet in a 3-way handshake from] •  tcp_synack_retries [how many times to retransmit the SYN,ACK reply to an SYN request] •  tcp_syn_retries [how many times to try to retransmit the initial SYN packet for an active TCP connection attempt] SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
  • 41. Active Internet connections (servers and established)! Proto Recv-Q Send-Q Local Address Foreign Address State PID/ Program! Name! tcp 0 0 192.168.1.250:631 0.0.0.0:* LISTEN 1586/cupsd! tcp 0 0 192.168.1.250:25 0.0.0.0:* LISTEN 2703/sendmail: acce! tcp 0 0 192.168.1.250:25 192.168.1.35:49718 TIME_WAIT -! tcp 0 0 192.168.1.250:25 192.168.1.35:49717 TIME_WAIT -! tcp 0 0 192.168.1.250:25 192.168.1.35:49722 TIME_WAIT -! tcp 0 0 192.168.1.250:25 192.168.1.35:49720 TIME_WAIT -! tcp 0 0 192.168.1.250:25 192.168.1.35:49719 TIME_WAIT -! tcp 0 0 192.168.1.250:25 192.168.1.35:49721 TIME_WAIT -! tcp 0 0 192.168.1.250:25 192.168.1.35:49716 TIME_WAIT -! SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh HOW TO RECOGNIZE SOCKET EXHAUSTION
  • 42. SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh •  Enable socket reuse •  echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle! •  echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse! •  Increase local port range •  echo 1024 65535 > /proc/sys/net/ipv4/ ip_local_port_range! •  Check learn about the value in •  /proc/sys/net/ipv4/tcp_*! SOCKET EXHAUSTION/CONNECT MITIGATION
  • 43. UPPER LAYER (D)DOS ATTACK •  SlowLoris •  Send incomplete GET request. •  Freeze apache with one packet per second. •  It’s specific to Apache only, other webserver will not be effected. SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh $ ./slowloris.pl -dns [www.example.com] –options!
  • 44. UPPER LAYER (D)DOS ATTACK •  OWASP HTTP POST Tool & R-U-Dead-Yet •  Incomplete HTTP POSTs. •  Stops IIS, but requires thousand of packet per seconds. SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh $ ./r-u-dead-yet.py http://localhost/ upload.html!
  • 45. MITIGATION UPPER LAYER •  Architecture of applications •  Apache – process based – In Linux kernel level threads •  Nginx – event based •  Mitigation through challenges •  Nginx plugin – Roboo (ECL-LABS.ORG) •  Apache - ModSecurity •  Load Balancer •  Split DNS!! SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
  • 46. MITIGATION UPPER LAYER •  Nginx plugin – Roboo Configuration perl Roboo::handler;! !set $Roboo_challenge_modes "SWF,gzip";! !set $Roboo_cookie_name "Anti-Robot”;! !set $Roboo_validity_window 600;! !set $Roboo_whitelist "IP(),UA(''),URI('')”;! !set $Roboo_charset "UTF-8”;! !set $Roboo_challenge_hash_input $remote_addr;! SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh Sample challenged.log 192.168.1.250 - - [08/Nov/2012:13:03:47 +0600] "GET /Anti-Robot- GET-f9e5de6f1f226fbb7472.swf HTTP/1.1" 200 1023 "http:// 192.168.1.1/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/ 537.4”!
  • 47. MITIGATION UPPER LAYER •  Split DNS!! SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh •  DNS resolve based on the users source. •  Possible to distribute the (D)DoS load. •  BIND ACL with IP. •  GeoDNS BIND patch.
  • 48. DNS AMPLIFICATION DDOS ATTACK SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh •  Attacks using IP spoofed DNS query •  Generating a traffic overload •  Bandwidth attack •  Similar to ‘smurf attacks’ •  Components are: •  IP spoofing •  DNS amplification
  • 49. DNS AMPLIFICATION DDOS ATTACK SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
  • 50. DNS AMPLIFICATION DDOS ATTACK SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh •  dig ANY isc.org @x.x.x.x +edns=0! -->output truncated<--! ;; AUTHORITY SECTION:! isc.org. ! !3569 !IN !NS !ams.sns-pb.isc.org.! isc.org. ! !3569 !IN !NS !sfba.sns-pb.isc.org.! isc.org. ! !3569 !IN !NS !ord.sns-pb.isc.org.! isc.org. ! !3569 !IN !NS !ns.isc.afilias-nst.info.! ! ;; ADDITIONAL SECTION:! ns.isc.afilias-nst.info. 82769 !IN !A !199.254.63.254! ns.isc.afilias-nst.info. 82769 !IN !AAAA !2001:500:2c::254! ! ;; Query time: 79 msec! ;; SERVER: 103.12.179.12#53(103.12.179.12)! ;; WHEN: Mon Nov 26 16:50:09 2012! ;; MSG SIZE rcvd: 3191! That's a 64 byte query that resulted in a 3,191 byte response. In other words, an attacker is able to achieve a 50x amplification over whatever traffic they can initiate to an open DNS resolver.
  • 51. MITIGATION DNS AMPLIFICATION SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh •  Disable Open Recursive DNS •  For BIND 9.x authoritative servers, apply the following global options: options {! recursion no;! additional-from-cache no;! };! •  For BIND 9.x caching servers acl "trusted" {! 192.0.2.0/24;! };! options {! recursion no;! additional-from-cache no;! allow-query { none; };! };! view "trusted" in {! match-clients { trusted; };! allow-query { trusted; };! recursion yes;! additional-from-cache yes;! };!
  • 52. LINK LOCAL DOS: IPV6 RA ATTACK SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh 1.  A single device can instantly stop all the Windows machines on a Local Area Network. 2.  Effected OS: •  Windows XP, Vista, Windows 7, Server 2008 •  It is also reported that X-Box & PS3 is also effected. •  FreeBSD 3.  CVE-2010-4669 •  CVSS Severity: High
  • 53. LINK LOCAL DOS: IPV6 RA ATTACK SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh Live Demonstration
  • 54. MITIGATION LINK LOCAL DOS •  Disable IPv6. •  Turn of Router Discovery. •  Use a firewall to block rogue Router Advertisements. •  Microsoft’s “IPv6 Readiness Update” provides some protection. •  Released November 13, 2012 •  KB 2750841 SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
  • 55. FEW RECOMMENDATION 1.  Stop spoofed TCP attacks at your perimeter. 2.  Don’t let dark address packets pass your perimeter. 3.  Block unused protocols and ports. 4.  Limit number of access per second per source IP. 5.  Limit number of concurrent connections per source IP. 6.  Don’t forward packets with header anomalies. 7.  Monitor self similarity in traffic. SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
  • 56. MAKE YOUR FRIENDS •  Look around, who else might be suffering this? •  Build partnerships. •  Build social contacts. •  Prepare before it hits. SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh
  • 57. QUESTIONS? SANOG 21: January 27 - Feb 4, 2013, Cox's Bazar, Bangladesh