1
DDoS in India
A lesson on introspection
Dave Phelan - APNIC
2
Who Am I?
• Dave Phelan
– Network and Infrastructure engineer for a LONG time
– Trainer at APNIC
– Parent to 2 Human children and 3 Fur Children
– Likes Cat memes
3
Acknowledgments
• Jamie Gilespie and Adli Wahid for some of their Sec content
• Shodan.io for running a great internet scanning tool
• Cloudflare - Cloudflare Radar
4
4
What are we going to talk about?
• What is a DDoS
• Look at some stats around DDoS Globally and Per Sub
Region
• What do we need to fix?
• How can we mitigate and not contribute to the problem?
5
5
What is DoS and DDoS?
• In general, a denial of service is an attack against
availability of a service
– A service can be a network, or a specific service such as a web site
• DoS - Denial of Service
– Usually from only one source
• DDoS - Distributed Denial of Service
– Attack originates from multiple sources
– This is caused through resource exhaustion
5
6
6
Network
Access
Application
Transport
Internet
Application
Presentation
Session
Transport
Network
Data Link
Physical
WiFi, Ethernet,
Fiber, Copper
HTTP, FTP,
DHCP, NTP,
TFTP, DNS
TCP, UDP
IP, ICMP, RIP
SYN Flood
ICMP Flood
Wi-Fi De-auth & Jamming
Electrical Interference
Construction Equipment
Reflection and
Amplification
(DNS, NTP, SSDP, etc),
Slowloris, SIP Flood,
Complex DB Queries
DoS by Layers
6
TCP/IP Model
OSI Model
Protocols and
Services Attacks
* Colour animated slide
7
Anatomy of a Plain DoS Attack
Attacker Victim
Attacker sends any valid or
invalid traffic to the victim
1
Simple DoS
8
Anatomy of a Plain DDoS
Attack
Botnet
Attacker
Victim
Attacker directs
bots to begin attack
1
All bots send any valid or
invalid traffic to the victim
2
BOT
BOT BOT
BOT
BOT
Simple DDoS
9
Anatomy of a Reflected
Amplification Attack
Open recursive
DNS servers
Botnet
Attacker directs bots
to begin attack
1
All bots send DNS queries for the TXT record in domain “evil.com”
to open recursive DNS servers and fake "my IP is 10.10.1.1"
2
Open
resolvers
ask the
authoritative
name server
for the TXT
record
“evil.com”
3
4
evil.com name
server responds
with 4000 byte
TXT records
Open resolvers
cache the
response and
send a stream
of 4000 byte
DNS responses
to the victim
5
Victim
(10.10.1.1)
BOT
BOT BOT
BOT
evil.com
authoritative
name server
Attacker
BOT
Reflected and Amplified DDoS
10
10
Reflection and Amplification
• What makes for good reflection?
– UDP
• Spoofable / forged source IP addresses
• Connectionless (no 3-way handshake)
• What makes for good amplification?
– Small command results in a larger reply
• This creates a Bandwidth Amplification Factor (BAF)
• Reply Length / Request Length = BAF
– Example: 3223 bytes / 64 bytes = BAF of 50.4
• Chart on next slide created with data from
https://www.us-cert.gov/ncas/alerts/TA14-017A
10
11
11
Amplification Factors
Protocol
Bandwidth
Amplification
Factor
Multicast DNS (mDNS) 2-10
BitTorrent 3.8
NetBIOS 3.8
Steam Protocol 5.5
SNMPv2 6.3
Portmap (RPCbind) 7 to 28
DNS 28 to 54
SSDP 30.8
11
Protocol
Bandwidth
Amplification
Factor
LDAP 46 to 55
TFTP 60
Quake Network Protocol 63.9
RIPv1 131.24
QOTD 140.3
CHARGEN 358.8
NTP 556.9
Memcached up to 51,000
12
So why are you telling me this?
• Operators Complain about DoS/DDoS
• Do the minimum to ensure they are not contributing
• But How bad is it really?
– (Hint: It’s not good….)
13
Global Numbers
• Most data sourced from
– Cloudflare Radar
– Shodan.io
https://radar.cloudflare.com/security-and-attacks
14
Global Statistics
15
Global Numbers
https://radar.cloudflare.com/security-and-attacks
Rank Country Percentage
1 United States 19.3%
2 Indonesia 7.0%
3 China 6.2%
4 Germany 5.9%
5 Vietnam 5.4%
Top 5 source economies
16
Global Numbers
Attack Types
https://radar.cloudflare.com/security-and-attacks
17
India Statistics
18
India
Top Source Networks:
https://radar.cloudflare.com/security-and-attacks/in?dateRange=12w
Rank ASN Percentage
1. AS14061 - DIGITALOCEAN-ASN 15.8%
2. AS55836 - RELIANCEJIO-IN Reliance Jio Infocomm Limited 11.7%
3. AS16509 - AMAZON-02 4.2%
4. AS63949 - AKAMAI-LINODE-AP Akamai Connected Cloud 4.1%
5.
AS45609 - BHARTI-MOBILITY-AS-AP Bharti Airtel Ltd. AS for
GPRS Service
4.1%
19
India
Attack Types
https://radar.cloudflare.com/security-and-attacks/in?dateRange=12w
20
India
• Open Ports
https://www.shodan.io/search?query=country%3Ain
Protocol 05/25 10/23
DNS 153,870 330,983
NTP 115,117 121,750
SSDP 55,420 198,091
MemcacheD 1,702 2,125
SNMP 126,614 Not Recorded
Telnet 37,601 37,503
21
India
https://radar.cloudflare.com/security-and-attacks/in?dateRange=12w
22
India
https://radar.cloudflare.com/security-and-attacks/in?dateRange=12w
23
23
Mitigation Strategies
• Protect your services from attack
– Anycast
– IPS / DDoS protection
– Overall network architecture
• Prevent your services from attacking others
– Rate-limiting
– BCP38 (outbound filtering) source address validation
– Securely configured DNS, NTP and SNMP servers
– Subscribe to ShadowServer Reports (FREE!!!)
– No open resolvers!
Only allow owned or authorised IP addresses to connect
23
24
24
Mitigation Strategies
• Remote Triggered Black Hole (RTBH) filtering
– With your ISP
24
Attack traffic
Signalling
25
25
Mitigation Strategies
• Remote Triggered Black Hole (RTBH) filtering
– With your ISP
25
Attack traffic
Signalling
26
26
Mitigation Strategies
26
• uRPF
– Strict: verifies both
source address and
incoming interface
with entries in the
forwarding table
– Loose: verifies
existence of route to
source address
pos0/0
ge0/0
Src = 2406:6400:100::1
Src = 2406:6400:200::1
Forwarding Table:
2406:6400:100::/48 ge0/0
2406:6400:200::/48 fa0/0
pos0/0
ge0/0
Src = 2406:6400:100::1
Src = 2406:6400:200::1
27
27
Mitigation Strategies
• Source Remote Triggered Black Hole (sRTBH) filtering
– RTBH with uRPF (Unicast Reverse Path Forwarding)
• RFC5635
– Basic Operation
• Setup a RTBH Sinkhole (routing to a Null Interface)
• Enable uRPF in loose mode
• Create an appropriate community to NH traffic to your Sinkhole
• When a source is identified
– Tag with appropriate community to send to the Sink
– uRPF check will fail (as it is routed to a Null)
– Traffic Dropped
27
http://www.cisco.com/web/about/security/intelligence/blackhole.pdf
28
Questions?

DDoS in India, presented at INNOG 8 by Dave Phelan

  • 1.
    1 DDoS in India Alesson on introspection Dave Phelan - APNIC
  • 2.
    2 Who Am I? •Dave Phelan – Network and Infrastructure engineer for a LONG time – Trainer at APNIC – Parent to 2 Human children and 3 Fur Children – Likes Cat memes
  • 3.
    3 Acknowledgments • Jamie Gilespieand Adli Wahid for some of their Sec content • Shodan.io for running a great internet scanning tool • Cloudflare - Cloudflare Radar
  • 4.
    4 4 What are wegoing to talk about? • What is a DDoS • Look at some stats around DDoS Globally and Per Sub Region • What do we need to fix? • How can we mitigate and not contribute to the problem?
  • 5.
    5 5 What is DoSand DDoS? • In general, a denial of service is an attack against availability of a service – A service can be a network, or a specific service such as a web site • DoS - Denial of Service – Usually from only one source • DDoS - Distributed Denial of Service – Attack originates from multiple sources – This is caused through resource exhaustion 5
  • 6.
    6 6 Network Access Application Transport Internet Application Presentation Session Transport Network Data Link Physical WiFi, Ethernet, Fiber,Copper HTTP, FTP, DHCP, NTP, TFTP, DNS TCP, UDP IP, ICMP, RIP SYN Flood ICMP Flood Wi-Fi De-auth & Jamming Electrical Interference Construction Equipment Reflection and Amplification (DNS, NTP, SSDP, etc), Slowloris, SIP Flood, Complex DB Queries DoS by Layers 6 TCP/IP Model OSI Model Protocols and Services Attacks * Colour animated slide
  • 7.
    7 Anatomy of aPlain DoS Attack Attacker Victim Attacker sends any valid or invalid traffic to the victim 1 Simple DoS
  • 8.
    8 Anatomy of aPlain DDoS Attack Botnet Attacker Victim Attacker directs bots to begin attack 1 All bots send any valid or invalid traffic to the victim 2 BOT BOT BOT BOT BOT Simple DDoS
  • 9.
    9 Anatomy of aReflected Amplification Attack Open recursive DNS servers Botnet Attacker directs bots to begin attack 1 All bots send DNS queries for the TXT record in domain “evil.com” to open recursive DNS servers and fake "my IP is 10.10.1.1" 2 Open resolvers ask the authoritative name server for the TXT record “evil.com” 3 4 evil.com name server responds with 4000 byte TXT records Open resolvers cache the response and send a stream of 4000 byte DNS responses to the victim 5 Victim (10.10.1.1) BOT BOT BOT BOT evil.com authoritative name server Attacker BOT Reflected and Amplified DDoS
  • 10.
    10 10 Reflection and Amplification •What makes for good reflection? – UDP • Spoofable / forged source IP addresses • Connectionless (no 3-way handshake) • What makes for good amplification? – Small command results in a larger reply • This creates a Bandwidth Amplification Factor (BAF) • Reply Length / Request Length = BAF – Example: 3223 bytes / 64 bytes = BAF of 50.4 • Chart on next slide created with data from https://www.us-cert.gov/ncas/alerts/TA14-017A 10
  • 11.
    11 11 Amplification Factors Protocol Bandwidth Amplification Factor Multicast DNS(mDNS) 2-10 BitTorrent 3.8 NetBIOS 3.8 Steam Protocol 5.5 SNMPv2 6.3 Portmap (RPCbind) 7 to 28 DNS 28 to 54 SSDP 30.8 11 Protocol Bandwidth Amplification Factor LDAP 46 to 55 TFTP 60 Quake Network Protocol 63.9 RIPv1 131.24 QOTD 140.3 CHARGEN 358.8 NTP 556.9 Memcached up to 51,000
  • 12.
    12 So why areyou telling me this? • Operators Complain about DoS/DDoS • Do the minimum to ensure they are not contributing • But How bad is it really? – (Hint: It’s not good….)
  • 13.
    13 Global Numbers • Mostdata sourced from – Cloudflare Radar – Shodan.io https://radar.cloudflare.com/security-and-attacks
  • 14.
  • 15.
    15 Global Numbers https://radar.cloudflare.com/security-and-attacks Rank CountryPercentage 1 United States 19.3% 2 Indonesia 7.0% 3 China 6.2% 4 Germany 5.9% 5 Vietnam 5.4% Top 5 source economies
  • 16.
  • 17.
  • 18.
    18 India Top Source Networks: https://radar.cloudflare.com/security-and-attacks/in?dateRange=12w RankASN Percentage 1. AS14061 - DIGITALOCEAN-ASN 15.8% 2. AS55836 - RELIANCEJIO-IN Reliance Jio Infocomm Limited 11.7% 3. AS16509 - AMAZON-02 4.2% 4. AS63949 - AKAMAI-LINODE-AP Akamai Connected Cloud 4.1% 5. AS45609 - BHARTI-MOBILITY-AS-AP Bharti Airtel Ltd. AS for GPRS Service 4.1%
  • 19.
  • 20.
    20 India • Open Ports https://www.shodan.io/search?query=country%3Ain Protocol05/25 10/23 DNS 153,870 330,983 NTP 115,117 121,750 SSDP 55,420 198,091 MemcacheD 1,702 2,125 SNMP 126,614 Not Recorded Telnet 37,601 37,503
  • 21.
  • 22.
  • 23.
    23 23 Mitigation Strategies • Protectyour services from attack – Anycast – IPS / DDoS protection – Overall network architecture • Prevent your services from attacking others – Rate-limiting – BCP38 (outbound filtering) source address validation – Securely configured DNS, NTP and SNMP servers – Subscribe to ShadowServer Reports (FREE!!!) – No open resolvers! Only allow owned or authorised IP addresses to connect 23
  • 24.
    24 24 Mitigation Strategies • RemoteTriggered Black Hole (RTBH) filtering – With your ISP 24 Attack traffic Signalling
  • 25.
    25 25 Mitigation Strategies • RemoteTriggered Black Hole (RTBH) filtering – With your ISP 25 Attack traffic Signalling
  • 26.
    26 26 Mitigation Strategies 26 • uRPF –Strict: verifies both source address and incoming interface with entries in the forwarding table – Loose: verifies existence of route to source address pos0/0 ge0/0 Src = 2406:6400:100::1 Src = 2406:6400:200::1 Forwarding Table: 2406:6400:100::/48 ge0/0 2406:6400:200::/48 fa0/0 pos0/0 ge0/0 Src = 2406:6400:100::1 Src = 2406:6400:200::1
  • 27.
    27 27 Mitigation Strategies • SourceRemote Triggered Black Hole (sRTBH) filtering – RTBH with uRPF (Unicast Reverse Path Forwarding) • RFC5635 – Basic Operation • Setup a RTBH Sinkhole (routing to a Null Interface) • Enable uRPF in loose mode • Create an appropriate community to NH traffic to your Sinkhole • When a source is identified – Tag with appropriate community to send to the Sink – uRPF check will fail (as it is routed to a Null) – Traffic Dropped 27 http://www.cisco.com/web/about/security/intelligence/blackhole.pdf
  • 28.