Top Banner
NETWORK SECURITY DEMONSTRATION OF MAN-IN-THE- MIDDLE ATTACK
18
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: man in the middle

NETWORKSECURITY

DEMONSTRATION OF MAN-IN-THE-

MIDDLE

ATTACK

Page 2: man in the middle

MAN-IN-THE-MIDDLE

• Cryptographic Protocol attacks are often analyzed in terms of a man-in-the-middle

• This is an agent who is able to listen to and potentially add, delete, or change messages being sent over an open channel.

Page 3: man in the middle

CLASSES OF MITM ATTACK

•We can divide attacks roughly into two classes:

•A passive attack is one in which the attacker is only able to monitor the communications channel.• Threatens confidentiality

•An active attack is one in which the attacker attempts to add, delete, or modify messages.• Threatens both confidentiality and data integrity.

Page 4: man in the middle

ATTACKING KEY EXCHANGE

•Key exchange is one of the most common places for a man-in-the-middle attack.

•A sends b its public key.

•Man-in-the-middle replaces a’s public key with a false one.

•Man-in-the-middle is now able to intercept and decrypt secret messages from b to a.

Page 5: man in the middle

PUBLIC-KEY INFRASTRUCTURE

• For real-world applications, a complex web of software systems is required to ensure security.

• This is referred to as a public key infrastructure (PKI).

• Focus shifts from provable protocol properties to system design.

Page 6: man in the middle

CERTIFICATE AUTHORITY

•A certificate authority has a number of functions within a PKI

•Authentication

•Key generation

•Key revocation

•Many commercial entities serve as CAs

Page 7: man in the middle

CERTIFICATE AUTHORITIES

•A certificate authority will wrap a users public key in a certificate.

• X.509 is most common standard.

• Contains the user’s identity and public key.

• Signed with the CAs private key.

• Risk is shifted:

• Previously: could unknown user A be compromised?

• Now: could the CA be compromised?

Page 8: man in the middle

EXAMPLE

•USE OF DIFFIE–HELLMAN KEY EXCHANGE

Page 9: man in the middle

INTRODUCTION•Discovered by whitfield diffie and martin hellman

• “New directions in cryptography”

•Diffie-hellman key agreement protocol

• Exponential key agreement

• Allows two users to exchange a secret key

• Requires no prior secrets

• Real-time over an untrusted network

Page 10: man in the middle

DIFFIE–HELLMAN KEY EXCHANGE• Is a specific method of exchanging cryptographic keys.

• One of the earliest practical examples of key exchange implemented within the field of cryptography.

• Allows two parties that have no prior knowledge of each other to jointly establish a shared secret key over an insecure communications channel.

• This key can then be used to encrypt subsequent communications using a symmetric key cipher.

Page 11: man in the middle

IMPLEMENTATION• P and G are both publicly available numbers• P is at least 512 bits

•Users pick private values a and b

•Compute public values• X = ga mod p

• Y = gb mod p

• Public values x and y are exchanged

Page 12: man in the middle

IMPLEMENTATION•Compute shared, private key• Ka = ya mod p

• Kb = xb mod p

•Algebraically it can be shown that ka = kb • Users now have a symmetric secret key to encrypt

Page 13: man in the middle

IMPLEMENTATION

Page 14: man in the middle

EXAMPLE

•Two internet users, alice and bob wish to have a secure conversation.

• They decide to use the diffie-hellman protocol

Page 15: man in the middle

EXAMPLE• Alice and bob get public numbers• P = 23, g = 9

• Alice and bob compute public values• X = 94 mod 23 = 6561 mod 23 = 6

• Y = 93 mod 23 = 729 mod 23 = 16

• Alice and bob exchange public numbers.

Page 16: man in the middle

EXAMPLE

• Alice and bob compute symmetric keys

• Ka = ya mod p = 164 mod 23 = 9

• Kb = xb mod p = 63 mod 23 = 9

• Alice and bob now can talk securely!

Page 17: man in the middle

APPLICATION•Diffie-hellman is currently used in many protocols, namely:

• Secure sockets layer (SSL)/transport layer security (TLS)

• Secure shell (SSH)

• Internet protocol security (ipsec)

• Public key infrastructure (PKI)

Page 18: man in the middle

CONCLUSION

•Authenticated diffie-hellman key agreement• Defeats middleperson attack

•Diffie-hellman continues to play large role in secure protocol creation.