Transcript

NETWORKSECURITY

DEMONSTRATION OF MAN-IN-THE-

MIDDLE

ATTACK

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.

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.

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.

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.

CERTIFICATE AUTHORITY

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

•Authentication

•Key generation

•Key revocation

•Many commercial entities serve as CAs

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?

EXAMPLE

•USE OF DIFFIE–HELLMAN KEY EXCHANGE

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

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.

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

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

IMPLEMENTATION

EXAMPLE

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

• They decide to use the diffie-hellman protocol

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.

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!

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)

CONCLUSION

•Authenticated diffie-hellman key agreement• Defeats middleperson attack

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

top related