Network Protocols and Vulnerabilities Outline: John Mitchell
Network Protocols and Vulnerabilities Outline: John Mitchell
CS 155
Outline
Network Protocols and
Vulnerabilities
Basic Networking:
John Mitchell
TCP Spoofing,
Routing
Domain Name System
Internet Infrastructure
ISP
Backbone
Application protocol
Application
Transport
Application
TCP protocol
Transport
Network
IP protocol
IP
IP protocol
Network
Link
Data
Link
Network
Access
Data
Link
Link
IP
Data Formats
Internet Protocol
Connectionless
TCP Header
Application
message
segment
Network (IP)
packet
Link Layer
frame
TCP
data
TCP
data
IP TCP
data
ETH IP TCP
data
TCP
data
Notes:
ETF
Unreliable
Best effort
Version
Flags
Header Length
Type of Service
Total Length
Identification
Fragment Offset
Time to Live
Protocol
Header Checksum
IP Header
Link (Ethernet)
Header
Link (Ethernet)
Trailer
Padding
IP Data
IP Routing
Meg
Routing
Office gateway
Packet
Source 121.42.33.12
Destination 132.14.11.51
121.42.33.12
Tom
132.14.11.1
ISP
132.14.11.51
Error reporting
121.42.33.1
TTL field:
UDP
No acknowledgment
No congenstion control
No message continuation
Implications:
TCP
TCP Header
Sender
Break data into packets
Attach packet numbers
Receiver
Acknowledge receipt; lost packets are resent
Reassemble packets in correct order
Book
Reassemble book
1
19
1
Source Port
Dest port
SEQ Number
ACK Number
U A P P S F
R C S S Y I
G K H R N N
TCP Header
Other stuff
5
S
SN rand
SYN: ANC 0 C
C
SN rand
SYN/ACK: ANS SN S
S
C
SNSN +1
ACK: ANSNC
S
Wait
Established
DDoS lecture
1. Packet Sniffing
2. SYN Flooding
SYNC2
Eve
SYNC3
Network
Alice
S
SYNC1
Listening
Store data
SYNC4
Bob
SYNC5
attacker
ACK
srcIP=victim
AN=predicted SNS
command
Server
SYN/ACK
dstIP=victim
SN=server SNS
Victim
[Watson04]
Wireless Threats
Easy
Source A
Destination
Source
Destination
Source B
Destination
Routing Vulnerabilities
Common attack: advertise false routes
Routing Vulnerabilities
OSPF:
Interdomain Routing
earthlink.net
BGP overview
Stanford.edu
BGP
Protocol specification
Autonomous
System
OSPF
BGP example
1
[D. Wetherall]
27
265
7265
7
265
327
Security problems
4
3265
265
27
Issues
65
27
627
DNS
root
org
wisc
edu
net
com
stanford
ucb
cs
uk
cmu
ca
mit
ee
www
Hierarchical service
www.cs.stanford.edu
Client
Local DNS
resolver
stanford.edu
DNS server
cs.stanford.edu
DNS server
Caching
DNS responses are cached
DNS Packet
Query ID:
Resolver to NS request
Response to resolver
Response contains IP
addr of next NS server
(called glue)
Response ignored if
unrecognized QueryID
bailiwick checking:
response is cached if
it is within the same
domain of query
(i.e. a.com cannot
set NS for b.com)
Obvious problems
final answer
Query:
a.bank.com
attacker wins if j: x1 = yj
local
DNS
resolver
a.bank.com
QID=x1
(a la Kaminsky08)
user
browser
ns.bank.com
IPaddr
256 responses:
Random QID y1, y2,
NS bank.com=ns.bank.com
A ns.bank.com=attackerIP
attacker
user
browser
b.bank.com
local
DNS
resolver
attacker wins if j: x2 = yj
b.bank.com
QID=x2
ns.bank.com
IPaddr
256 responses:
Random QID y1, y2,
NS bank.com=ns.bank.com
A ns.bank.com=attackerIP
attacker
Defenses
Increase Query ID size.
Pharming
How?
January 2005, the domain name for a large New York ISP,
Panix, was hijacked to a site in Australia.
In November 2004, Google and Amazon users were sent to
Med Network Inc., an online pharmacy
In March 2003, a group dubbed the "Freedom Cyber Force
Militia" hijacked visitors to the Al-Jazeera Web site and
presented them with the message "God Bless Our Troops"
[DWF96, R01]
<iframe src="http://www.evil.com">
ns.evil.com
DNS server
171.64.7.115 TTL = 0
Firewall
192.168.0.100
corporate
web server
192.168.0.100
www.evil.com?
Server-side defenses
www.evil.com
web server
171.64.7.115
Firewall defenses
Summary
Core protocols not designed for security