Network Security: Denial of Service (DoS) Tuomas Aura / Aapo Kalliola T Network security Aalto University, Nov-Dec 2012

Similar documents
Network Security: Denial of Service (DoS) Aapo Kalliola / Tuomas Aura T Network security Aalto University, Nov-Dec 2013

Network Security: Denial of Service (DoS) Tuomas Aura / Aapo Kalliola T Network security Aalto University, Nov-Dec 2011

Network Security: Denial of Service (DoS) Tuomas Aura (includes material by Aapo Kalliola) T Network security Aalto University, Nov-Dec 2014

Network Security: Denial of Service (DoS) Tuomas Aura T Network security Aalto University, Nov-Dec 2010

Network Security: Denial of Service (DoS), Anonymity. Tuomas Aura

Chapter 7. Denial of Service Attacks

Computer Security: Principles and Practice

COMPUTER NETWORK SECURITY

Network Security: IPsec. Tuomas Aura

Security+ Guide to Network Security Fundamentals, Fourth Edition. Network Attacks Denial of service Attacks

CSE 565 Computer Security Fall 2018

Imma Chargin Mah Lazer

Denial of Service (DoS)

Network Security: IPsec. Tuomas Aura T Network security Aalto University, Nov-Dec 2014

CSE Computer Security (Fall 2006)

Herding Cats. Carl Brothers, F5 Field Systems Engineer

Cloudflare Advanced DDoS Protection

CSE Computer Security

Internet Protocol and Transmission Control Protocol

Chair for Network Architectures and Services Department of Informatics TU München Prof. Carle. Network Security. Chapter 8

Attack Prevention Technology White Paper

Dan Boneh, John Mitchell, Dawn Song. Denial of Service

Our Narrow Focus Computer Networking Security Vulnerabilities. Outline Part II

Denial of Service. Serguei A. Mokhov SOEN321 - Fall 2004

Configuring attack detection and prevention 1

network security s642 computer security adam everspaugh

Network Security. Thierry Sans

Distributed Systems. 27. Firewalls and Virtual Private Networks Paul Krzyzanowski. Rutgers University. Fall 2013

Contents. Denial-of-Service Attacks. Flooding Attacks. Distributed Denial-of Service Attacks. Reflector Against Denial-of-Service Attacks

Internet Layers. Physical Layer. Application. Application. Transport. Transport. Network. Network. Network. Network. Link. Link. Link.

Your projected and optimistically projected grades should be in the grade center soon o Projected: Your current weighted score /30 * 100

NISCC Technical Note 06/02: Response to Distributed Denial of Service (DDoS) Attacks

DENIAL OF SERVICE ATTACKS

Our Narrow Focus Computer Networking Security Vulnerabilities. IP-level vulnerabilities

Network Security: Firewalls. Tuomas Aura T Network security Aalto University, Nov-Dec 2013

Basic Concepts in Intrusion Detection

Configuring attack detection and prevention 1

DNS Security. Ch 1: The Importance of DNS Security. Updated

Table of Contents. 1 Intrusion Detection Statistics 1-1 Overview 1-1 Displaying Intrusion Detection Statistics 1-1

DDoS Testing with XM-2G. Step by Step Guide

WHITE PAPER. DDoS of Things SURVIVAL GUIDE. Proven DDoS Defense in the New Era of 1 Tbps Attacks

HP High-End Firewalls

Denial of Service. Denial of Service. A metaphor: Denial-of-Dinner Attack. DDoS over the years. Ozalp Babaoglu

Sam Pickles, F5 Networks A DAY IN THE LIFE OF A WAF

Denial of Service. Eduardo Cardoso Abreu - Federico Matteo Bencic - Pavel Alexeenko -

CNT Computer and Network Security: Denial of Service

Check Point DDoS Protector Simple and Easy Mitigation

Chapter 10: Denial-of-Services

Distributed Denial of Service (DDoS)

Chair for Network Architectures and Services Department of Informatics TU München Prof. Carle. Network Security. Chapter 9

Multi-vector DDOS Attacks

Network Security Protocols NET 412D

Denial of Service. Denial of Service. A metaphor: Denial-of-Dinner Attack. DDoS over the years. Ozalp Babaoglu

TOP TEN DNS ATTACKS PROTECTING YOUR ORGANIZATION AGAINST TODAY S FAST-GROWING THREATS

ERT Threat Alert New Risks Revealed by Mirai Botnet November 2, 2016

this security is provided by the administrative authority (AA) of a network, on behalf of itself, its customers, and its legal authorities

Ping of death Land attack Teardrop Syn flood Smurf attack. DOS Attack Methods

Network Security: Network Flooding. Seungwon Shin GSIS, KAIST

20-CS Cyber Defense Overview Fall, Network Basics

Network Security. Chapter 0. Attacks and Attack Detection

EE 122: Network Security

Flashback.. Internet design goals. Security Part One: Attacks and Countermeasures. Why did they leave it out? Security Vulnerabilities

The Internet is not always a friendly place In fact, hosts on the Internet are under constant attack How to deal with this is a large topic

Denial of Service. EJ Jung 11/08/10

Lecture 10. Denial of Service Attacks (cont d) Thursday 24/12/2015

Denial of Service (DoS) attacks and countermeasures

Configuring Flood Protection

Single Network: applications, client and server hosts, switches, access links, trunk links, frames, path. Review of TCP/IP Internetworking

Intrusion Detection System For Denial Of Service Flooding Attacks In Sip Communication Networks

ENEE 457: Computer Systems Security 11/07/16. Lecture 18 Computer Networking Basics

DDoS: Coordinated Attacks Analysis

Fundamental Questions to Answer About Computer Networking, Jan 2009 Prof. Ying-Dar Lin,

Resources and Credits. Definition. Symptoms. Denial of Service 3/3/2010 COMP Information on Denial of Service attacks can

Distributed Systems. 29. Firewalls. Paul Krzyzanowski. Rutgers University. Fall 2015

Threat Pragmatics. Target 6/19/ June 2018 PacNOG 22, Honiara, Solomon Islands Supported by:

DDoS PREVENTION TECHNIQUE

Internetwork Expert s CCNA Security Bootcamp. Common Security Threats

EXPERIMENTAL STUDY OF FLOOD TYPE DISTRIBUTED DENIAL-OF- SERVICE ATTACK IN SOFTWARE DEFINED NETWORKING (SDN) BASED ON FLOW BEHAVIORS

Load Balancing Technology White Paper

DDoS and Traceback 1

Network Security. Tadayoshi Kohno

CSE 565 Computer Security Fall 2018

HP High-End Firewalls

Lecture 33. Firewalls. Firewall Locations in the Network. Castle and Moat Analogy. Firewall Types. Firewall: Illustration. Security April 15, 2005

A Survey of Defense Mechanisms Against DDoS Flooding A

ECE 435 Network Engineering Lecture 23

Exit from Hell? Reducing the Impact of Amplification DDoS Attacks Marc Kührer, Thomas Hupperich, Christian Rossow, and Thorsten Holz

August 14th, 2018 PRESENTED BY:

Ethical Hacking and Prevention

Denial of Service and Distributed Denial of Service Attacks

Chapter 8 roadmap. Network Security

Are You Fully Prepared to Withstand DNS Attacks?

NETWORK SECURITY. Ch. 3: Network Attacks

ACS / Computer Security And Privacy. Fall 2018 Mid-Term Review

CTS2134 Introduction to Networking. Module 08: Network Security

Protecting DNS Critical Infrastructure Solution Overview. Radware Attack Mitigation System (AMS) - Whitepaper

Closed book. Closed notes. No electronic device.

Why IPS Devices and Firewalls Fail to Stop DDoS Threats

Distributed Denial of Service

To Filter or to Authorize: Network-Layer DoS Defense against Multimillion-node Botnets. Xiaowei Yang Duke Unversity

Transcription:

Network Security: Denial of Service (DoS) Tuomas Aura / Aapo Kalliola T-110.5241 Network security Aalto University, Nov-Dec 2012

Outline 1. DoS principles 2. Packet-flooding attacks on the Internet 3. Distributed denial of service (DDoS) 4. Filtering defenses 5. Most effective attack strategies 6. Infrastructural defenses 7. DoS-resistant protocol design 8. Research example 2

DoS principles 3

Denial of service (DoS) Goal of denial-of-service (DoS) attacks is to prevent authorized users from accessing a resource, or to reduce the quality of service (QoS) that authorized users receive Several kinds of DoS attacks: Destroy the resource Disable the resource with misconfiguration or by inducing an invalid state Exhaust the resource or reduce its capacity 4

Resource destruction or disabling Examples: Cutting cables, bombing telephone exchanges Formatting the hard disk Crashing a gateway router These attacks often exploit a software bug, e.g. Unchecked buffer overflows Teardrop attack: overlapping large IP fragments caused Windows and Linux crashes Can be prevented by proper design and implementation 5

Resource exhaustion attacks Attacker overloads a system to exhaust its capacity never possible to prevent completely in an open network Examples: Flooding a web server with requests Filling the mailbox with spam It is difficult to tell the difference between attack and legitimate overload (e.g. Slashdotting, flash crowds) For highly scalable services, need to try to detect attacks Some resource in the system under attack becomes a bottleneck i.e. runs out first Attacks can exploit a limited bottleneck resource: SYN flooding and fixed-size kernel tables Public-key cryptography on slow processors Apache range header request bug 6

Packet-flooding attacks on the Internet 7

Internet characteristics 1.2.3.4 1.2.3.0/24 Gateway router Internet src 1.2.3.4 dst 5.6.7.8 data Gateway router 5.6.7.0/24 5.6.7.8 Q: Why is the Internet vulnerable to DoS? Open network: anyone can join, no central control End to end connectivity: anyone can send packets to anyone No global authentication or accountability Flat-rate charging (mostly) Unreliable best-effort routing; congestion causes packet loss Q: Could these be changed? 8

Packet-flooding attack Ping flooding: attacker sends a flood of ping packets (ICMP echo request) to the target Unix command ping -f can be used to send the packets Any IP packets can be used similarly for flooding Packets can be sent with a spoofed source IP address Q: Where is the bottleneck resource that fails first? Typically, packet-flooding exhausts the ISP link bandwidth, in which case the router before the congested link will drop packets Other potential bottlenecks: processing capacity of the gateway router, processing capacity of the IP stack at the target host 9

Traffic amplification 1.2.3.4 Echo request src 5.6.7.8 dst 3.4.5.255 Internet Echo response src Echo 3.4.5.10 response Echo response dst src Echo 5.6.7.8 3.4.5.10 response src 3.4.5.10 dst Echo src 5.6.7.8 3.4.5.10 response dst 5.6.7.8 dst src 5.6.7.8 3.4.5.10 dst 5.6.7.8 5.6.7.8 3.4.5.0/24 Example: Smurf attack in the late 90s used IP broadcast addresses for traffic amplification Any protocol or service that can be used for DoS amplification is dangerous! Non-amplification is a key design requirement 10

Traffic reflection 1.2.3.4 Internet Echo request src 5.6.7.8 dst 3.4.5.6 Echo response src 3.4.5.6 dst 5.6.7.8 5.6.7.8 3.4.5.6 Reflection attack: get others to send packets to the target E.g. ping or TCP SYN with spoofed source address DNS reflection + amplification: 64 byte query from attacker, ~3000 byte response to target Hides attack source better than just source IP spoofing 12

Attack impact Honest client Honest packet rate HR Bottleneck link capacity C Attacker Attack packet rate AR Server When HR+AR > C, some packets dropped by router With FIFO or RED queuing discipline at router, dropped packets are selected randomly Packet loss = (HR+AR-C)/(HR+AR) if HR+AR > C; 0 otherwise When HR<<AR, packet loss = (AR-C)/AR 13

Attack impact Packet loss = (HR+AR-C)/(HR+AR) if HR+AR > C; 0 otherwise When HR<<AR, packet loss = (AR-C)/AR Attacker needs to exceed C to cause packet loss Packet-loss for low-bandwidth honest connections only depends on AR Any AR > C severely reduces TCP throughput for honest client Some honest packets nevertheless make it through: to cause 90% packet loss, need attack traffic AR = 10 C, to cause 99% packet loss, need attack traffic AR = 100 C 14

Distributed denial of service (DDoS) 15

Botnet and DDoS Attacker controls thousands of compromised computers and launches a coordinated packet-flooding attack Target Bots Cloud Control network Attacker

Botnets Bots (also called zombies) are home or office computers infected with virus, Trojan, rootkit etc. Controlled and coordinated by attacker, e.g. over IRC, P2P, Tor Hackers initially attacked each other; now used by criminals Examples: Storm, Conficker at their peak >10M hosts (probably) BredoLab ~30M before dismantling Cutweil/Pushdo/Pandex around 2M in August Dangers: Overwhelming flooding capacity of botnets can exhaust any link; no need to find special weaknesses in the target Q: Are criminals interested in DDoS if they can make money from spam and phishing? What about politically motivated attacks or rogue governments? 17

Spambot infections (from McAfee Quarterly Threat Report Q3/2012) 18

Different botnets (from McAfee Quarterly Threat Report Q3/2012) 19

Not the whole picture... Only spamming botnets shown Lots of different botnets ~1000 Zeus C&C servers (most prolific DIY botnet SW) ~300 SpyEye C&C servers 1-2 million ZeroAccess bots (ad-click fraud) etc.. DDoS as a service $50 for 24-hour DDoS 20

Botnets in news Officials see Iran, not outrage over film, behind cyber attacks on US banks (NBC News/20.9.2012) DDoS attacks: 150Gb per second and rising (ZDNet/2.10.2012) DDoS sinks The Pirate Bay (itnews/14.10.2012) Anti-Kremlin website complains of DDoS attacks (TheRegister/5.12.2011) etc. Burma DDoS d in 2010 before elections International bandwidth ~45Mbps, attack 10-15Gbps 21

Filtering defenses 22

Filtering DoS attacks Filtering near the target is the main defense mechanisms against DoS attacks Protect yourself immediate benefit Configure firewall to drop anything not necessary: Drop protocols and ports no used in the local network Drop unnecessary protocols such as ping or all ICMP, UDP etc. Stateful firewall can drop packets received at the wrong state e.g. TCP packets for non-existing connections Application-level firewall could filter at application level; probably too slow under DoS Filter dynamically based on ICMP destination-unreachable messages (Q: Are there side effects?) 23

Flooding detection and response Filter probable attack traffic using machine-learning methods Network or host-based intrusion detection to separate attacks from normal traffic based on traffic characteristics Limitations: IP spoofing source IP address not reliable for individual packets Attacker can evade detection by varying attack patterns and mimicking legitimate traffic (Q: Which attributes are difficult to mimic?) 24

Preventing source spoofing How to prevent spoofing of the source IP address? Ingress and egress filtering: Gateway router checks that packets routed from a local network to the ISP have a local source address Generalization: reverse path forwarding Selfless defenses without immediate payoff deployment slow IP traceback Mechanisms for tracing IP packets to their source Limited utility: take-down thought legal channels is slow; automatic blacklisting of attackers can be misused SYN cookies (we ll come back to this) 25

Extra capacity Other defenses More link capacity, beefier server Optimize Replace resource-consuming content with lighter static content Distribute Deploy more servers or reverse proxies Have a true distributed network (Akamai, Cloudflare,..) Buy mitigation Prolexic, Arbor Networks,.. 26

Most effective attack strategies 27

SYN flooding Attackers goal: make filtering ineffective honest and attack packets dropped with equal probability Target destination ports that are open to the Internet, e.g. HTTP (port 80), SMTP (port 25) Send initial packets looks like a new honest client SYN flooding: TCP SYN is the first packet of TCP handshake Sent by web/email/ftp/etc. clients to start communication with a server Flooding target or firewall cannot know which SYN packets are legitimate and which attack traffic has to treat all SYN packets equally 28

DNS flooding DNS query is sent to UDP port 53 on a DNS server Attack amplification using DNS: Most firewalls allow DNS responses through Amplification: craft a DNS record for which 60-byte query can produce 4000-byte responses (fragmented) Query the record via open recursive DNS servers that cache the response traffic amplification happens at the recursive server Queries are sent with a spoofed source IP address, the target address DNS response goes to the target Millions of such queries sent by a botnet 29

In practise (from Prolexic Quarterly Global DDoS Attack Report Q2/2012) 30

Infrastructural defenses 31

Over-provisioning Increase bottleneck resource capacity to cope with attacks Recall: Packet loss = (HR+AR-C)/(HR+AR) if HR+AR > C; 0 otherwise When HR<<AR, packet loss = (AR-C)/AR Does doubling link capacity C help? Depends on AR: If attacker sends 100 C to achieve 99% packet loss, doubling C will result in only 98% packet loss If attacker sends 10 C to achieve 90% packet loss, doubling C will result in only 80% packet loss If attacker sends 2 C to achieve 50% packet loss, doubling C will result in (almost) zero packet loss 32

QoS routing QoS routing mechanisms can guarantee service quality to some important clients and services Resource reservation, e.g. Intserv, RSVP Traffic classes, e.g. Diffserv, 802.1Q Protect important clients and connections by giving them a higher traffic class Protect intranet traffic by giving packets from Internet a lower class Prioritizing existing connections After TCP handshake or after authentication Potential problems: How to take into account new honest clients? Cannot trust traffic class of packets from untrusted sources Political opposition to Diffserv (net neutrality lobby) 33

Some research proposals IP traceback to prevent IP spoofing Pushback for scalable filtering Capabilities, e.g. SIFF, for prioritizing authorized connections at routers New Internet routing architectures: Overlay routing (e.g. Pastry, i3), publish-subscribe models (e.g. PSIRP) Claimed DoS resistance remains to be fully proven Problems?

DoS-resistant protocol design 35

Stateless handshake (IKEv2) Kr Initiator i HDR(A,0), SAi1, KEi, Ni HDR(A,0), N(COOKIE) HDR(A,0), N(COOKIE), SAi1, KEi, Ni HDR(A,B), SAr1, KEr, Nr, [CERTREQ] HDR(A,B), SK{ IDi, [CERT,] [CERTREQ,] [IDr,] AUTH, SAi2, TSi, TSr } HDR(A,B), E SK (IDr, [CERT,] AUTH, SAr2, TSi, TSr)... Responder r Store state Responder stores per-client state only after it has received valid cookie: COOKIE = hash(kr, initiator and responder IP addresses) where Kr is a periodically changing key known only by responder initiator cannot spoof its IP address No state-management problems caused by spoofed initial messages (Note: memory size is not the issue) 37

TCP SYN Cookies Client SYN, seq=x, 0 SYN ACK, seq=y, ack=x+1 ACK, seq=x+1, ack=y+1 data... Server Store state Random initial sequence numbers in TCP protect against IP spoofing: client must receive msg 2 to send a valid msg 3 SYN cookie: stateless implementation of the handshake; y = hash(k server, client addr, port, server addr, port) where K server is a key known only to the server. Server does not store any state before receiving and verifying the cookie value in msg 2 Sending the cookie as the initial sequence number; in new protocols, a separate field would be used for the cookie 38

Client puzzle (HIP) Initiator I Solve puzzle O(2 K ) I1: HIT-I, HIT-R R1: HIT-I, HIT-R, Puzzle(I,K), (g x, PK R, Transforms)SIG I2: (HIT-I, HIT-R, Solution(I,K,J), SPI-I, g y, Transforms, {PK I }) SIG R2: (HIT-I, HIT-R, SPI-R, HMAC) SIG... Responder R Verify solution O(1) Store state, public-key crypto Client pays for server resources by solving a puzzle first Puzzle is brute-force reversal of a K-bit cryptographic hash; puzzle difficulty K can be adjusted according to server load Server does not do public-key operations before verifying the solution Server can also be stateless; puzzle created like stateless cookies 39

Prioritizing old clients One way to cope with overload: give priority to old clients and connections, reject new ones Filtering examples: Remember client IP addresses that have completed sessions previously, completed handshake, or authenticated successfully Prioritize TCP connections from address prefixes that have had many clients over long time (bots are scattered all over the IP address space) Protocol design: Give previous clients a credential (e.g. key) that can be used for reconnecting 40

Cryptographic authentication Idea: authenticate packets and allow only authorized ones IPsec ESP Filter at firewall or end host Problems: Requires a system for authorizing clients First packet of the authentication protocol becomes the weak point Difficult to use authentication to prevent DoS 41

Research example: Automated traffic filtering 42

Scenario Number of normal users dwarfed by the attacker bot count x10... x1000000 Attacker is a geographically distributed botnet Difficult to differentiate manually from normal users based on traffic rates or geolocation Attacker sends valid requests to the server, aiming to overload the server capacity CPU, memory, database, uplink bandwidth 43

What to do we have? Normal traffic features Source IP, Destination IP, TTL... Requested resource Request frequency Request consistency Attack Normal dissimilarities Source hierarchy Accessed resource etc? 44

Learning and filtering Create a model of the normal traffic Detect attack Start filtering requests Revert to normal operations once the attack has subsized Results: >50% of legitimate traffic served (in simulations) DDoS vs. Flash crowd? 45

Hierarchical cluster model Normal traffic model = hierarchical clusters of request or packets based on features, mainly source IP address Provably optimal filtering strategy: Cluster priority = ratio of normal and current traffic in cluster During attack, serve requests in clusters with highest priority 46

Simulations Variable server normal load, attack traffic exceeds normal traffic by a factor of 10e6. 47

Implementation tests Attack scenario: server runs normally at 50 % capacity; DoS attack exceeds 10 times the server capacity ~10% of honest requests served Filtering deployed 40..100 % of honest request served unprotected protected 48

Further reading DDoSattacks and defense mechanisms: classification and state-of-the-art, Douligeris C. and Mitrokotsa A. http://www.sciencedirect.com/science/article/pii/s13891 28603004250 Prolexic Q2 2012 DDoS Attack Report (requires registration) http://ww.prolexic.com/attack-report DDoS and other anomalous web traffic behavior in selected countries, Banks K.B. et al http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=619 7004&tag=1 49