NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT...

36
NETWORK SECURITY EE122 Section 12

Transcript of NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT...

Page 1: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

NETWORK SECURITYEE122 Section 12

Page 2: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

QUESTION 1

Page 3: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

SY

N

SY

N A

CK

AC

KD

ata

RS

T

AC

K

timeA

B

Data R

ST

ABRUPT TERMINATION

A sends a RESET (RST) to B E.g., because application process on A crashed

B does not ack the RST

Thus, RST is not delivered reliably

And: any data in flight is lost

But: if B sends anything more, will elicit another RST

Page 4: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

END-TO-END SECURITY

Application layer TLS/SSL encrypts all application layer data

… but does not encrypt the TCP header!

Page 5: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

END-TO-END SECURITY

Encrypted Content

TCP Header

IP Header

TLS/SSL(Application Layer)

Page 6: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

END-TO-END SECURITY

Application layer TLS/SSL encrypts all application layer data

… but does not encrypt the TCP header!

Transport layer TCP sequence number defends against blind spoofing

… but not man-in-the-middle attacks

Network layer IPsec encrypts the entire IP payload, including the TCP header

Page 7: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

END-TO-END SECURITY

Encrypted Content

TCP Header

IP Header

Encrypted IP Header

IP Header

Encrypted Content

Encrypted TCP Header

TLS/SSL(Application Layer) IPsec

(Network Layer)

Page 8: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

BLIND SPOOFING

Need to know the sequence number

Page 9: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,
Page 10: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,
Page 11: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,
Page 12: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

BLIND SPOOFING

Need to know the sequence number How? Guess all 65536 numbers!

Alternatively, infer first send a legitimate TCP SYN

Let’s say the receiver responds with sequence number A

Then spoof a TCP SYN assuming the receiver responds with A+1

Defenses?

Page 13: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

QUESTION 2

Page 14: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

228.147.0.0/16

Page 15: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

228.147.0.0/16

Source IP: 228.147.0.1

Page 16: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

228.147.0.0/16

Source IP: 188.0.0.1

Egress Filtering

Page 17: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

228.147.0.0/16

Source IP: 123.456.8.8

Page 18: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

228.147.0.0/16

Source IP: 228.147.5.5

Ingress Filtering

Page 19: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

228.147.0.0/16

Source IP: 228.147.5.5

Ingress Filtering

What’s missing?

Page 20: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

Receiver Attacker

SYN

SYNACK (seqno = y)

Source

???ACK (ackno = k?)

Page 21: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

Receiver Attacker

Confirmation Request

Source

???

Confirmation Response

Defenses?

Page 22: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

Receiver Attacker

Confirmation Request (123)

Source

???

Confirmation Response (456?)

Nonce

Page 23: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

QUESTION 3

Page 24: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

You

Web server X

100Mbps1Gbps

Web server X can comfortably handle

the load you generate

Page 25: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

DISTRIBUTED DENIAL-OF-SERVICE (DDOS)

Master

Slave 1

Slave 3

Slave 4

Slave 2

Victim

Control traffic directs slaves at victim

src = randomdst = victim

Slaves send streams of traffic (perhaps spoofed) to victim

Page 26: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

Reflector (R)

Internet

Attacker (A)

Victim (V)

SYN

SYNACK

REFLECTORS

Cause one non-compromised host to attack another E.g., host A sends TCP SYN with source V to server R R sends reply to V

Page 27: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

DIFFUSE DDOS: REFLECTOR ATTACK

Master

Slave 1

Slave 3

Slave 4

Slave 2

Victim

Control traffic directs slaves at victim & reflectors

Request: src = victim dst = reflector

Reflectors send streams of non-spoofed but unsolicited traffic to victim

Reflector 1

Reflector 9

Reflector 4

Reflector 2

Reflector 3

Reflector 5

Reflector 6

Reflector 7

Reflector 11Reflector 8

Reflector 10

Reply: src = reflector dst = victim

Page 28: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

MITIGATING DDOS

No good defense…

Solutions so far Overprovision

Distribute service to multiple machines

Page 29: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

QUESTION 4

Page 30: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

Andrew SteveE(M, Stevepub)

Page 31: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

Andrew SteveE(M, Stevepub)

Man-In-The-Middle

Page 32: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

Andrew Steve

Man-In-The-Middle

E(M’, Stevepub)

Page 33: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

Andrew SteveE(M, Stevepub)

MAC(H(M), Andrewprivate)

Andrewpub???

Page 34: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

Andrew SteveE(M, Stevepub)

MAC(H(M), Andrewprivate)

E(Andrewpub, Stevepub)

Page 35: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

Andrew Steve

Man-In-The-Middle

MAC(H(M), Andrewprivate)

E(Andrewpub, Stevepub)

E(M, Stevepub)

Page 36: NETWORK SECURITY EE122 Section 12. QUESTION 1 SYN SYN ACK ACK Data RST ACK time A B Data RST ABRUPT TERMINATION  A sends a RESET (RST) to B  E.g.,

Andrew Steve

Man-In-The-Middle

MAC(H(M’), MITMprivate)

E(MITMpub, Stevepub)

E(M’, Stevepub)