TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

90
TCP/IP Protocol Suite 1 Chapter 30 Chapter 30 Security Security Credit: most slides from Forouzan, TCP/IP protocol suit

Transcript of TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

Page 1: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 1

Chapter 30Chapter 30

SecuritySecurity

Credit: most slides from Forouzan, TCP/IP protocol suit

Page 2: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 2

Criminal Expoits and Attacks Phishing: Masquerading as a well-

known site to obtain a user’ personal info.

Denial of Service: Intentionally blocking a site to prevent business activities.

Loss of control: an intruder gains control of a system.

Loss of data: Steal or delete.

Page 3: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

Attacks

Software Based Attackes Malware – Malicious software – damaging or

annoying software. Viruses or worms.

Hardware Based Attacks Bios, USB devices, NAS, Cell phones

Attacks on Virtualized Systems

Page 4: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

Software based attacks: Viruses Attaches to a legitimate software (carrier, a

program or document) and then replicates through other programs, devices, emails, instant messaging, etc. Computer crashes, destruction of HD, fill up HD,

Reduce security settings allowing others to come in, reformat HD, etc.

File infecting virus attaches to executables (such as cascade virus), resident virus loaded into RAM (such as Randex, Meve, MrKlunky), Boot virus infects MBR (Polyboot.B , AntiEXE), companion virus adds program to OS replacing legitimate OS programs (Stator, Asimove.1539), Macro virus written in any macro scripting (Melissa.A, Bablas.Pc).

Polymorphic virus changes itself to avoid detection

Page 5: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

Worms Stand alone programs Takes advantage of the OS/application

vulnerabilities. Worms uses networks to send copies of itself

slowing down networks. While virus requires user action to start an infected

program, worms do not (can start executing itself).

Worms as they travel through internet can leave a payload behind on each system which can delete files or allow remote controlling of the system.

Page 6: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

Concealing malware

Trojan horses, rootkits, logic bombs and privilege escalation.

Page 7: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

Trojan Horse

Installed with the knowledge of the user. A program advertised as a utility but actually does something else (screen saver, calendar, player, etc.). These programs may do a legitimate activity, but also might capture credit card info, etc and send it.

Page 8: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

Rootkits Programs installed on computers that takes

control of certain aspects of the computer by replacing OS utilities. Sony installed a program on their CDs (2005) preventing copying of the CD by operating system routines. Others used this idea and created their own, or added features to Sony’s program. Rootkits do not spread themselves. Very difficult to remove from HD. Boot from another device and see if problems disappear.

Page 9: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

Logic Bombs

Lies Dormant until triggered by an event such as a date, person fired, etc. Usually done by employees. Very difficult to discover before triggered. Embedded in large programs.

Page 10: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

Privilege Escalation

Either change own privilege to higher level, or use another employees higher privilege. Done by exploiting vulnerabilities of OS.

Page 11: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

Malware for profit

Spam, spyware and botnets Spam

Waste of time, checking and deleting. Email lists are sold by many ISPs, and other sites.

Page 12: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

Spyware Tracking software installed without the knowledge of

the user. Advertises and Collects and distributes personal information. Harder to detect and remove than viruses. Causes the computer to slow down, freezes up, new browser toolbars or menus installed, hijacked homepage and increased popups.

Adware – a software that delivers advertising for gambling sites or pornography. Keeps track of browsing behavior and reports to give specific pop-ups for merchandize.

Keyloggers. A small hardware attached to the keyboard interface or a resident software that monitors and logs each keystroke.

Page 13: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

Botnets

Programs that render your computer to be controlled remotely. The computer is called a zombie. Thousands of zombie computers under the control of a single attacker is called a botnet.

Attackers use internet relay chat (IRC) to remotely control the zombies.

Zombies are used for spamming, spreading malware, denying services, etc.

Page 14: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

Hardware based attacks

BIOS BIOS can be flashed with viruses or rootkits.

Flashing the bios can render the computer useless until it is replaced. You can write protect BIOS to prevent this from happening.

USB devices NAS and SANs can get all malware

discussed. Cell phones – infected messages, launch

attacks, make calls, etc.

Page 15: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

Attacks on Virtualized systems Operating system virtualization with virtual

machine Storage virtualization Multiple os on the same machine. However,

existing anti virus/spam software do not work. Additional concern – one existing virtual machine

may infect another. Protection approaches:

Hypervisor-runs on the physical machine and manages the virtual machines.

Run security software such as a firewall on the physical machine

Page 16: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 16

Techniques used

Wiretapping Replay – sending packets captured from previous

session such as username and password. Buffer overflow: sending more data than receiver

expects, thereby storing values in memory buffer. Address spoofing. Faking IP source address Name spoofing. Misspelling of a well-known name

or poisoning name server. SYN flood – sending stream of TCP SYN Key breaking – guessing password Port Scanning – to find vulnerability Packet Interception – man in the middle attack.

Page 17: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 17

Security Techniques

Hardening Operating system Encryption Digital Signatures Firewall Intrusion detection systems Packet inspection and content

scanning VPN

Page 18: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

Hardening Operating System 3 pronged approach:

operating system updates, Protect against buffer overflows, configuring operating system

protections

Page 19: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

Operating System updates

Security Patch: Covers discovered Vulnerabilities

Turn on automatic updates Hotfix – specific to a customer situation Service Pack – Cumulative security patches

and other software updates. Designate one server within your

organization as the patch update service

Page 20: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

Buffer Overflow Protection

Corrupts system memory and causes freezing

May change the return address (from a routine) to a different one where the malware is residing.

Programmers should write defensive programming. Show the textbook to the students.◦ For windows based programming use: Data

execution prevention(DEP) and Address Space Layout Randomization (ASLR)

Page 21: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

Defensive programming Microsoft environment Data Execution Prevention (DEP)

◦ DEP is available in VISTA and beyond◦ Designated memory only to hold data not

code (No eXecute NX bit associated with the memory). Buffer overflow redirection would not work within a NX memory.

◦ Programmers can turn on this feature. Address Space Randomization (ASLR).

◦ Each time Vista.. Is rebooted .EXE and .DLL are loaded randomly into 256 possible locations. Attackers find it difficult to work with unpredictable code locations.

Page 22: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

Configuring Operating System Protection Security Policy

A document that clearly defines the defense mechanisms an organization will employ in order to keep information secure.

Configuration baseline – permissions on files, registry permissions, logins, authentications, etc. You may want to create a Security template to handle it.

Deployment – individually or by group policy

Page 23: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

Preventing Attacks that Target Web Preventing Attacks that Target Web browserbrowser

Attacks through cookies, scripts, Java, Attacks through cookies, scripts, Java, ActiveX and cross-site scripting.ActiveX and cross-site scripting.

Page 24: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

CookiesCookies

information about visits saved on user’s information about visits saved on user’s computer. First party cookie is created by computer. First party cookie is created by the site that the user is currently viewing. the site that the user is currently viewing. Third-party cookies are cookies created by Third-party cookies are cookies created by some one else is accessed in a current some one else is accessed in a current visit to a different site.visit to a different site.

Cookies do not present a security threat, Cookies do not present a security threat, but is a privacy risk. Track browsing but is a privacy risk. Track browsing habits, etc. Also provides IP address.habits, etc. Also provides IP address.

Page 25: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

Scripts (Java, VB, etc.)Scripts (Java, VB, etc.)

Web pages containing scripts download Web pages containing scripts download the scripts to the computer and is the scripts to the computer and is executed. The program can send executed. The program can send information about the user to a host. information about the user to a host. Scripts can’t access files on the computer, Scripts can’t access files on the computer, so limited risk exists.so limited risk exists.

Page 26: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

JavaJava

Java can create applets that run on local Java can create applets that run on local computers. Defense against hostile jave computers. Defense against hostile jave applets is a Sandbox (a fence). Unsigned applets is a Sandbox (a fence). Unsigned java applet does not come from a trusted java applet does not come from a trusted source and must be run within the sandbox source and must be run within the sandbox and gives warning to the users. If users do and gives warning to the users. If users do not read the message, or understand the not read the message, or understand the risk, it can cause serious trouble. Sandbox risk, it can cause serious trouble. Sandbox warnings are given at the bottom left. warnings are given at the bottom left. Signed java applets are from trusted sources Signed java applets are from trusted sources and have not been altered.and have not been altered.

Page 27: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

ActiveX – Add-onsActiveX – Add-ons

framework for defining reusable software framework for defining reusable software components (known as controls) that perform components (known as controls) that perform a particular function or a set of functions in a particular function or a set of functions in Microsoft Windows in a way that is Microsoft Windows in a way that is independent of the programming language. A independent of the programming language. A software application can then be formed from software application can then be formed from one or more of these components in order to one or more of these components in order to provide its functionality. They do not run in a provide its functionality. They do not run in a sandbox. It can do anything on the computer sandbox. It can do anything on the computer such as creating, modifying and deleting such as creating, modifying and deleting files. A signed ActiveX control is generally files. A signed ActiveX control is generally safe. Unsigned is riskier.safe. Unsigned is riskier.

Page 28: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

Cross Site Scripting (XSS)Cross Site Scripting (XSS)

Scripts that extract information from Scripts that extract information from victim and pass it to the attacker.victim and pass it to the attacker.

Changes contents of dynamic websites Changes contents of dynamic websites and injects a script into it that asks for and injects a script into it that asks for personal information through input personal information through input validation.validation.

A web site that displays bad login screens A web site that displays bad login screens with login name is a good one for these with login name is a good one for these types of attacks.types of attacks.

It could send a URL to clickIt could send a URL to click

Page 29: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

SMTP Open RelaysSMTP Open Relays

A user can set up a email receiving A user can set up a email receiving address and a sending address. Usually address and a sending address. Usually they are the same like pop.dia.sbc.net and they are the same like pop.dia.sbc.net and smtp.dia.sbc.net. Some smpt servers are smtp.dia.sbc.net. Some smpt servers are configured to sned mail through other configured to sned mail through other domains (known as relays). An attacker domains (known as relays). An attacker can send spam through such relays can send spam through such relays without getting caught.without getting caught.

Page 30: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

Instant MessagingInstant Messaging

Once a user signs up with the instan Once a user signs up with the instan message server, the client’s IP and port is message server, the client’s IP and port is sent to all buddies and communication can sent to all buddies and communication can take place directly. With direct connection take place directly. With direct connection virus and worms can be spread. Attacker virus and worms can be spread. Attacker can also view contents of messages.can also view contents of messages.

Page 31: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

Peer-to peerPeer-to peer

All types of attacks can take place through All types of attacks can take place through P2P networks. BitTorrent is more secure P2P networks. BitTorrent is more secure than P2P. However, both can be used to than P2P. However, both can be used to download illegal software or music.download illegal software or music.

Page 32: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

DefensesDefenses

Antivirus – always a step behind, update Antivirus – always a step behind, update with definition files.with definition files.

Pop-up blockers. Now incorporated into Pop-up blockers. Now incorporated into the browser.the browser.

Anti-spam. Spam filter with smtp server. Anti-spam. Spam filter with smtp server. Install spam filter with pop3Install spam filter with pop3

Personal firewals.Personal firewals. Host Intrusion Detection systems (HIDS) Host Intrusion Detection systems (HIDS)

monitoring files systems and logfiles.monitoring files systems and logfiles.

Page 33: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 33

28.1 CRYPTOGRAPHY

The word cryptography in Greek means “secret writing.” The term today The word cryptography in Greek means “secret writing.” The term today refers to the science and art of transforming messages to make them refers to the science and art of transforming messages to make them secure and immune to attacks.secure and immune to attacks.

The topics discussed in this section include:The topics discussed in this section include:

Symmetric-Key Cryptography Symmetric-Key Cryptography Asymmetric-Key Cryptography Asymmetric-Key Cryptography Comparison Comparison

Page 34: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 34

Figure 28.1 Cryptography components

Page 35: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 35

In cryptography, the encryption/decryption algorithms are

public; the keys are secret.

Note:Note:

Page 36: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 36

In symmetric-key cryptography, the same key is used by the sender (for encryption) and the receiver (for decryption). The key is shared.

Note:Note:

Page 37: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 37

Figure 28.2 Symmetric-key cryptography

Page 38: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 38

In symmetric-key cryptography, the same key is used in both directions.

Note:Note:

Page 39: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 39

Figure 28.3 Caesar cipher

Page 40: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 40

Figure 28.4 Transpositional cipher

Page 41: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 41

Data encryption Standard (DES) Is a block cipher Takes 64-bit plaintext and creates a

64-bit ciphertext. The cipher key is a 56-bit key.

It uses 16 rounds, each round mixes and swapps (left half with right half)

Page 42: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 42

Figure 28.5 DES (Data Encryption Standard)

Page 43: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 43

The DES cipher uses the same concept as the Caesar cipher, but the

encryption/ decryption algorithm is much more complex.

Note:Note:

Page 44: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 44

Asymmetric-key ciphers

The secret key is personal and unshared. Symmetric key scheme would require n(n-

1)/2 keys, for a million people it would require half a billion shared secret keys. Whereas, in asymmetric scheme we would only require a million secret keys.

Asymmetric ciphers use two keys, private and public.

Asymmetric is much slower. Both symmetric and asymmetric can be used if need to be. Think: if you want to send a secret symmetric key, you can use asymmetric.

Page 45: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

Protocols IPSec (internet Security Protocol) operates in the

network layer. Used in VPN. IP sec supports Authentication Header (AH)

protocal and Encapsulation Security Payload (ESP) protocol

The SSL (Secure Socket Layer) protocol serves as a security for transferring encrypted data.

WEP (Wired Equivalent Privacy) standard. Data stream is encrypted with RC4 algorithm. RC4 is simple, it is not very secure.

WPA (Wi-Fi Protected Access) specification and AES (Advanced Encryption standard) I more secure for encrypting wireless data.

TCP/IP Protocol Suite 45

Page 46: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 46

Figure 28.8 Public-key cryptography

Page 47: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 47

Symmetric-key cryptography is often used for long messages.

Note:Note:

Page 48: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 48

Asymmetric-key algorithms are more efficient for short messages.

Note:Note:

Page 49: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 49

Digital signature can provide authentication, integrity, and

nonrepudiation for a message.

Note:Note:

Page 50: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 50

28.3 DIGITAL SIGNATURE

Digital signature can provide authentication, integrity, and Digital signature can provide authentication, integrity, and nonrepudiation for a message. nonrepudiation for a message.

The topics discussed in this section include:The topics discussed in this section include:

Signing the Whole Document Signing the Whole Document Signing the Digest Signing the Digest

Page 51: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 51

Figure 28.12 Signing the whole document

Page 52: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 52

Digital signature does not provide privacy. If there is a need for privacy, another layer of encryption/decryption

must be applied.

Note:Note:

Page 53: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 53

Figure 28.13 Hash function

Page 54: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 54

Figure 28.14 Sender site

Page 55: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 55

Figure 28.15 Receiver site

The digest is much shorter than the message. The message itself may not lend itself to asymmetric cryptography because it is too long.

Page 56: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 56

Hash functions

Message of arbitrary length is made into a fixed length message.

MD2, MD4, MD5 SHA (Secure Hash Algorithm)

developed by NIST.

Page 57: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 57

Non-repudiation

If alice signs a message then denies it, the message can be verified. That means we have to keep the messages.

A trusted center can be created. Alice send the digitally signed message to the trusted center who verifies it, saves a copy of the message, recreates the message with its own signature and send to bob. Bob can verify the trusted center’s public key.

Page 58: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 58

28.5 KEY MANAGEMENT

In this section we explain how symmetric keys are distributed and how In this section we explain how symmetric keys are distributed and how public keys are certified. public keys are certified.

The topics discussed in this section include:The topics discussed in this section include:

Symmetric-Key Distribution Symmetric-Key Distribution Public-Key Certification Public-Key Certification Kerberos Kerberos

Page 59: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 59

A symmetric key between two parties is useful if it is used only once; it must be created for one session and destroyed

when the session is over.

Note:Note:

Page 60: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 60

Figure 28.19 Diffie-Hellman method

Page 61: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 61

The symmetric (shared) key in the Diffie-Hellman protocol is

K = G xy mod N.

Note:Note:

Page 62: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 62

Let us give an example to make the procedure clear. Our example uses small numbers, but note that in a real situation, the numbers are very large. Assume G = 7 and N = 23. The steps are as follows:

1. Alice chooses x = 3 and calculates R1 = 73 mod 23 = 21.

2. Alice sends the number 21 to Bob.

3. Bob chooses y = 6 and calculates R2 = 76 mod 23 = 4.

4. Bob sends the number 4 to Alice.

5. Alice calculates the symmetric key K = 43 mod 23 = 18.

6. Bob calculates the symmetric key K = 216 mod 23 = 18.

The value of K is the same for both Alice and Bob; G xy mod N = 718 mod 23 = 18.

Example 1

Page 63: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 63

Figure 28.20 Man-in-the-middle attack

Page 64: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 64

Figure 28.21 First approach using KDC

Page 65: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 65

Figure 28.22 Needham-Schroeder protocol

Page 66: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 66

Figure 28.23 Otway-Rees protocol

Page 67: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 67

In public-key cryptography, everyone has access to everyone’s public key.

Note:Note:

Page 68: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 68

Table 28.1 X.509 fieldsTable 28.1 X.509 fields

Page 69: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 69

Figure 28.24 PKI hierarchy

Page 70: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 70

Figure 28.25 Kerberos servers

Page 71: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 71

Figure 28.26 Kerberos example

Page 72: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 72

28.6 SECURITY IN THE INTERNET

In this section we discuss a security method for each of the top 3 layers In this section we discuss a security method for each of the top 3 layers of the Internet model. At the IP level we discuss a protocol called IPSec; of the Internet model. At the IP level we discuss a protocol called IPSec; at the transport layer we discuss a protocol that “glues” a new layer to at the transport layer we discuss a protocol that “glues” a new layer to the transport layer; at the application layer we discuss a security method the transport layer; at the application layer we discuss a security method called PGP.called PGP.

The topics discussed in this section include:The topics discussed in this section include:

IP Level Security: IPSec IP Level Security: IPSec Transport Layer Security Transport Layer Security Application Layer Security: PGP Application Layer Security: PGP

Page 73: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 73

Figure 28.27 Transport mode

Page 74: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 74

Figure 28.28 Tunnel mode

Page 75: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 75

Figure 28.29 AH

Page 76: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 76

The AH protocol provides message authentication and integrity,

but not privacy.

Note:Note:

Page 77: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 77

Figure 28.30 ESP

Page 78: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 78

ESP provides message authentication, integrity, and privacy.

Note:Note:

Page 79: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 79

Figure 28.31 Position of TLS

Page 80: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 80

Figure 28.32 TLS layers

Page 81: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 81

Figure 28.33 Handshake protocol

Page 82: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 82

Figure 28.34 Record Protocol

Page 83: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 83

Figure 28.35 PGP at the sender site

Page 84: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 84

Figure 28.36 PGP at the receiver site

Page 85: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 85

28.7 FIREWALLS

A firewall is a device (usually a router or a computer) installed between A firewall is a device (usually a router or a computer) installed between the internal network of an organization and the rest of the Internet. It is the internal network of an organization and the rest of the Internet. It is designed to forward some packets and filter (not forward) others.designed to forward some packets and filter (not forward) others.

The topics discussed in this section include:The topics discussed in this section include:

Packet-Filter Firewall Packet-Filter Firewall Proxy Firewall Proxy Firewall

Page 86: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 86

Figure 28.37 Firewall

Page 87: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 87

Figure 28.38 Packet-filter firewall

Page 88: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 88

A packet-filter firewall filters at the network or transport layer.

Note:Note:

Page 89: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 89

Figure 28.39 Proxy firewall

Page 90: TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.

TCP/IP Protocol Suite 90

A proxy firewall filters at the application layer.

Note:Note: