Tcp/ip Problems
Tcp/ip Problems
Tcp/ip Problems
Related reading:
rsh and rcp are programs that allow you to login from
a remote site without a password
Exploiting rsh
The best way to defend against rsh attacks is to not use it:
This unix features is allowed/disallowed in linux by /etc/inet.d scripts (see
unix hardening lecture)
Use ssh instead (but note that ssh has key distribution problems)
Attack
Source routing
Falsified routing updates
Blind spoofing
ICMP redirects
False ARP packets
TCP session stealing
Lets go over each attack
Defense
Ignore source routes
Secure routing protocols
SSH/secure connection
IPsec
Publish ARP tables
SSH/secure connection
3
The attacker will see the reply packets before the machine that is
being spoofed. (two way traffic)
Client
SYN_flag, ACK=453,ISN=34
Server
ACK=35, data
Attacker
Reset!
ec A
ho CK
* =1
(sr * > 38,
>.
c=
c li
r
en hos
t)
ts
Client
SY
N
(s _fla
rc
=c g, I
lie SN
nt
) =90
1
Blind Spoofing
SYN_flag, ACK=902,ISN=137
Server
Blind Spoofing
Blind spoofing. Find a client machine thats off. Guess the ISN of
the server. Usually in regular increments. Use rsh to log in:
Blind Spoofing
Types of routing:
1.
2.
3.
4.
Attacker
Server
Client
10
This is also a DOS attack and a traffic redirection attack (for sniffing or
modification)
11
This process tells the host what IP address is the next hop.
Now the host must determine the link layer address of the next
hop. How is that done in IP?
12
ARP is the interface between the Link layer and Network layer.
13
On-the-same-LAN routing
1. Route lookup determines it is
on the same subnet.
2. Use ARP to determine what
link layer address to send it to.
223.1.2.1
223.1.2.9
223.1.3.27
Who has
223.1.3.2?
223.1.3.3
223.1.3.1
223.1.2.2
LAN
I have it. My
eth addr is
223.1.3.2
14
Through-the-gateway Routing
1. Route lookup determines its on a
different subnet.
Result: Go through default route.
I have it. My
eth addr is
223.1.2.1
223.1.2.9
223.1.3.27
Who has
223.1.3.27?
223.1.3.3
223.1.3.1
223.1.2.2
LAN
223.1.3.2
15
223.1.2.9
223.1.3.27
Who has
223.1.3.27?
223.1.3.3
223.1.2.1
223.1.3.1
223.1.2.2
LAN
223.1.3.2
16
ICMP Attack
17
ARP Attacks
18
19
20
21
The Attack
Attacker-in-the-Middle
23