Chapter 8: Network Security
Chapter 8: Network Security
Chapter 8: Network Security
Plaintext: i a m s t u d e n
C1 (k= 2): k c o u v w f g p
C2 (k =5): n f r x y z i j s
Suppose that Bob wants to digitally sign a “document”, m. As shown in RSA Algorithm (Rivest, Shamir, Adelson):
above figure, Bob simply uses his private key, KB- to compute KB- (m). Here
Bob’s goal of signing the document is not to scramble the contents of The most common public key encryption algorithm.
document, but to fulfill the requirements of verifiable, nonforgeable and Uses two numbers: e and d as public and private which have a special
nonrepudiable. relationship to each other.
Does this document with digital signature, K B- (m), meet above mentioned Selecting keys:
requirements? Suppose Alice has original document m and K B- (m) and Choose two large prime numbers: p and q such that p is not equal to q.
she wants to prove that Bob had indeed signed the document and was Compute n=pq, z=(p-1)(q-1).
only person who could have possibly signed the document. Alice take the Choose e (with e<n) that has no common factors with z (e and z are
Bob’s public key, KB+, and applies to signed document, K B- (m), associated relatively prime).
with the document, m. That is, she computes K B+ (KB- (m)), and produces Choose d such that ed-1 is exactly divisible by z (i.e. ed mod z=1).
m, which is exactly matches the original document. So Alice then argues
Public key is (n,e) and Private key is (n,d).
that only Bob could have signed the document and meets the
Encryption: Cipher text (C)=pe mod (n)
requirements of digital signature with following reasons:
Decryption: p=Cd mod (n)
There are two main schemes which are especially designed to provide
confidentiality and authentication for electronic mail systems. These are
PGP (Pretty Good Privacy) and S/MIME (Secure/Multipurpose Internet
Mail Extension).
VPN (Virtual Private Network):
PGP:
Traditional Connectivity:
Developed by Phil Zimmerman in 1995.
Documentation and source code is freely available.
[from Gartner Consulting]
VPN is a type of private network that uses public telecommunication, Two connections- one is made to the internet and the second is made
such as the internet, instead of leased lines to communicate. to the VPN.
Became popular as more employees worked in remote locations. Datagrams- contains data, destination and source information.
Firewalls- VPNs allows authorized users to pass through the firewalls.
Private Network vs. VPN: Protocols- protocols create the VPN tunnels.
Employees can access the network (internet) from remote locations. Critical Functions:
Secured networks.
The internet is used as backbone for VPNs. Authentication: validates that the data was sent from the sender.
Saves cost tremendously from reduction of equipment and Access control: limiting unauthorized users from accessing the n/w.
maintenance costs. Confidentiality: preventing the data to be read or copied as the data is
Scalability being transported.
Data integrity: ensuring that the data has not been altered.
Remote Access VPN:
Tunneling:
Tunneling is a virtual point-to-point connection made through a public
network. It transports encapsulated data.
Original datagram
Data encapsulation
SSL was originally developed by Netscape Inc. SSL resides at the same
layer as the socket API. When a client uses SSL to contact a server, the SSL
protocol allows each side to authenticate itself to other. The two sides
VPN Encapsulation of Packets: then negotiate to select an encryption algorithm that they both support.
Finally, SSL allows the two sides to establish an encrypted connection.
SSL is a transport layer security to any TCP –based app using SSL
services.
It is used between web browsers, servers for ecommerce (shttp).
Security services:
Next header (8) Payload length (8) Reserved (16)
Server authentication
Security parameters index
Data encryption
Sequence numbers
Client authentication (optional) Authentication data (variable)
IPsec doesn’t restrict to a specific encryption or authentication algorithm. Securing wireless LANs (WEP):
IPsec provides a general framework that allows each pair of
communicating endpoints to choose algorithms and parameters. To Wired Equivalent Protocol (WEP) is a data link-level security protocol
guarantee interoperability, IPsec does include a set of encryption prescribed by 802.11 standards. It is first and widely used security choice
algorithms that all implementations must recognize. offered in routers for users. It is secured as wired network but less in
comparison to WPA2 (WiFi Protected Access 2). It is recognized with 10 or
IPsec is not a single protocol. Instead, IPsec provides a set of security 26 hexadecimal digits.
algorithms and a general framework that allows a pair of communicating
entities to use whichever algorithms provide security appropriate for the Encryption details:
communication.
Uses RC4 algorithm for confidentiality and CRC-32 checksum for • Two methods: Open System authentication and shared Key
integrity. Authentication.
Standard 64-bit WEP uses a 40 bit key which is concatenated with 24- • This applies to ad-Hoc mode.
bit initialization vector (IV) to form the RC4 key.
Key size was limited before but now it is extended as 128-bit WEP 1. Open System:
using 104-bit key size. • The WLAN client need not provide its credentials to the Access Point
during authentication.
• Any client can authenticate with the Access Point and then attempt to
associate.
• No authentication occurs.
• Subsequently WEP keys can be used for encrypting data frames.
2. Shared key:
• RC4 is a stream cipher, the same traffic key must never be used twice. • It is a vendor-specific feature provided by several vendors such as
3Com.
• The purpose of an IV, which is transmitted as plain text, is to prevent
any repetition, but a 24-bit IV is not long enough to ensure this on a Firewalls:
busy network.
Firewall is emerged as the basis for internet access control. An
• The way the IV was used also opened WEP to a related key attack. organization places a firewall at its connection to external networks. A
firewall partitions an internet into two regions, referred to informally as
• For a 24-bit IV, there is a 50% probability the same IV will repeat after the inside and outside. Thus, firewall isolates organization’s internal net
5000 packets. from larger internet, allowing some packets to pass, blocking others.
Remedies:
• However, replacements for WEP have been developed with the goal of
restoring security to the wireless network itself.
• 802.11i (WPA & WPA2) are ultimate solution for WEP, although WPA is
good solution but it has been cracked.
• WEP2 was extended version of WEP with both IV and key extended to
128 bits.
Why firewalls??
• It hoped to eliminate the duplicate IV deficiency as well as stop brute
force attack. Prevent denial of service (DOS) attacks:
SYN flooding: attacker establishes many bogus TCP connections, no
• WEPplus can only be used when both side of connection uses resources left for real connections.
WEPplus. Prevent illegal modification/access of internal data:
e.g. attacker replaces CIA’s homepage with something else.
Allow only authorized access to inside network: 2. Packet Filtering:
Set of authenticated users/hosts. Internal network connected to internet via router firewall.
Router filters packet-by-packet, decision to forward/drop packet
Types of firewalls: based on:
Source IP address, destination IP address
1. Application gateway TCP/UDP source and destination port numbers
2. Packet Filtering ICMP message type
TCP SYN and ACK bits
1. Application gateway:
Filters packets on application data as well as on IP/TCP/UDP Limitations of firewalls and gateways:
fields. IP spoofing: router can’t know if data really comes from claimed
Example: allows select internal users to telnet outside. source.
Require all telnet users to telnet through gateway. If multiple applications need special treatment, each has own
For authorized users, gateway sets up telnet connection application gateway.
to destination host. Gateway relays data between two Client software must know how to contact gateway.
connections.
Filters often use all or nothing policy for UDP.
Router filter blocks all telnet connections not originating
Tradeoff: degree of communication with outside world, level of
from gateway.
security
Many highly protected sites still suffer from attacks.