Professional Documents
Culture Documents
1
ICDCN’06, IIT Guwahati
2
ICDCN’06, IIT Guwahati
1
Security Attacks and Services
3
ICDCN’06, IIT Guwahati
Security Attacks
2
• Interruption:
– Attack on availability S D
• Interception:
S D
– Attack on confidentiality
5
ICDCN’06, IIT Guwahati
S D
• Modification:
– Attack on integrity
I
• Fabrication:
S D
– Attack on authenticity
6
ICDCN’06, IIT Guwahati
3
Passive and Active Attacks
• Passive attacks
– Obtain information that is being transmitted
(eavesdropping).
– Two types:
• Release of message contents:- It may be desirable to
prevent the opponent from learning the contents of
the transmission.
• Traffic analysis:- The opponent can determine the
location and identity of communicating hosts, and
observe the frequency and length of messages being
exchanged.
– Very difficult to detect.
7
ICDCN’06, IIT Guwahati
• Active attacks
– Involve some modification of the data stream or
the creation of a false stream.
– Four categories:
• Masquerade:- One entity pretends to be a different entity.
• Replay:- Passive capture of a data unit and its
subsequent retransmission to produce an unauthorized
effect.
• Modification:- Some portion of a legitimate message is
altered.
• Denial of service:- Prevents the normal use of
communication facilities.
8
ICDCN’06, IIT Guwahati
4
Security Services
• Confidentiality
• Authentication
• Integrity
• Non-repudiation
• Access control
• Availability
– Denial of Service Attacks
– Virus that deletes files
9
ICDCN’06, IIT Guwahati
10
ICDCN’06, IIT Guwahati
5
Cryptography: Basic Concepts
11
ICDCN’06, IIT Guwahati
Introduction
12
ICDCN’06, IIT Guwahati
6
Some Terminologies
• Plaintext:
– the data that is to be encrypted
• Ciphertext:
– the encrypted form of the data
• Encryption/Decryption algorithm
– the algorithm used to carry out the transformation.
• Key
– Usually a secret entity.
– Used as parameter to the encryption/decryption
algorithm.
13
ICDCN’06, IIT Guwahati
14
ICDCN’06, IIT Guwahati
7
Simplified Model of Conventional Encryption
15
ICDCN’06, IIT Guwahati
Classical Techniques
16
ICDCN’06, IIT Guwahati
8
Substitution Ciphers
1. Caesar Cipher
– Earliest known substitution cipher.
– Replace each letter of the alphabet with the letter
three places after that alphabet.
– Alphabets are assumed to be wrapped around (
Z is followed by A, etc.).
17
ICDCN’06, IIT Guwahati
18
ICDCN’06, IIT Guwahati
9
2. Mono-alphabetic Cipher
– Allow any arbitrary substitution.
– There can be 26! or 4x1026 possible keys.
– A typical key may be:
(ZAQWSXCDERFVBGTYHNMJUIKLOP)
– Drawback:
• We can make guesses by observing the relative
frequency of letters in the text.
• Compare it with standard frequency distribution
charts in English (say).
• Also look at the frequency of digrams and
trigrams, for which tables are also available.
• Easy to break in general.
19
ICDCN’06, IIT Guwahati
3. Poly-alphabetic Cipher
– Use different mono-alphabetic substitutions as
we proceed through the plaintext message.
– Vigenere cipher is the best known cipher of
this class.
• Consists of 26 Caesar ciphers, with shifts of 0 to 25.
• Each cipher is denoted by a key letter, which is the
ciphertext letter that substitutes for the plaintext
letter ‘a’.
• To encrypt a message, a key is needed that is as
long as the message (usually, a repeating keyword).
• Decryption is just the reverse.
20
ICDCN’06, IIT Guwahati
10
– Drawback:
• Key and the plaintext share the same
frequency distribution of letters.
• The best thing would have been to use a
keyword which is as large as the plaintext, and
has no statistical relationship to it.
21
ICDCN’06, IIT Guwahati
Transposition Cipher
22
ICDCN’06, IIT Guwahati
11
• An example
P: we have enjoyed the workshop in jadavpur
Key: 4 3 1 2 5 6 7
w e h a v e e
n j o y e d t
h e w o r k s
h o p i n j a
d a v p u r -
23
ICDCN’06, IIT Guwahati
– Drawback:
• The ciphertext has the same letter frequency
as the original plaintext.
• Guessing the number of columns and some
probable words in the plaintext holds the key.
24
ICDCN’06, IIT Guwahati
12
Some Important Issues
25
ICDCN’06, IIT Guwahati
What is meant by
“Security lies in the Keys”
26
ICDCN’06, IIT Guwahati
13
Practical Encryption Algorithms
27
ICDCN’06, IIT Guwahati
28
ICDCN’06, IIT Guwahati
14
P (64-bit) K (56-bit)
Initial Permutation Permuted Choice 1
K1
Round 1 Permuted Choice 2 Left circular shift
K2
Round 2 Permuted Choice 2 Left circular shift
K16
Round 16 Permuted Choice 2 Left circular shift
32-bit Swap
General Schematic
Reverse Inverse of DES Algorithm
Permutation
C (64-bit)
29
ICDCN’06, IIT Guwahati
15
DES
• Concerns about:
– The algorithm and the key length (56-bits)
– Longer key lengths essential for critical
applications
31
ICDCN’06, IIT Guwahati
32
ICDCN’06, IIT Guwahati
16
Hence, Triple DES!
• Use three keys and three executions of
the DES algorithm (encrypt-decrypt-
encrypt).
C = EK3 [DK2 [EK1 [P]]]
– C = ciphertext
– P = Plaintext
– EK[X] = encryption of X using key K
– DK[Y] = decryption of Y using key K
33
ICDCN’06, IIT Guwahati
P E D E C
X Y
K3 K2 K1
C D E D P
Y X
34
ICDCN’06, IIT Guwahati
17
Some Points to Observe
• Key distribution problem of secret key
systems:
– Establish key before communication.
– Need n(n-1)/2 keys with n different parties.
A
B E
C D
35
ICDCN’06, IIT Guwahati
Key Distribution
36
ICDCN’06, IIT Guwahati
18
Key Distribution (contd.)
• Session key:
– Data encrypted with a one-time session key.
– At the conclusion of the session the key is
destroyed
• Permanent key:
– Used between entities for the purpose of
distributing session keys.
37
ICDCN’06, IIT Guwahati
38
ICDCN’06, IIT Guwahati
19
Basic Concept
39
ICDCN’06, IIT Guwahati
A B
40
ICDCN’06, IIT Guwahati
20
Authentication using Public Key System
A’s private key KRA A’s public key KUA
A B
41
ICDCN’06, IIT Guwahati
Applications
• Three categories:
a) Encryption/decryption:
• The sender encrypts a message with the recipient’s
public key.
b) Digital signature / authentication:
• The sender signs a message with its private key.
c) Key exchange:
• Two sides cooperate to exhange a session key.
42
ICDCN’06, IIT Guwahati
21
Requirements
43
ICDCN’06, IIT Guwahati
44
ICDCN’06, IIT Guwahati
22
The RSA Public Key Algorithm
• RSA Algorithm
– Developed by Ron Rivest, Adi Shamir and Len
Adleman at MIT, in 1977.
– A block cipher.
– The most widely implemented.
45
ICDCN’06, IIT Guwahati
23
The RSA Algorithm - Encryption
• Plaintext: M<n
• Ciphertext: C = Me (mod n)
47
ICDCN’06, IIT Guwahati
• Ciphertext: C
• Plaintext: M = Cd (mod n)
48
ICDCN’06, IIT Guwahati
24
Example
• Select two prime numbers, p=7 and q=17.
• Calculate n = pq = 7×17 = 119.
• Calculate φ(n) = (p-1)(q-1) = 96.
• Select e such that e is relatively prime to φ(n)=96,
and less than φ(n).
– In this case, e=5.
• Determine d such that de = 1 (mod 96) and d<96.
– d=77, because 77×5 = 385 = 4×96+1.
Example (contd.)
50
ICDCN’06, IIT Guwahati
25
The Security of RSA
51
ICDCN’06, IIT Guwahati
52
ICDCN’06, IIT Guwahati
26
Network Security Principles
in Use
53
ICDCN’06, IIT Guwahati
Authentication Application::
KERBEROS
• Users wish to access services on servers.
• Three threats exist:
– User pretend to be another user.
– User alter the network address of a computer.
– User eavesdrop on exchanges and use a replay
attack.
54
ICDCN’06, IIT Guwahati
27
• Provides a centralized authentication server
(AS) to authenticate users to servers and
servers to users.
• Relies on conventional encryption.
– Makes no use of public-key encryption.
• Two versions: version 4 and 5.
• Version 4 makes use of DES.
55
ICDCN’06, IIT Guwahati
56
ICDCN’06, IIT Guwahati
28
Electronic Mail Security:: Pretty
Good Privacy (PGP)
• PGP provides a confidentiality and
authentication service that can be used for
electronic mail and file storage applications.
• Why popular?
– It is availiable free on a variety of platforms.
– Based on well known algorithms.
– Wide range of applicability
57
ICDCN’06, IIT Guwahati
58
ICDCN’06, IIT Guwahati
29
PGP Cryptographic Functions
59
ICDCN’06, IIT Guwahati
60
ICDCN’06, IIT Guwahati
30
Application
HTTP LDAP POP3
Layer
SSL
Network
TCP/IP Layer
61
ICDCN’06, IIT Guwahati
62
ICDCN’06, IIT Guwahati
31
SSL Architecture
63
ICDCN’06, IIT Guwahati
TCP
IP
64
ICDCN’06, IIT Guwahati
32
SSL Record Protocol
65
ICDCN’06, IIT Guwahati
Application Data
Fragments
Compressed data
MAC
Add MAC
Encrypt data
H: SSL record
TCP packet header
H
66
ICDCN’06, IIT Guwahati
33
The Higher Layer Protocols
67
ICDCN’06, IIT Guwahati
68
ICDCN’06, IIT Guwahati
34
• SSL Handshake Protocol
– Used to initiate a session between the server and
the client.
– Within the application data, algorithms and keys
used for data encryption can be negotiated.
– Provides mutual authentication.
– Process of negotiation divided into four phases.
69
ICDCN’06, IIT Guwahati
70
ICDCN’06, IIT Guwahati
35
Transport Layer Security (TLS)
• Extension of SSL.
• Aim is to provide security and data integrity
features at the transport layer between two
web applications.
• Supported my most web servers and
browsers today.
71
ICDCN’06, IIT Guwahati
72
ICDCN’06, IIT Guwahati
36
• In SSHv1 protocol, the server uses two keys:
– Long-term server identification key.
• Binds the connection to the server.
• 1024 bit RSA.
– Short-term encryption key, changed every hour.
• Makes later recovery impossible.
• Short-term keys are regenerated as a background task.
• 768 bit RSA.
73
ICDCN’06, IIT Guwahati
74
ICDCN’06, IIT Guwahati
37
IP Security (IPSec)
75
ICDCN’06, IIT Guwahati
IPSec
76
ICDCN’06, IIT Guwahati
38
• Protection in Tunnel Mode
– Encapsulates the entire IP packet within IPSec
protection.
– Tunnels can be created between several different
node types:
• Firewall to firewall
• Host to firewall
• Host to host
77
ICDCN’06, IIT Guwahati
78
ICDCN’06, IIT Guwahati
39
• Confidentiality
– Encrypts data to protect against eavesdropping.
– Can hide data source when encryption is used
over a tunnel.
• Replay Prevention
– Causes transmitted packets to be dropped.
79
ICDCN’06, IIT Guwahati
80
ICDCN’06, IIT Guwahati
40
Secure HTTP (S-HTTP)
81
ICDCN’06, IIT Guwahati
• Some Features:
– Provides a variety of security mechanisms to HTTP
clients and servers.
– Does not require client-side public certificates (or
public keys), as it supports symmetric key-only
operation modes.
– Provides full flexibility of cryptographic algorithms.
• s-HTTP and HTTPS are not the same.
• HTTPS is an alternative to s-HTTP.
– HTTP runs on top of SSL or TSL.
82
ICDCN’06, IIT Guwahati
41
Penetration Testing and Ethical
Hacking
83
ICDCN’06, IIT Guwahati
84
ICDCN’06, IIT Guwahati
42
Ethical Hacking ….
85
ICDCN’06, IIT Guwahati
Why is it Required?
86
ICDCN’06, IIT Guwahati
43
Types of Tests
87
ICDCN’06, IIT Guwahati
88
ICDCN’06, IIT Guwahati
44
2. Internal Penetration Testing
– Follows a methodology similar to external
testing.
– Provides a more complete view of the site
security.
– Testing is typically carried out from a number of
network access points, representing each logical
and physical segment.
• Can include DMZ, VPNs, subnets, etc.
89
ICDCN’06, IIT Guwahati
45
4. Remote Access Security Assessment
– This addresses the security risks associated
with an increasingly mobile workforce.
• Working from home
• Broadband always-on Internet access
• 802.11 wireless networking
– Increased exposure by extending the traditional
perimeter of the organization.
91
ICDCN’06, IIT Guwahati
• Network Security
– Network surveying
– Port scanning
– System identification
– Services identification
– Router testing
– Firewall testing
– Intrusion detection system testing
– Trusted systems testing
– Password cracking
– Denial of service testing
92
ICDCN’06, IIT Guwahati
46
• Wireless Security
– Wireless networks testing
– WEP security testing
– Infrared systems testing
– Cordless communications testing
93
ICDCN’06, IIT Guwahati
94
ICDCN’06, IIT Guwahati
47
• May range from very professionally developed and
maintained tools, to poorly documented scripts meant to
perform specific tasks.
• Special care must be taken to ensure that the tools
themselves do not contain virus or any other malicious
contents.
– Specialist penetration testing providers can
develop their own tools.
• Because available tools are mostly incomplete, and
multiple tools need to be used.
• Many vulnerabilities are not covered by them.
95
ICDCN’06, IIT Guwahati
96
ICDCN’06, IIT Guwahati
48
97
ICDCN’06, IIT Guwahati
98
ICDCN’06, IIT Guwahati
49
99
ICDCN’06, IIT Guwahati
100
ICDCN’06, IIT Guwahati
50
References
1. Cryptography and Network Security: Principles and Practice, 2nd
Edition, William Stallings, Prentice Hall, New Jersey, 1999.
2. Network Security Essentials: Applications and Standards, William
Stallings, Pearson Education Asia, 2000.
3. Applied Cryptography, B. Schneier, Wiley, New York, 1996.
4. Internet Cryptography, R. Smith, Addison Wesley, MA, 1997.
5. Handbook of Applied Cryptography, A.J. Menezes, et al.
http://www.cacr.math.uwaterloo.ca/hac/
6. Journals
– IEEE Transactions on Information Theory
– Computer Security
– Communications of the ACM
– IEEE Communications Magazine
– Computer Communications Review
7. The Internet
101
ICDCN’06, IIT Guwahati
102
ICDCN’06, IIT Guwahati
51