NSS Lecture 4 - Network Attacks
NSS Lecture 4 - Network Attacks
attacker
switch
victim
Honeypot
Create fake account and send password over network
Identify attacker when it uses the password
IP address spoofing (1)
SA: 36.220.9.59
DA: 212.68.212.7
145.13.145.67 212.68.212.7
Alice telnet
Bob
Alice ”
il ce
A
I ’m
h i,
“
Attacker
Session hijacking: The details
Attacker is on segment where traffic passes from
Alice to Bob
Attacker sniffs packets
Sees TCP packets between Bob and Alice and their
sequence numbers
Attacker jumps in, sending TCP packets to Bob;
source IP address = Alice’s IP address
Bob now obeys commands sent by attacker, thinking they
were sent by Alice
Principal defense: encyrption
Attacker does not have keys to encrypt and insert
meaningful traffic
Session hijacking: limitation
2. to resync, Alice
sends segment with
correct seq #
DDoS
From thousands of nodes
IP addresses often not spoofed
Good book:
Internet Denial of Service by J. Merkovic, D.
Dittrich, P. Reiher, 2005
Interlude: IP datagram format
32 bits total datagram
header length type of length (bytes)
ver head. length
(bytes) len service for
“type” of data fragment fragmentation/
16-bit identifier flgs
offset reassembly
max number time to upper Internet
remaining hops live layer checksum
(decremented at
32 bit source IP address
each router)
32 bit destination IP address
upper layer protocol
to deliver payload to Options (if any)
data
(variable length,
typically a TCP
or UDP segment)
IP Fragmentation and Reassembly
length ID fragflag offset
Example =4000 =x =0 =0
4000 byte
One large datagram becomes
datagram several smaller datagrams
MTU = 1500 bytes
… and more
SYN Flooding Explained
Attacker sends many connection requests (SYNs) with
spoofed source addresses
Victim allocates resources for each request
New thread, connection state maintained until timeout
Fixed bound on half-open connections
Once resources exhausted, requests from legitimate
clients are denied
This is a classic denial of service attack
Common pattern: it costs nothing to TCP client to send a
connection request, but TCP server must spawn a thread for
each request - asymmetry!
What’s another example of this behavior?
SYN flood Issue
amateur attack:
SYN
Sou s with
rce
IP =
Alic
e
attacker
Connection queue
N - ACKs freed up with
SY RST segment
victim
RST
bot
attacker Internet
bot victim
bot
DDoS: Reflection attack
DNS server
request reply
request
DNS server reply
request
attacker
reply
DNS server victim
request
reply
Source IP =
victim’s IP
DNS server
“Smurf” Attack
Looks like a legitimate
“Are you alive?” ping
request from the victim
Stream of ping replies
1 ICMP Echo Req overwhelms victim
Src: victim’s address
Dest: broadcast address