SANOG12 Merike OPsec
SANOG12 Merike OPsec
SANOG12 Merike OPsec
Merike Kaeo
merike@doubleshotsecurity.com
• Passive Attacks
– Eavesdropping
– Offline cryptographic attacks
• Active Attacks
– Replay
– Man-In-The-Middle
– Message Insertion
– Spoofing (device or user)
– Denial of Service
– Protocol specific attacks
Peer Customer
Customer
NetFlow,
SNMP
Syslog, TFTP,
AAA, DNS,
SMTP
NOC
Device
Data Link Device/Driver driver
interface
• Console Port
– Access via cable connected to the serial port
– Only access to password recovery functions
• Auxiliary Port
– Generally used for out of band (OOB) access
– Also used for connecting to other console ports
• Virtual TTY (VTY)
– Default access is via ‘telnet’
• HTTP
• TFTP
• SNMP
line console 0
login
password console-pw
exec-timeout 1 30
line vty 0 4
login
password vty-pw
exec-timeout 5 00
Peer Customer
Conference
Net
2
NetFlow,
SNMP
1
Syslog, TFTP,
AAA, DNS,
NOC
1. SSH to NOC
2. Telnet to router
SMTP
banner login ^C
Martini
• Usually an issue of
operational cost
• Dial-back encrypted
modems are used as
backup
http - tcp 80
2001:DB8:501::42: 80
2001:DB8:6::99 : 80
Internet
Translates 2001:DB8:501::42 : 80
To 2001:DB8:6::99 : 80
Operational Security Best Practices- SANOG 12 Kathmandu, Nepal - August 2008
Stateful Inspection Firewall
• Examines the state and the context of the packets
• Remembers what outgoing requests have been sent and only allow
responses to those requests back through the firewall
• Attempts to access the internal network that have not been
requested by the internal network will be denied
Internet
2001:DB8:501::42: 80
2001:DB8:8::99 : 1025
router/firewall
PC
Only allows reply packets for requests made out
Blocks other unregistered traffic
• Explicitly deny all traffic and only allow what you need
• The default policy should be that if the firewall doesn't know
what to do with the packet, deny/drop it
• Don't rely only on your firewall for all protection of your network
• Implement multiple layers of network protection
• Make sure all of the network traffic passes through the firewall
• Log all firewall exceptions (if possible)
0 4 8 16 31
DATA................
0 4 8 16 31
Sequence Number
Acknowledgment Number
DATA................
0 16 31
Length Checksum
Data............
• Description
– It is possible to impose an unusually small fragment size on
outgoing packets.
• Exploit
– If the fragment size is made small enough to force some of a
TCP packet's TCP header fields into the second fragment,
filter rules that specify patterns for those fields will not match.
– If the filtering implementation does not enforce a minimum
fragment size, a disallowed packet might be passed because
it didn't hit a match in the filter
Description Network
default 0.0.0.0 /8
loopback 127.0.0.0 /8
RFC 1918 10.0.0.0 /8
RFC 1918 172.16.0.0 /12
RFC 1918 192.168.0.0 /16
Net Test 192.0.2.0 /24
Testing devices * 192.18.0.0 /15
IPv6 to IPv4 relay * 192.88.99.0 /24
RFC 1918 nameservers * 192.175.48.0 /24
End-node auto configuration * 169.254.0.0 /16
* ACK not set on first packet but set on all subsequent packets
Routing Update
Router A
Hash
Customer
Customer
I accept the entire Internet with /24 more
specifics and sent them on.
Customer
• Customer’s Ingress/Egress
• ISP Ingress on Customer (may
Egress to Customer)
ISP
• ISP Egress to Peer and Ingress
from Peer
• Peer Ingress from ISP and
Egress to ISP
Peer
Customer
router bgp 100
neighbor 123.123.6.1 remote-as 101
neighbor 123.123.6.1 prefix-list customer in
!
ip prefix-list customer permit 121.60.0.0/2
ip prefix-list customer deny 0.0.0.0/0 le 32
ISP
• Infrastructure protection
– Coordinated attack against infrastructure
– Attacks against multiple infrastructure components
3 3
Further scanning Further scanning
for compromises for compromises
4
Massive DDoS
attack launched
Victim
Description Network
default 0.0.0.0 /8
loopback 127.0.0.0 /8
RFC 1918 10.0.0.0 /8
RFC 1918 172.16.0.0 /12
RFC 1918 192.168.0.0 /16
Net Test 192.0.2.0 /24
Testing devices * 192.18.0.0 /15
IPv6 to IPv4 relay * 192.88.99.0 /24
RFC 1918 nameservers * 192.175.48.0 /24
End-node auto configuration * 169.254.0.0 /16
Deny all and permit only what’s needed is most effective policy
– Vendor provided
• Arbor TrafGen
– Open source
• stream
• litestorm
• rc8.o
• f__kscript
• slice3
Attack Traffic
BGP Update
eBGP
Session
iBGP
Trigger Router
TARGET
Trigger Router