Computer Network Slide Notes Important
Computer Network Slide Notes Important
NIST (Autonomous)
References
1. Gert De Laet and Gert Schauwers,
“Network Security Fundamentals,” Cisco
Press, 2005.
HTTP response
Sender Recipient
SMTP SMTP
POP3
Application Layer
DNS Domain Name Service
o Convert human-friendly names such as
www.google.com into 32-bit IP address
o A distributed hierarchical database
Only 13 “root” DNS server clusters
o Essentially, a single point of failure for Internet
o Attacks on root servers have succeeded…
o …but, attacks did not last long enough (yet)
Transport Layer
The network layer offers unreliable, “best
effort” delivery of packets
Any improved service must be provided by
the hosts
Transport layer: 2 protocols of interest
o TCP more service, more overhead
o UDP less service, less overhead
TCP and UDP run on hosts, not routers
Appendix 16
TCP
TCP assures that packets…
o Arrive at destination
o Are processed in order
o Are not sent too fast for receiver: flow control
TCP also attempts to provide…
o Network-wide congestion control
TCP is connection-oriented
o TCP contacts server before sending data
o Orderly setup and take down of “connection”
o But no true connection, only logical “connection”
Appendix 17
TCP Header
bits
0 8 16 24 31
SYN-ACK
Fin
Ack
Fin
Ack
User Datagram Protocol (UDP)
UDP is minimalist, “no frills” service
o No assurance that packets arrive
o No assurance packets are in order, etc., etc.
Why does UDP exist?
o More efficient (header only 8 bytes)
o No flow control to slow down sender
o No congestion control to slow down sender
If packets sent too fast, will be dropped
o Either at intermediate router or at destination
o But in some apps this may be OK (audio/video)
Network Layer
Core of network/Internet
o Interconnected mesh of routers
Purpose of network layer
o Route packets through this mesh
Network layer protocol of interest is IP
o Follows a best effort approach
IP runs in every host and every router
Routers also run routing protocols
o Used to determine the path to send packets
o Routing protocols: RIP, OSPF, BGP, …
IP Addresses
IP address is 32 bits
Every host has an IP address
Big problem Not enough IP addresses!
o Lots of tricks used to extend address space
IP addresses given in dotted decimal notation
o For example: 195.72.180.27
o Each number is between 0 and 255
Usually, a host’s IP address can change
Socket
Each host has a 32 bit IP address
But, many processes can run on one host
o E.g., you can browse web, send email at same time
How to distinguish processes on a host?
Each process has a 16 bit port number
o Numbers below 1024 are “well-known” ports
(HTTP is port 80, POP3 is port 110, etc.)
o Port numbers above 1024 are dynamic (as needed)
IP address + port number = socket
o Socket uniquely identifies process, Internet-wide
Port numbers
IP addresses versus port numbers
Socket address
Well-known ports used with UDP
Network Address Translation
Network Address Translation (NAT)
o Trick to extend IP address space
Use
one IP address (different port
numbers) for multiple hosts
o “Translates” outside IP address (based
on port number) to inside IP address
NAT-less Example
source 11.0.0.1:1025
destination 12.0.0.1:80
source 12.0.0.1:80
destination 11.0.0.1:1025
Web
server Alice
IP: 12.0.0.1 IP: 11.0.0.1
Port: 80 Port: 1025
NAT Example
re-assembled
LAN
MAC: AA-AA-AA-AA-AA-AA MAC: BB-BB-BB-BB-BB-BB
http://xforce.iss.net/xforce/xfdb/1452
IP Header IP data
52
IP Normal Reassembly
Received from the network:
Reassembly
480buffer, 65.535 bytes
LAN
MAC: AA-AA-AA-AA-AA-AA MAC: BB-BB-BB-BB-BB-BB
Appendix 69
ARP Cache Poisoning
ARP is stateless, so…
Accept “reply”, even if no request sent
111.111.111.003
Trudy CC-CC-CC-CC-CC-CC
111.111.111.001
LAN 111.111.111.002
AA-AA-AA-AA-AA-AA BB-BB-BB-BB-BB-BB
111.111.111.002 CC-CC-CC-CC-CC-CC
BB-BB-BB-BB-BB-BB 111.111.111.001 AA-AA-AA-AA-AA-AA
CC-CC-CC-CC-CC-CC
http://airlines.ws/southwest-airline.h
tm
For every .gov site there is a .com,
.net giving similar information
For misspellings of popular
businesses, there are web sites.
Application Layer Attacks
Application Layer Attacks
Scripting vulnerabilities
Cookie poisoning
Buffer overflow
Hidden field manipulation
Parameter tampering
Cross-site scripting
SQL injection
Summary
1. TCP port numbers, Sequence numbers, ack, flags
2. IP addresses are easy to spoof. ARP and DNS
are not secure.
3. Flags: Syn Flood, Ping of Death, Smurf, Fin,
Connection Hijacking
4. UDP Flood Attack
5. Application layer attacks