ddos - distributed denial of service

47
Er. Shiva K. Shrestha Er. Niran Kafle December 27, 2016 1 DDoS Attack (Distributed Denial of Service)

Upload: er-shiva-k-shrestha

Post on 15-Apr-2017

295 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: DDoS - Distributed Denial of Service

1

Er. Shiva K. ShresthaEr. Niran Kafle

December 27, 2016

DDoS Attack(Distributed Denial of Service)

Page 2: DDoS - Distributed Denial of Service

2

Introduction■ Denial of Service (DoS)

– Attack to disrupt the authorized use of networks, systems, or applications

■ Distributed Denial of Service (DDoS)– Employ multiple compromised

computers to perform a coordinated and widely distributed DoS attack

■ DoS Attacks Affect:– Software Systems– Network Routers/Equipment/Servers– Servers and End-User PCs

December 27, 2016

Page 3: DDoS - Distributed Denial of Service

3

DoS Single Source

December 27, 2016

Page 4: DDoS - Distributed Denial of Service

4

DDoS

Collateral Damage Points

December 27, 2016

Page 5: DDoS - Distributed Denial of Service

How DDoS Attacks Work■ incoming traffic flooding the

victim originates from many different sources – potentially hundreds of thousands or more.

■ effectively makes it impossible to stop the attack simply by blocking a single IP address;

■ very difficult to distinguish legitimate user traffic from attack traffic when spread across so many points of origin.

December 27, 2016 5

Page 6: DDoS - Distributed Denial of Service

DDoS Headlines

December 27, 2016 6

Page 7: DDoS - Distributed Denial of Service

DDoS Attacks Based On

December 27, 2016 7

Page 8: DDoS - Distributed Denial of Service

DDoS Source & Targets

December 27, 2016 8

Page 9: DDoS - Distributed Denial of Service

DDoS Web Application Attacks

December 27, 2016 9

Page 10: DDoS - Distributed Denial of Service

Types of DDoS Attacks■ Traffic attacks: Traffic flooding attacks send a huge

volume of TCP, UDP and ICPM packets to the target. Legitimate requests get lost and these attacks may be accompanied by malware exploitation.

■ Bandwidth attacks: This DDoS attack overloads the target with massive amounts of junk data. This results in a loss of network bandwidth and equipment resources and can lead to a complete denial of service.

■ Application attacks: Application-layer data messages can deplete resources in the application layer, leaving the target's system services unavailable.

December 27, 2016 10

Page 11: DDoS - Distributed Denial of Service

DoS Attacks Fast Facts■ Early 1990s: Individual Attacks single source. First DoS Tools■ Late 1990s: Botnets, First DDoS Tools■ Feb 2000: First Large-Scale DDoS Attack

■ CNN, Yahoo, E*Trade, eBay, Amazon.com, Buy.com■ 2001: Microsoft’s name sever infrastructure was disabled■ 2002: DDoD attack Root DNS■ 2004: DDoS for hire and Extortion■ 2007: DDoS against Estonia■ 2008: DDoS against Georgia during military conflict with Russia■ 2009: Ddos on Twitter and Facebook ■ 2010: Ddos on VISA and Master Card

December 27, 2016 11

Page 12: DDoS - Distributed Denial of Service

2000 DoS Attacks■ In Feb 2000, series of massive DoS attacks

– Yahoo, Amazon, eBay, CNN, E*Trade, ZDNet, Datek and Buy.com all hit

■ Attacks allegedly perpetrated by teenagers■ Used compromised systems at UCSB■ Yahoo : 3 hours down with $500,000 lost revenue■ Amazon: 10 hours down with $600,000 lost revenue

December 27, 2016 12

Page 13: DDoS - Distributed Denial of Service

2002 DNS DoS Attacks ICMP floods 150 Kpps (primitive attack) Took down 7 root servers (two hours)

DNS root servers

December 27, 2016 13

Page 14: DDoS - Distributed Denial of Service

■ Hours-long service outage– 44 million users affected

■ At the same time Facebook, LiveJournal, and YouTube were under attacked– some users experienced an outage

■ Real target: a Georgian blogger

2009 DDoS on Twitter

December 27, 2016 14

Page 15: DDoS - Distributed Denial of Service

■ December 2010■ Targets: MasterCard, Visa, Amazon,

Paypal, Swiss Postal Finance, and more

DDoS on Mastercard and Visa

Attack launched by a group of vigilantes called Anonymous (~5000 people) DDoS tool is called LOIC or “Low Orbit Ion Cannon” Bots recruited through social engineering Directed to download DDoS software and take instructions

from a master Motivation: Payback, due to cut support of WikiLeaks after

their founder was arrested on unrelated charges

December 27, 2016 15

Page 16: DDoS - Distributed Denial of Service

The new DDoS tool by Anonymous■ New operation is beginning■ A successor of LOIC■ Using SQL and .js vulnerability,

remotely deface page■ May be available in this September

2011

V for Vendetta

December 27, 2016 16

Page 17: DDoS - Distributed Denial of Service

Operation Facebook■ Announcement on YouTube to

bomb Facebook on Nov. 5 2011■ Facebook’s privacy reveals

issues

Remember Remember poemRemember remember the fifth of November

Gunpowder, treason and plot.I see no reason why gunpowder, treasonShould ever be forgot...Why Nov. 5? V

December 27, 2016 17

Page 18: DDoS - Distributed Denial of Service

DDoS Attack Classification

December 27, 2016 18

Page 19: DDoS - Distributed Denial of Service

DOS attack list

■Flood attack– TCP SYN flood – UDP flood – ICMP (PING) flood – Amplification (Smurf, Fraggle since 1998)

■Vulnerability attack– Ping of Death (since 1990)– Tear Drop (since 1997)– Land (since 1997)

December 27, 2016 19

Page 20: DDoS - Distributed Denial of Service

Flooding attack

■ Commonly used DDoS attack■ Sending a vast number of messages whose processing consumes

some key resource at the target■ The strength lies in the volume, rather than the content■ Implications :

■ The traffic look legitimate■ Large traffic flow large enough to consume victim’s resources■ High packet rate sending

20December 27, 2016

Page 21: DDoS - Distributed Denial of Service

Vulnerability DoS attack

■ Vulnerability : a bug in implementation or a bug in a default configuration of a service

■ Malicious messages (exploits) : unexpected input that utilize the vulnerability are sent

■ Consequences :■ The system slows down or crashes or freezes or reboots ■ Target application goes into infinite loop■ Consumes a vast amount of memory

21December 27, 2016

Page 22: DDoS - Distributed Denial of Service

TCP SYN floodSYN RQST

SYN ACKclient

server

Spoofed SYN RQST

zombie victim

Waiting queue

overflowsZombies

SYN ACK

December 27, 2016 22

Page 23: DDoS - Distributed Denial of Service

Smurf attack ■ Amplification attack

– Sends ICMP ECHO to network

– Amplified network flood– widespread pings with

faked return address (broadcast address)

– Network sends response to victim system

– The "smurf" attack's cousin is called "fraggle", which uses UDP echo packets in the same fashion

23December 27, 2016

Page 24: DDoS - Distributed Denial of Service

DoS : SmurfA B

Ping BroadcastSrc Addr : BDst Addr : Broadcast

December 27, 2016 24

Page 25: DDoS - Distributed Denial of Service

DoS : Fraggle

UDP Broadcastsrc port : echodest port: chargen port

A BInfinite Loop!

Src Addr : BDst Addr : Broadcast

■ Well known exploit Echo/ChargenDecember 27, 2016 25

Page 26: DDoS - Distributed Denial of Service

Ping of Death

■ Sending over size ping packet to victim– >65535 bytes ping violates IP packet length – Causes buffer overflow and system crash

■ Problem in implementation, not protocol■ Has been fixed in modern OSes

– Was a problem in late 1990s

December 27, 2016 26

Page 27: DDoS - Distributed Denial of Service

Teardrop■ A bug in their TCP/IP fragment reassembly code■ Mangle IP fragments with overlapping, over-sized payloads to the

target machine■ Crash various operating systems

December 27, 2016 27

Page 28: DDoS - Distributed Denial of Service

LAND

■ A LAND (Local Area Network Denial) attack■ First discovered in 1997 by “m3lt”

– Effect several OS : ■ AIX 3.0■ FressBSD 2.2.5■ IBM AS/400 OS7400 3.7 ■ Mac OS 7.6.1■ SUN OS 4.1.3, 4.1.4■ Windows 95, NT and XP SP2

■ IP packets where the source and destination address are set to address the same device

– The machine replies to itself continuously– Published code land.c

December 27, 2016 28

Page 29: DDoS - Distributed Denial of Service

LAND

December 27, 2016 29

Page 30: DDoS - Distributed Denial of Service

DDoS Defense

December 27, 2016 30

Page 31: DDoS - Distributed Denial of Service

Are we safe from DDoS?

■ My machine are well secured– It does not matter. The problem is not your machine but everyone

else■ I have a Firewall

– It does not matter. We slip with legitimate traffic or we bomb your firewall

■ I use VPN– It does not matter. We can fill your VPN pipe

■ My system is very high provision– It does not matter. We can get bigger resource than you have

31December 27, 2016

Page 32: DDoS - Distributed Denial of Service

Why DoS Defense is difficult■ Conceptual difficulties

– Mostly random source packet– Moving filtering upstream requires communication

■ Practical difficulties– Routers don’t have many spare cycles for analysis/filtering– Networks must remain stable—bias against infrastructure

change– Attack tracking can cross administrative boundaries– End-users/victims often see attack differently (more urgently)

than network operators

■ Nonetheless, need to:– Maximize filtering of bad traffic– Minimize “collateral damage”

December 27, 2016 32

Page 33: DDoS - Distributed Denial of Service

Defenses against DoS attacks

■ DoS attacks cannot be prevented entirely■ Impractical to prevent the flash crowds without compromising

network performance■ Three lines of defense against (D)DoS attacks

– Attack prevention and preemption– Attack detection and filtering– Attack source traceback and identification

33December 27, 2016

Page 34: DDoS - Distributed Denial of Service

Attack prevention

■ Limit ability of systems to send spoofed packets– Filtering done as close to source as possible by routers/gateways– Reverse-path filtering ensure that the path back to claimed

source is same as the current packet’s path■ Ex: On Cisco router “ip verify unicast reverse-path” command

■ Rate controls in upstream distribution nets– On specific packet types– Ex: Some ICMP, some UDP, TCP/SYN

■ Block IP broadcasts

34December 27, 2016

Page 35: DDoS - Distributed Denial of Service

Responding to attacks

■ Need good incident response plan– With contacts for ISP– Needed to impose traffic filtering upstream– Details of response process

■ Ideally have network monitors and IDS– To detect and notify abnormal traffic patterns

35December 27, 2016

Page 36: DDoS - Distributed Denial of Service

How are DDoS practically handled?

36December 27, 2016

Page 37: DDoS - Distributed Denial of Service

Router Filtering

37Server1 Victim Server2

........

R3

R1

R2

R5R4

RR R

1000 1000

FE

peering

100

ACLs, CARs

December 27, 2016

Page 38: DDoS - Distributed Denial of Service

Cisco uRPF

38

Router A

Router BPkt w/ source comes in

Path back on this line?

Accept pkt

Path via different interface?

Reject pkt

Check source in routing table

Unicast Reverse Path Forwarding Does routing back to the source go through same interface ?

Cisco interface command: ip verify unicast rpf

December 27, 2016

Page 39: DDoS - Distributed Denial of Service

Black hole Routing

39Server1 Victim Server2

........

R3

R1

R2

R5R4

RR R

1000 1000

FE

peering

100

ip route A.B.C.0 255.255.255.0 Null0

December 27, 2016

Page 40: DDoS - Distributed Denial of Service

Blackhole in Practice (I)

40

Victim

Non-victimized servers

Upstream = Not on the Critical Path

Guard

Detector

December 27, 2016

Page 41: DDoS - Distributed Denial of Service

Blackhole in Practice (II)

41

Guard

Victim

Non-victimized servers

BGP announcement

1. Detect

2. Activate: Auto/Manual

3. Divert only victim’s traffic

Activate

Detector

December 27, 2016

Page 42: DDoS - Distributed Denial of Service

Blackhole in Practice (III)

42

Guard

Victim

Non-victimized servers

Traffic destined to the victim

Legitimate traffic to victim

Inject= GRE, VRF, VLAN, FBF, PBR…

Hijack traffic = BGP

Detector

December 27, 2016

Page 43: DDoS - Distributed Denial of Service

■ Attackers follow defense approaches, adjust their code to bypass defenses

■ Use of subnet spoofing defeats ingress filtering■ Use of encryption and decoy packets, IRC or P2P

obscures master-slave communication■ Encryption of attack packets defeats traffic analysis and

signature detection■ Pulsing attacks defeat slow defenses and traceback■ Flash-crowd attacks generate application traffic

DDoS Attack Trends

December 27, 2016 43

Page 44: DDoS - Distributed Denial of Service

Conclusion

■ No matter how secure a system is or good defense techniques has been used it is not possible to completely prevent DDoS Attack.

■ 75 % of Web Application attacks targeted US sites

December 27, 2016 44

Page 45: DDoS - Distributed Denial of Service

45

DoS Attack Demo

December 27, 2016

Page 46: DDoS - Distributed Denial of Service

46

Thank You !

■ Q/A ?

December 27, 2016

Page 47: DDoS - Distributed Denial of Service

47

Recommendations■ http://thehackernews.com/2016/09/ddos-attack-iot.html■ http://

www.datacenterdynamics.com/content-tracks/security-risk/ddos-attacks-hit-cloudflare-originate-from-new-botnet/97438.fullarticle

■ http://www.theregister.co.uk/2016/12/08/can_isps_step_up_and_solve_the_ddos_problem/

■ http://calvinayre.com/2016/12/16/business/bitcoin-exchange-btc-e-falls-victim-ddos-attack/

■ http://en.yibada.com/articles/180618/20161222/biggest-hacks-data-breaches-2016-from-yahoo-breach-to-ddos-attacks.htm

■ http://news.softpedia.com/news/infographic-ddos-attacks-in-q3-2015-497312.shtmlDecember 27,

2016