MY Arbor Best Practices - v1
MY Arbor Best Practices - v1
MY Arbor Best Practices - v1
Peter Ngai
tmsdump -i tms0
tmsdump -i tms0 -f 'proto 6 and dst port 80' -X
tmsdump -i tms0 -f 'dst port 53' -w - | tshark -V -i -
tmsdump -i tms0 -w - | tcpdump -n -r -
tmsdump -i tms0 -w pcapfile.pcap -c 100
tcpdump -i mgt0 -w - | tmsdump -r -
– Can use -c to set the number of packets and try to make smaller captures to save space
and processor/memory usage
• Thumb of rule
– L3 > L4 > L5 > L7
– Address Filterlist > BW Filterlist (FCAP) > Rate Based > Authentication > REGEX
• Filterlist is the most effective way to drop attacks and much less CPU demanding
• REGEX is CPU intensive but it is flexible & versatile
5 Session
TCP/UDP…
4 Transport Transport B/W Filterlist
• chargen – 30-year-old tool for testing network link integrity and performance. Seldom
(ever?) used these days for its original intended purpose. Senselessly, absurdly
implemented in the modern age by clueless embedded device vendors.
• DNS – the Domain Name System resolves human-friendly names into IP addresses. Part
of the ‘control-plane’ of the Internet. No DNS = no Internet.
• NTP – Network Time Protocol provides timesync services for your
routers/switches/laptops/tablets/phones/etc. The most important Internet service you’ve
never heard of.
• SNMP – Simple Network Management Protocol. Used to monitor and optionally
configure network infrastructure devices, services, etc.
• SSDP – Simple Services Discovery Protocol acts as a poorly designed-and-implemented
services enumeration system for the poorly-designed-and-implemented UPnP.
• https://www.us-cert.gov/ncas/alerts/TA14-017A
…
Victim
• These measures will break ntptrace and other administrative functions but not ntp
timesync requests
• Black-/White-list filter-list
– drop proto udp and src port 1900
• Flexible zombie
– Classifier: proto udp and src port 1900
– Suggested rates: 8bps/8pps
• Payload Regex
– \x75\x75\x69\x64
– \x75\x70\x6e\x70
• Black-/White-list filter-list
– drop proto udp and src port 19
• Flexible zombie
– Classifier: proto udp and src port 19
– Suggested rates: 8bps/8pps
• Black-/White-list filter-list
– drop proto udp and src port 161
• Flexible zombie
– Classifier: proto udp and src port 161
– Suggested rates: 8bps/8pps
• Of course, if you are protecting HTTP server with NO other services, you may do
this
drop not (proto udp or proto tcp or proto icmp)
drop proto tcp and not (dst port 80 or dst port 443 or dst port 53)
drop proto udp and not (dst port 53 or src port 53 or src port 123 or
dst port 123)
drop udp and frag and src port 53
drop proto udp and (src port 123 or dst port 123) and not bpp 76
drop tflags S/SAFRPUEW and bpp 100..1500
drop tflags SEW/SAFRPUEW
COPYRIGHT © 2018 NETSCOUT SYSTEMS, INC. | CONFIDENTIAL & PROPRIETARY 32
DNS Reflection Amplification Attack
Source IP of Victim (v) spoofed when query sent
to resolver, resolver receives, responds to v. 55-
byte query elicits 4200-byte response
Quer
y r
v
Attacker - a
• RFC 1035 specified that UDP DNS messages must be restricted to 512 bytes
(NOT including IP/UDP headers)
• If message exceeded 512 bytes, it must fall over to TCP
• RFC 2671 specified an extension, EDNS0
• EDNS0 allows UDP response over 512 bytes and leads to UDP fragmentation
• This explains why DNS reflective attack always comes with fragmented packets
• Attacker always wants big reply that is why they usually do ANY record query
• RFC1035 specified the domain specification
Settings
Blocked
Traffic
Graph
Blocked
Traffic
Rates
COPYRIGHT © 2018 NETSCOUT SYSTEMS, INC. | CONFIDENTIAL & PROPRIETARY Blocked 40Host Lists
UDP Reflection/Amplification Protection
IPv4 settings
IPv6 settings
• Custom Filters
– Intended for R/A attacks not blocked by
predefined filters
– No predefined match criteria
• Not restricted to UDP
– Must include "proto udp" in match expression to
filter only UDP
– Otherwise identical to predefined R/A
filters Click to
expand
• A custom filter match expression copied
from the predefined expression of a
different R/A filter would have the same
result
• Protocol attacks
– It is usually TCP. TCP is stateful. Source could be either spoofed or NOT spoofed.
– It is Layer 4.
– SYN flood: It never completes 3-ways handshake (Half Open). Source could be spoofed.
– Connection Flood: It completes 3-ways handshake (Full Open). Source could not be
spoofed.
– It can be defensed by
• Invalid Packets
• B/W Filterlist
• SYN authentication
• Flexible Zombie
• Example:
! Web HTTP & HTTPS:-
drop not (proto icmp or proto tcp)
drop proto tcp and not ((src port 1024..65535 and dst port 80) or (src port 1024..65535
and dst port 443))
drop proto icmp and not ((icmptype 3 and icmpcode 4) or (icmptype 11 and icmpcode 1))
drop tflags S/WEUAPRSF and not (bpp 44 or bpp 48 or bpp 50 or bpp 52 or bpp 60 or bpp
64)
drop proto icmp and not ((icmptype 3 and icmpcode 4) or (icmptype 11 and icmpcode 1))
drop tflags S/WEUAPRSF and not (bpp 44 or bpp 48 or bpp 50 or bpp 52 or bpp 60 or bpp
64)
drop proto tcp and not ((src port 1024..65535 and dst port 53) or (src port 53 and dst
port 1024..65535))
drop proto udp and not ((src port 1024..65535 and dst port 53) or (src port 53 and dst
port 1024..65535))
drop proto icmp and not ((icmptype 3 and icmpcode 4) or (icmptype 11 and icmpcode 1))
drop proto udp and (src port 0 and dst port 0)
drop tflags S/WEUAPRSF and not (bpp 44 or bpp 48 or bpp 50 or bpp 52 or bpp 60 or bpp
64)
drop proto tcp and not ((src port 1024..65535 and dst port 25) or (src port 25 and dst
port 1024..65535))
drop proto icmp and not ((icmptype 3 and icmpcode 4) or (icmptype 11 and icmpcode 1))
drop tflags S/WEUAPRSF and not (bpp 44 or bpp 48 or bpp 50 or bpp 52 or bpp 60 or bpp
64)
DB Server
overwhelmed with
lookups
Attacker requests entries
that do not exist in the DNS NXDomain: abcd.somedomain.com
NXDomain: efgh.somedomain.com
Cache: NXDomain: ijkl.somedomain.com
.
Query: abcd.somedomain.com
.
Query: efgh.somedomain.com .
Query: ijkl.somedomain.com
.
COPYRIGHT © 2018 NETSCOUT SYSTEMS, INC. | CONFIDENTIAL & PROPRIETARY
. 64
DNS Dictionary Attack
Mitigation options
• Administration>Mitigation>Filter List-
>[Entries]
dig
$ dig @192.168.210.90 example.net axfr
Select predefined
COPYRIGHT © 2018 NETSCOUT SYSTEMS, INC. |
Filter List
CONFIDENTIAL & PROPRIETARY 70
COPYRIGHT © 2018 NETSCOUT SYSTEMS, INC. | CONFIDENTIAL & PROPRIETARY 71