TCP/IP Transport Layer Attack Vector #1 Response Challenges

13 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$69.99
List Price:  $99.99
You save:  $30
€67.18
List Price:  €95.97
You save:  €28.79
£55.86
List Price:  £79.80
You save:  £23.94
CA$97.87
List Price:  CA$139.82
You save:  CA$41.95
A$107.62
List Price:  A$153.75
You save:  A$46.13
S$94.24
List Price:  S$134.64
You save:  S$40.39
HK$544.83
List Price:  HK$778.36
You save:  HK$233.53
CHF 62.54
List Price:  CHF 89.34
You save:  CHF 26.80
NOK kr774.97
List Price:  NOK kr1,107.14
You save:  NOK kr332.17
DKK kr501
List Price:  DKK kr715.75
You save:  DKK kr214.74
NZ$119.95
List Price:  NZ$171.37
You save:  NZ$51.41
د.إ257.07
List Price:  د.إ367.26
You save:  د.إ110.19
৳8,361.58
List Price:  ৳11,945.63
You save:  ৳3,584.04
₹5,909.84
List Price:  ₹8,442.99
You save:  ₹2,533.15
RM312.71
List Price:  RM446.75
You save:  RM134.04
₦118,484.88
List Price:  ₦169,271.38
You save:  ₦50,786.49
₨19,443.22
List Price:  ₨27,777.22
You save:  ₨8,334
฿2,412.28
List Price:  ฿3,446.26
You save:  ฿1,033.98
₺2,418.32
List Price:  ₺3,454.90
You save:  ₺1,036.57
B$406.01
List Price:  B$580.04
You save:  B$174.03
R1,267.89
List Price:  R1,811.35
You save:  R543.45
Лв131.37
List Price:  Лв187.69
You save:  Лв56.31
₩98,301.65
List Price:  ₩140,436.95
You save:  ₩42,135.30
₪259.10
List Price:  ₪370.16
You save:  ₪111.06
₱4,125.14
List Price:  ₱5,893.31
You save:  ₱1,768.17
¥10,832.35
List Price:  ¥15,475.45
You save:  ¥4,643.10
MX$1,429.79
List Price:  MX$2,042.64
You save:  MX$612.85
QR255.18
List Price:  QR364.56
You save:  QR109.38
P956.90
List Price:  P1,367.06
You save:  P410.16
KSh9,061.51
List Price:  KSh12,945.58
You save:  KSh3,884.06
E£3,475.01
List Price:  E£4,964.52
You save:  E£1,489.50
ብር8,566
List Price:  ብር12,237.67
You save:  ብር3,671.66
Kz63,900.87
List Price:  Kz91,290.87
You save:  Kz27,390
CLP$69,057.73
List Price:  CLP$98,658.13
You save:  CLP$29,600.40
CN¥506.93
List Price:  CN¥724.22
You save:  CN¥217.29
RD$4,217.06
List Price:  RD$6,024.63
You save:  RD$1,807.57
DA9,397.90
List Price:  DA13,426.15
You save:  DA4,028.25
FJ$159.29
List Price:  FJ$227.57
You save:  FJ$68.27
Q540.13
List Price:  Q771.64
You save:  Q231.51
GY$14,638.82
List Price:  GY$20,913.50
You save:  GY$6,274.67
ISK kr9,776.20
List Price:  ISK kr13,966.60
You save:  ISK kr4,190.40
DH703.91
List Price:  DH1,005.63
You save:  DH301.72
L1,275.33
List Price:  L1,821.98
You save:  L546.64
ден4,132.76
List Price:  ден5,904.20
You save:  ден1,771.43
MOP$561.01
List Price:  MOP$801.48
You save:  MOP$240.46
N$1,268.91
List Price:  N$1,812.81
You save:  N$543.90
C$2,574.70
List Price:  C$3,678.31
You save:  C$1,103.60
रु9,449.77
List Price:  रु13,500.25
You save:  रु4,050.48
S/265.32
List Price:  S/379.05
You save:  S/113.72
K281.71
List Price:  K402.47
You save:  K120.75
SAR262.77
List Price:  SAR375.40
You save:  SAR112.63
ZK1,934.92
List Price:  ZK2,764.29
You save:  ZK829.37
L334.42
List Price:  L477.77
You save:  L143.34
Kč1,702.59
List Price:  Kč2,432.37
You save:  Kč729.78
Ft27,646.05
List Price:  Ft39,496.05
You save:  Ft11,850
SEK kr772.42
List Price:  SEK kr1,103.50
You save:  SEK kr331.08
ARS$70,259.44
List Price:  ARS$100,374.93
You save:  ARS$30,115.49
Bs483.50
List Price:  Bs690.75
You save:  Bs207.24
COP$307,238.59
List Price:  COP$438,931.09
You save:  COP$131,692.49
₡35,641.51
List Price:  ₡50,918.63
You save:  ₡15,277.11
L1,768.23
List Price:  L2,526.16
You save:  L757.92
₲546,248.87
List Price:  ₲780,388.98
You save:  ₲234,140.10
$U2,983.14
List Price:  $U4,261.82
You save:  $U1,278.67
zł291.40
List Price:  zł416.31
You save:  zł124.90
Already have an account? Log In

Transcript

Now let's discuss those SYN flood challenges that we briefly discussed already. How can we challenge clients or more specifically the attacker in order to protect your environment, while not blocking the legitimate users. In this lecture, we will start from where we left off last time. Now we're response challenge methods will consist of using two different things. The first one is sync cookie. And the second one is using proxies and firewalls, more specifically proxies.

Now, I think the second item is obvious. Using proxies by proxy, I mean using a proxy between the client and the server you want to protect, basically, sync cookie. Now what I mean by that, what I mean by sync cookie is basically choosing specific TCP sequence numbers in order to find out whether actually, the client is following this three way handshake structure. Or not. In other words, suppose we have a client here, and we have the server here. When the client sends the Send request, while we are answering it with a SYN ack, it is not going to be a standard SYN ack, we choose a specially crafted SYN ack, which has a temporary TCP sequence number, so that we expect a client to send an ACK with an appropriate sequence number in accordance with our SYN ack.

Again, if the client fails to send an ACK request here, which is not suitable to our SYN ack that we sent. In other words, if the sequence numbers are not matching up, then it is almost certain that this is not a client, it's actually an attacker. In all these challenges that I have defined here, we will be using both of these things, meaning both SYN cookie and proxy between our protected server and the quote. Now there are three different methodologies for challenging against sin. plots. The first one is proxy fight.

The second one is the reset aspect. And the third one is reset sent. So let's start with the first one. In the proxy fight structure, we first use the proxy before actually letting the traffic pass through our protected server. In other words, as you can see here, our proxy on behalf of the server replies with a special syntax requests the cookie here, this cookie is nothing but again, a temporary TCP sequence number. So when a real user receives this temporary SYN ack request, it should also respond with an appropriate sequence number.

And only after that, we actually forward this request from real user to our server. In other words, this SYN request, only after this authentication is transmitted to the server and then our server answers with SYN ack and only then the act is also transmitted. This is the first methodology. Now let's discuss the pros and cons of this methodology. Well, the pros, as you can see, it involves using a proxy on that nothing else. And additionally protects against empty connection floats, which we will also discuss later on in this course.

And actually, we haven't gotten to the upper TCP IP layers yet. But as a heads up, it also applies to HTTP, HTTPS, and rtsp. Here, I can tell you that the most important thing is it protects against both HTTP and HTTPS. Cons. It requires a fully symmetric environment in your network. If you don't know what the symmetric environment means in the network.

I recommend you to go back and refresh your knowledge on that. And the second one, which is kind of obvious later on Adding and sequence acknowledge number modification can impact performance. As you might remember, proxy first authenticates all the requests before reaching to the server. Let me show you here, first of the proxy, and then we forward everything to the server. So this kind of two step connection establishment can impact the performance of the server and therefore the clients. The second method is reset expect here we intentionally sand the bad synack to the SYN request of the client.

In other words, in reset expect, we are actually not using exactly the same cookies, but we are sending an out of band SYN ack sequence number. And according to TCP rules, when a client receives such a bad SYN ack request, it must replace it with a reset once we received the reset after a certain amount of time If we receive a SYN request again, then we verify that this is actually a real client. In other words, if you don't receive a reset, instead, if you keep receiving sins all the time from the client to your proxy, according to TCP rules again, it means that this is a legitimate traffic. Therefore, it's most likely an attacker only after this authentication, the proxy lets the traffic pass through to the server. The only difference in this methodology is in reset expect, as opposed to the proxy fight approach.

Once we authenticate the client, we don't care about the rest of the traffic. In other words, all the rest of the traffic will directly reach to the server. There won't be a middleman sitting here as opposed to proxy fight because in proxy fight all the traffic was forwarded by proxy even after Client authentication. Now let's discuss pros and cons. The first Pro is it works in that symmetric Ingress only. If you don't know what it means, please go back and check your networking knowledge on that.

And the second one is not late binding in this approach. Since once the authentication of the client is complete, the proxy doesn't play any role anymore in the traffic from that moment on. In other words, once it's authenticated, the client can directly communicate with the server as we discussed, cons, it doesn't work in a symmetric mesh deployments. Some firewalls may look to reset packets to be expected. Because basically, it's an unusual situation in three way handshake. So some firewalls on the client site may block it, and therefore the client might have to need to tune this firewall accordingly.

Just to be able to connect to your server. And with a proxy, once one legitimate user authenticates itself. In cases behind the net, anyone behind the same net will be authenticated. And this actually can be a big issue, because let us check it again. Suppose that this user is authenticated. And proxy doesn't play any role anymore, as we discussed.

In other words, from that moment on, the traffic between the client and the server will be direct. So what if this is actually an attacker? What if at the beginning, it pretends to be a normal client and authenticates himself? Or what if one single legitimate user behind the net or proxy authenticates the client IP, but there are actually attackers behind the same IP, then actually, this methodology becomes useful. In fact, let me demonstrate the issue with a graph. As you can see here, when the see request comes in, the server replies with an ACK request with an invalid sequence number.

And then the server waits for a reset packet. And if the server receives that reset, the server waits for some time, which you should define, depending on your network and performance expectation. So if within this period of time the server receives a SYN transmit, then we know that this SYN sender is authenticated. And the IP is to be added to the content table that you will have to create in this methodology to check the legitimate sin Sanders in order to lock the traffic pass through in the future. And after that, this is proxied. By the way, after that authentication, all upcoming sins will be directly forwarded.

To the protected server, and all traffic from that point on is going to be direct. And that will leave the server unprotected against the SYN floods, which might come from the same IP client. The final methodology that we are going to discuss is the reset sent. Let me this time start directly with the graph. This is again, the proxy in this methodology. Instead of expecting a reset, that we actually send the reset to the client.

In other words, we in this methodology use again cookies, we reply with cookies. And then we again expect an acknowledged packet with an appropriate cookie. And at that point, we again authenticate the client. However, this time, we treat this as the only first step of our authentication. So after this three way handshake, successful three way handshake, we suddenly send the reset packets. So the difference between a reset sent and reset expect is in recent sense, we use SYN cookies, and we complete the three way handshake.

But there's a second stage, we reset the connection. And then, within a predefined period of time, we expect the client to send the new SYN request, again with the cookie that we defined in the previous methodology in the reset expect, we were actually expecting the client to send a reset. Now let's discuss its pros and cons as well. The first Pro is it works again in a symmetric Ingress only. And there's also no delayed binding because as you could see, after the authentication, and after waiting for some specific time, a proxy basically allows the traffic to pass through directly to the server. And the columns here, the support is only for HTTP, HTTPS, and smtp.

In other words, other application layer protocols does not work with this methodology. It doesn't work in a symmetric mesh actually depends on the application to respond to the reset. And this is actually something that can vary depending on the application. Since there is no common guideline, common rules for that. And again, in relation to that, depending on the application, the client will need to refresh page or take similar action in order to pass this authentication and the same code as before, as reset expect a place here with a proxy. And by the way, this proxy is the proxy on the client side.

In other words, we are talking about kind of a NAT here, the proxies to which multiple clients Connect So again, once this connection is authenticated, all the clients using the same client proxy will be authenticated as well. So just because one client is authenticated, we cannot make sure that, you know, all the people who use this proxy or the nut, if this is a company are legitimate users actually saw again, just like in the previous methodology reset expect with a proxy. One legitimate user request can authenticate the attackers. Finally, let me just show you the comparison of these methodologies. As you can see, Prague certified works in a symmetric environment. In a symmetric Ingress only doesn't work in a symmetric mesh.

And there is late binding because in proxy fight, as the name suggests, is Brock's fights. So all the traffic is sort of checked by the proxy all the time. Reset expect and resets and when it comes to environment and delay, they are pretty much the same actually. So when you are going to decide on what methodology you use, you need to consider all these parameters.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.