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.23
List Price:  €96.05
You save:  €28.81
£54.79
List Price:  £78.28
You save:  £23.48
CA$100.29
List Price:  CA$143.28
You save:  CA$42.98
A$112.09
List Price:  A$160.13
You save:  A$48.04
S$94.52
List Price:  S$135.03
You save:  S$40.51
HK$543.88
List Price:  HK$777
You save:  HK$233.12
CHF 61.94
List Price:  CHF 88.49
You save:  CHF 26.55
NOK kr788.73
List Price:  NOK kr1,126.80
You save:  NOK kr338.07
DKK kr502.03
List Price:  DKK kr717.22
You save:  DKK kr215.19
NZ$123.81
List Price:  NZ$176.87
You save:  NZ$53.06
د.إ257.07
List Price:  د.إ367.26
You save:  د.إ110.18
৳8,350.53
List Price:  ৳11,929.84
You save:  ৳3,579.31
₹5,977
List Price:  ₹8,538.94
You save:  ₹2,561.93
RM314.04
List Price:  RM448.65
You save:  RM134.61
₦108,176.53
List Price:  ₦154,544.52
You save:  ₦46,367.99
₨19,454.09
List Price:  ₨27,792.76
You save:  ₨8,338.66
฿2,391.55
List Price:  ฿3,416.65
You save:  ฿1,025.10
₺2,463.31
List Price:  ₺3,519.17
You save:  ₺1,055.85
B$446.27
List Price:  B$637.56
You save:  B$191.28
R1,312.34
List Price:  R1,874.85
You save:  R562.51
Лв131.59
List Price:  Лв188
You save:  Лв56.40
₩101,993.60
List Price:  ₩145,711.39
You save:  ₩43,717.78
₪255.42
List Price:  ₪364.90
You save:  ₪109.48
₱4,105.61
List Price:  ₱5,865.41
You save:  ₱1,759.80
¥11,000.67
List Price:  ¥15,715.92
You save:  ¥4,715.24
MX$1,411.29
List Price:  MX$2,016.21
You save:  MX$604.92
QR254.14
List Price:  QR363.08
You save:  QR108.93
P970.50
List Price:  P1,386.50
You save:  P415.99
KSh9,031.50
List Price:  KSh12,902.70
You save:  KSh3,871.20
E£3,557.88
List Price:  E£5,082.90
You save:  E£1,525.02
ብር8,897.26
List Price:  ብር12,710.92
You save:  ብር3,813.65
Kz63,830.88
List Price:  Kz91,190.88
You save:  Kz27,360
CLP$69,240.40
List Price:  CLP$98,919.10
You save:  CLP$29,678.70
CN¥510.85
List Price:  CN¥729.82
You save:  CN¥218.97
RD$4,256.60
List Price:  RD$6,081.12
You save:  RD$1,824.52
DA9,455.74
List Price:  DA13,508.78
You save:  DA4,053.03
FJ$162.28
List Price:  FJ$231.84
You save:  FJ$69.55
Q538.26
List Price:  Q768.97
You save:  Q230.71
GY$14,619.81
List Price:  GY$20,886.35
You save:  GY$6,266.53
ISK kr9,767.10
List Price:  ISK kr13,953.60
You save:  ISK kr4,186.50
DH704.68
List Price:  DH1,006.73
You save:  DH302.05
L1,289.28
List Price:  L1,841.91
You save:  L552.62
ден4,135.94
List Price:  ден5,908.74
You save:  ден1,772.79
MOP$559.01
List Price:  MOP$798.63
You save:  MOP$239.61
N$1,299.34
List Price:  N$1,856.28
You save:  N$556.93
C$2,571.30
List Price:  C$3,673.45
You save:  C$1,102.14
रु9,517.06
List Price:  रु13,596.38
You save:  रु4,079.32
S/260.20
List Price:  S/371.74
You save:  S/111.53
K283.61
List Price:  K405.18
You save:  K121.56
SAR262.82
List Price:  SAR375.47
You save:  SAR112.65
ZK1,933.89
List Price:  ZK2,762.82
You save:  ZK828.92
L334.85
List Price:  L478.38
You save:  L143.52
Kč1,692.49
List Price:  Kč2,417.95
You save:  Kč725.45
Ft27,633.93
List Price:  Ft39,478.73
You save:  Ft11,844.80
SEK kr761.65
List Price:  SEK kr1,088.11
You save:  SEK kr326.46
ARS$71,885.87
List Price:  ARS$102,698.50
You save:  ARS$30,812.63
Bs482.86
List Price:  Bs689.84
You save:  Bs206.97
COP$308,852.42
List Price:  COP$441,236.66
You save:  COP$132,384.23
₡35,480.70
List Price:  ₡50,688.88
You save:  ₡15,208.18
L1,775.44
List Price:  L2,536.46
You save:  L761.01
₲544,980.94
List Price:  ₲778,577.57
You save:  ₲233,596.63
$U3,110.44
List Price:  $U4,443.67
You save:  $U1,333.23
zł286.56
List Price:  zł409.39
You save:  zł122.83
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.