this time
play

This time Digging into Networking Protocols With a particular - PowerPoint PPT Presentation

This time Digging into Networking Protocols With a particular focus on TCP details, a t t a c k s, and defenses Layer 3: (Inter)network layer Bridges multiple subnets to provide end-to-end internet connectivity between nodes 7


  1. Setting up a connection Three-way handshake B A SYN Waterfall 
 diagram Time

  2. Setting up a connection Three-way handshake B A SYN Let’s SYNchronize 
 sequence numbers Waterfall 
 diagram Time

  3. Setting up a connection Three-way handshake B A SYN Let’s SYNchronize 
 sequence numbers Waterfall 
 SYN + ACK diagram Time

  4. Setting up a connection Three-way handshake B A SYN Let’s SYNchronize 
 sequence numbers Waterfall 
 SYN + ACK Got yours; here’s mine diagram Time

  5. Setting up a connection Three-way handshake B A SYN Let’s SYNchronize 
 sequence numbers Waterfall 
 SYN + ACK Got yours; here’s mine diagram ACK Time

  6. Setting up a connection Three-way handshake B A SYN Let’s SYNchronize 
 sequence numbers Waterfall 
 SYN + ACK Got yours; here’s mine diagram ACK Time Got yours, too

  7. Setting up a connection Three-way handshake B A SYN Let’s SYNchronize 
 sequence numbers Waterfall 
 SYN + ACK Got yours; here’s mine diagram ACK Time Got yours, too Data

  8. Setting up a connection Three-way handshake B A SYN Let’s SYNchronize 
 sequence numbers Waterfall 
 SYN + ACK Got yours; here’s mine diagram ACK Time Got yours, too Data Data

  9. Setting up a connection Three-way handshake B A SYN Let’s SYNchronize 
 sequence numbers Waterfall 
 SYN + ACK Got yours; here’s mine diagram ACK Time Got yours, too Data Data Data

  10. Setting up a connection Three-way handshake B A SYN seqno=x Let’s SYNchronize 
 sequence numbers Waterfall 
 SYN seqno=y 
 Got yours; here’s mine diagram +ACK x+1 ACK y+1 Time Got yours, too Data Data Data

  11. TCP flags • SYN • ACK • FIN: Let’s shut this down (two-way) • FIN • FIN+ACK • RST: I’m shutting you down • Says “delete all your local state, because I don’t know what you’re talking about

  12. Attacks • SYN flooding • Injection attacks • Opt-ack attack

  13. SYN flooding

  14. SYN flooding Recall the three-way handshake: B A Waterfall 
 diagram Time

  15. SYN flooding Recall the three-way handshake: B A SYN Waterfall 
 diagram Time

  16. SYN flooding Recall the three-way handshake: B A SYN Waterfall 
 At this point, B diagram allocates state 
 for this new 
 Time connection (incl. IP, port, 
 maximum 
 segment size)

  17. SYN flooding Recall the three-way handshake: B A SYN Waterfall 
 At this point, B IP/port, diagram allocates state 
 MSS,… for this new 
 Time connection (incl. IP, port, 
 maximum 
 segment size)

  18. SYN flooding Recall the three-way handshake: B A SYN Waterfall 
 At this point, B IP/port, diagram allocates state 
 MSS,… SYN + ACK for this new 
 Time connection (incl. IP, port, 
 maximum 
 segment size)

  19. SYN flooding Recall the three-way handshake: B A SYN Waterfall 
 At this point, B IP/port, diagram allocates state 
 MSS,… SYN + ACK for this new 
 Time connection ACK (incl. IP, port, 
 maximum 
 segment size)

  20. SYN flooding Recall the three-way handshake: B A SYN Waterfall 
 At this point, B IP/port, diagram allocates state 
 MSS,… SYN + ACK for this new 
 Time connection ACK (incl. IP, port, 
 maximum 
 SYN + ACK segment size)

  21. SYN flooding Recall the three-way handshake: B A SYN Waterfall 
 At this point, B IP/port, diagram allocates state 
 MSS,… SYN + ACK for this new 
 Time connection ACK (incl. IP, port, 
 maximum 
 SYN + ACK segment size) B will hold onto this local state and retransmit SYN+ACK’s 
 until it hears back or times out (up to 63 sec).

  22. SYN flooding The attack B A C

  23. SYN flooding The attack B A C SYN

  24. SYN flooding The attack B A C SYN IP/port, MSS,…

  25. SYN flooding The attack B A C SYN IP/port, SYN MSS,…

  26. SYN flooding The attack B A C SYN IP/port, SYN MSS,… IP/port, MSS,…

  27. SYN flooding The attack B A C SYN IP/port, SYN MSS,… IP/port, SYN MSS,…

  28. SYN flooding The attack B A C SYN IP/port, SYN MSS,… IP/port, SYN MSS,… IP/port, MSS,…

  29. SYN flooding The attack B A C SYN IP/port, SYN MSS,… IP/port, SYN MSS,… SYN IP/port, SYN SYN MSS,… SYN SYN SYN SYN SYN

  30. SYN flooding The attack B A C SYN IP/port, SYN MSS,… IP/port, SYN MSS,… SYN IP/port, SYN SYN MSS,… SYN SYN IP/port, SYN IP/port, SYN IP/port, SYN MSS,… IP/port, MSS,… MSS,… MSS,…

  31. SYN flooding The attack B A C SYN IP/port, SYN MSS,… IP/port, SYN MSS,… SYN IP/port, SYN SYN MSS,… SYN SYN IP/port, SYN IP/port, SYN IP/port, SYN MSS,… IP/port, MSS,… MSS,… MSS,… Exhaust memory 
 at the victim B.

  32. SYN flooding The attack B A C SYN IP/port, SYN MSS,… IP/port, SYN MSS,… SYN IP/port, SYN SYN MSS,… SYN SYN IP/port, SYN IP/port, SYN IP/port, SYN MSS,… IP/port, MSS,… MSS,… MSS,… SYN Exhaust memory 
 at the victim B.

  33. SYN flooding The attack B A C SYN IP/port, SYN MSS,… IP/port, SYN MSS,… New connections 
 will fail (insufficient 
 SYN IP/port, SYN memory) SYN MSS,… SYN SYN IP/port, SYN IP/port, SYN IP/port, SYN MSS,… IP/port, MSS,… MSS,… MSS,… SYN Exhaust memory 
 at the victim B.

  34. SYN flooding details • Easy to detect many incomplete handshakes from a single IP address • Spoof the source IP address • It’s just a field in a header: set it to whatever you like • Problem: the host who really owns that spoofed IP address may respond to the SYN+ACK with a RST, deleting the local state at the victim • Ideally, spoof an IP address of a host you know won’t respond

  35. SYN cookies The defense B A

  36. SYN cookies The defense B A SYN

  37. SYN cookies The defense B A SYN IP/port, MSS,…

  38. SYN cookies The defense B A Rather than store this data, SYN send it to the host who IP/port, is initiating the MSS,… connection and have him return it to you

  39. SYN cookies The defense B A Rather than store this data, SYN send it to the host who IP/port, is initiating the MSS,… connection and have SYN + ACK 
 him return it to you seqno = f(data) Store the necessary 
 state in your seqno

  40. SYN cookies The defense B A Rather than store this data, SYN send it to the host who is initiating the connection and have SYN + ACK 
 him return it to you seqno = f(data) Store the necessary 
 state in your seqno

  41. SYN cookies The defense B A Rather than store this data, SYN send it to the host who is initiating the connection and have SYN + ACK 
 him return it to you seqno = f(data) Store the necessary 
 state in your seqno ACK f(data)+1

  42. SYN cookies The defense B A Rather than store this data, SYN send it to the host who is initiating the connection and have SYN + ACK 
 him return it to you seqno = f(data) Store the necessary 
 state in your seqno Check that f(data) is valid ACK f(data)+1 for this connection. Only at that point do you allocate state.

  43. SYN cookies The defense B A Rather than store this data, SYN send it to the host who is initiating the connection and have SYN + ACK 
 him return it to you seqno = f(data) Store the necessary 
 state in your seqno Check that f(data) is valid ACK f(data)+1 for this connection. Only at that point do you IP/port, allocate state. MSS,…

  44. SYN cookie format B A 32-bit seqno f(.) = SYN Slow-moving MSS Secure hash timestamp Prevents 
 The info we 
 Includes: 
 SYN + ACK 
 replay 
 need for this 
 IPs/ports, MSS, 
 seqno = f(data) attacks connection timestamp ACK f(data)+1 The secure hash makes 
 it difficult for the attacker 
 IP/port, to guess what f() will be, MSS,… and therefore the attacker 
 cannot guess a correct ACK 
 if he spoofs.

  45. Injection attacks • Suppose you are on the path between src and dst; what can you do? • Trivial to inject packets with the correct sequence number • What if you are not on the path? • Need to guess the sequence number • Is this difficult to do?

  46. Initial sequence numbers • Initial sequence numbers used to be deterministic • What havoc can we wreak? • Send RSTs • Inject data packets into an existing connection (TCP veto attacks) • Initiate and use an entire connection without ever hearing the other end

  47. Mitnick attack X-terminal 
 Server that X- server term trusts Any connection initiated 
 from this IP address is 
 allowed access to the 
 X-terminal server Attacker

  48. Mitnick attack X-terminal 
 Server that X- server term trusts Any connection initiated 
 from this IP address is 
 allowed access to the 
 X-terminal server 1. SYN flood the trusted server Attacker

  49. Mitnick attack X-terminal 
 Server that X- server term trusts Any connection initiated 
 from this IP address is 
 allowed access to the 
 X-terminal server 1. SYN flood the trusted server Attacker

  50. Mitnick attack X-terminal 
 Server that X- server term trusts Any connection initiated 
 from this IP address is 
 allowed access to the 
 X-terminal server 1. SYN flood the trusted server 2. Spoof trusted server’s IP addr 
 Attacker in SYN to X-terminal

  51. Mitnick attack X-terminal 
 Server that X- server term trusts Any connection initiated 
 SYN src: from this IP address is 
 allowed access to the 
 X-terminal server 1. SYN flood the trusted server 2. Spoof trusted server’s IP addr 
 Attacker in SYN to X-terminal

  52. Mitnick attack SYN+ACK 
 X-terminal 
 seqno Server that X- server term trusts Any connection initiated 
 SYN src: from this IP address is 
 allowed access to the 
 X-terminal server 1. SYN flood the trusted server 2. Spoof trusted server’s IP addr 
 Attacker in SYN to X-terminal

  53. Mitnick attack SYN+ACK 
 X-terminal 
 seqno Server that X- server term trusts Any connection initiated 
 SYN src: from this IP address is 
 allowed access to the 
 X-terminal server 1. SYN flood the trusted server 2. Spoof trusted server’s IP addr 
 Attacker in SYN to X-terminal 3. Trusted server too busy to RST

  54. Mitnick attack SYN+ACK 
 X-terminal 
 seqno Server that X- server term trusts Any connection initiated 
 SYN src: from this IP address is 
 allowed access to the 
 X-terminal server 1. SYN flood the trusted server 2. Spoof trusted server’s IP addr 
 Attacker in SYN to X-terminal 3. Trusted server too busy to RST 4. ACK with the guessed seqno

  55. Mitnick attack SYN+ACK 
 X-terminal 
 seqno Server that X- server term trusts Any connection initiated 
 SYN src: from this IP address is 
 ACK src: 
 allowed access to the 
 seqno+1 X-terminal server 1. SYN flood the trusted server 2. Spoof trusted server’s IP addr 
 Attacker in SYN to X-terminal 3. Trusted server too busy to RST 4. ACK with the guessed seqno

  56. Mitnick attack SYN+ACK 
 X-terminal 
 seqno Server that X- server term trusts Any connection initiated 
 SYN src: from this IP address is 
 ACK src: 
 allowed access to the 
 seqno+1 X-terminal server 1. SYN flood the trusted server 2. Spoof trusted server’s IP addr 
 Attacker in SYN to X-terminal “echo ++ >> ./rhosts” 3. Trusted server too busy to RST 4. ACK with the guessed seqno

  57. Mitnick attack SYN+ACK 
 X-terminal 
 seqno Server that X- server term trusts Any connection initiated 
 SYN src: from this IP address is 
 ACK src: 
 allowed access to the 
 seqno+1 X-terminal server 1. SYN flood the trusted server 2. Spoof trusted server’s IP addr 
 Attacker in SYN to X-terminal “echo ++ >> ./rhosts” 3. Trusted server too busy to RST 4. ACK with the guessed seqno 5. Grant access to all sources

  58. Mitnick attack SYN+ACK 
 X-terminal 
 seqno Server that X- server term trusts ACK Any connection initiated 
 SYN src: from this IP address is 
 ACK src: 
 allowed access to the 
 seqno+1 X-terminal server 1. SYN flood the trusted server 2. Spoof trusted server’s IP addr 
 Attacker in SYN to X-terminal “echo ++ >> ./rhosts” 3. Trusted server too busy to RST 4. ACK with the guessed seqno 5. Grant access to all sources

  59. Mitnick attack SYN+ACK 
 X-terminal 
 seqno Server that X- server term trusts ACK Any connection initiated 
 SYN src: from this IP address is 
 ACK src: 
 allowed access to the 
 seqno+1 X-terminal server 1. SYN flood the trusted server 2. Spoof trusted server’s IP addr 
 Attacker in SYN to X-terminal “echo ++ >> ./rhosts” 3. Trusted server too busy to RST 4. ACK with the guessed seqno 5. Grant access to all sources 6. RSTs to trusted server (cleanup)

  60. Mitnick attack SYN+ACK 
 X-terminal 
 seqno Server that X- server term trusts ACK Any connection initiated 
 SYN src: from this IP address is 
 ACK src: 
 allowed access to the 
 seqno+1 X-terminal server 1. SYN flood the trusted server 2. Spoof trusted server’s IP addr 
 Attacker in SYN to X-terminal “echo ++ >> ./rhosts” 3. Trusted server too busy to RST 4. ACK with the guessed seqno 5. Grant access to all sources 6. RSTs to trusted server (cleanup)

Recommend


More recommend