1 Introduction
1 Introduction
Introduction
And a refresh of your memory
• Fundamental knowledges
• Cryptography: Secret key, public key, and Hash algorithms, and how are they used for
communication.
• Theoretical analysis of security schemes.
• Identify pitfalls and think about what it takes to make it right.
• Protocols and standards.
• On the surface/practical level.
• Practical
• Tools, simple hacks. You need to:
• Be familiar with at least one programming language.
• Be comfortable with Linux and command line interface.
What is network security
Network security
• exclusive or
• | concatenation
• K(message) encrypted with secret key K
• (message)Bob+ encrypted with Bob’s public key
• (message)Bob- encrypted with Bob’s private key
Review of computer networks
OSI reference model
• Question:
• How many layers are there, what are their names and functions?
• What are typical protocols on each of these layers?
• What attacks can you name for each layer?
OSI reference model
• physical layer
• data link layer
• network layer
• transport layer
• application layer
TCP/IP
• What comes to your mind when you think about the following?
• IP
• TCP
• UPD
IP header format
TCP and UDP packet format
TCP 3-way handshake
• To know a person’s phone number, you can check the yellow page
by his/her name.
• How to know the IP address of a host, say, GMU’s webserver?
• What protocols are used?
• How it works?
Directory service
A B
R
111.111.111.111
74-29-9C-E8-FF-55 222.222.222.222
49-BD-D2-C7-56-2A
222.222.222.220
1A-23-F9-CD-06-9B
111.111.111.112 111.111.111.110
CC-49-DE-D0-AB-7D E6-E9-00-17-BB-4B 222.222.222.221
88-B2-2F-54-1A-0F
Network Address Translation
NAT translation table
2: NAT router changes 1: host 10.0.0.1 sends
WAN side addr LAN side addr datagram to
datagram source address
from 10.0.0.1, 3345 to 138.76.29.7, 5001 10.0.0.1, 3345 128.119.40.186, 80
138.76.29.7, 5001, …… ……
updates table
S: 10.0.0.1, 3345
D: 128.119.40.186, 80
10.0.0.1
1
S: 138.76.29.7, 5001
2 D: 128.119.40.186, 80 10.0.0.1
10.0.0.2
138.76.29.7 S: 128.119.40.186, 80
D: 10.0.0.1, 3345
4
S: 128.119.40.186, 80 10.0.0.3
D: 138.76.29.7, 5001 3
3: reply arrives, destination
address: 138.76.29.7, 5001
Firewalls: why
• Stateless firewall
• Inspect packets based only on individual packets’ character, even if it does
not make sense.
• stateful firewall
• track connection setup (SYN), teardown (FIN): determine whether incoming,
outgoing packets “makes sense”
• Example
• To block external-initiated TCP, a stateless firewall will block incoming TCP
packet with SYN=1 & ACK=0.
• Nevertheless, a TCP packet with SYN=1 & ACK = 1 may still be answered by a
host but not caught by a stateless firewall.
Summary