Web Attack Vector #2

5 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
€65.44
List Price:  €93.49
You save:  €28.05
£56.04
List Price:  £80.06
You save:  £24.02
CA$95.74
List Price:  CA$136.79
You save:  CA$41.04
A$107.11
List Price:  A$153.03
You save:  A$45.91
S$95.36
List Price:  S$136.24
You save:  S$40.87
HK$547.90
List Price:  HK$782.75
You save:  HK$234.85
CHF 64.03
List Price:  CHF 91.47
You save:  CHF 27.44
NOK kr772.60
List Price:  NOK kr1,103.76
You save:  NOK kr331.16
DKK kr487.88
List Price:  DKK kr697.01
You save:  DKK kr209.12
NZ$117.84
List Price:  NZ$168.36
You save:  NZ$50.51
د.إ257.06
List Price:  د.إ367.25
You save:  د.إ110.18
৳7,700.43
List Price:  ৳11,001.09
You save:  ৳3,300.65
₹5,837.33
List Price:  ₹8,339.41
You save:  ₹2,502.07
RM333.81
List Price:  RM476.90
You save:  RM143.08
₦92,489.99
List Price:  ₦132,134.22
You save:  ₦39,644.23
₨19,474.37
List Price:  ₨27,821.72
You save:  ₨8,347.35
฿2,588.61
List Price:  ฿3,698.17
You save:  ฿1,109.56
₺2,275.23
List Price:  ₺3,250.47
You save:  ₺975.23
B$358.08
List Price:  B$511.57
You save:  B$153.48
R1,312.98
List Price:  R1,875.77
You save:  R562.78
Лв127.91
List Price:  Лв182.73
You save:  Лв54.82
₩96,452.39
List Price:  ₩137,795.03
You save:  ₩41,342.64
₪267.73
List Price:  ₪382.49
You save:  ₪114.75
₱4,034.64
List Price:  ₱5,764.02
You save:  ₱1,729.38
¥11,065.06
List Price:  ¥15,807.91
You save:  ¥4,742.85
MX$1,201.03
List Price:  MX$1,715.83
You save:  MX$514.80
QR255.05
List Price:  QR364.38
You save:  QR109.32
P965.79
List Price:  P1,379.76
You save:  P413.97
KSh9,296.24
List Price:  KSh13,280.92
You save:  KSh3,984.67
E£3,349.82
List Price:  E£4,785.67
You save:  E£1,435.84
ብር3,985.10
List Price:  ብር5,693.24
You save:  ብር1,708.14
Kz58,375.85
List Price:  Kz83,397.65
You save:  Kz25,021.80
CLP$66,375.71
List Price:  CLP$94,826.51
You save:  CLP$28,450.80
CN¥507.11
List Price:  CN¥724.48
You save:  CN¥217.36
RD$4,113.13
List Price:  RD$5,876.15
You save:  RD$1,763.02
DA9,392.53
List Price:  DA13,418.47
You save:  DA4,025.94
FJ$158.35
List Price:  FJ$226.22
You save:  FJ$67.87
Q544.06
List Price:  Q777.27
You save:  Q233.20
GY$14,678.83
List Price:  GY$20,970.66
You save:  GY$6,291.82
ISK kr9,837.79
List Price:  ISK kr14,054.59
You save:  ISK kr4,216.80
DH708.72
List Price:  DH1,012.51
You save:  DH303.78
L1,246.75
List Price:  L1,781.16
You save:  L534.40
ден4,025.16
List Price:  ден5,750.48
You save:  ден1,725.31
MOP$565.76
List Price:  MOP$808.27
You save:  MOP$242.50
N$1,340.22
List Price:  N$1,914.68
You save:  N$574.46
C$2,582.07
List Price:  C$3,688.83
You save:  C$1,106.76
रु9,353.99
List Price:  रु13,363.42
You save:  रु4,009.42
S/263.57
List Price:  S/376.55
You save:  S/112.97
K270.82
List Price:  K386.91
You save:  K116.08
SAR262.50
List Price:  SAR375.01
You save:  SAR112.51
ZK1,859.31
List Price:  ZK2,656.27
You save:  ZK796.96
L325.94
List Price:  L465.65
You save:  L139.71
Kč1,644.39
List Price:  Kč2,349.23
You save:  Kč704.84
Ft25,720.62
List Price:  Ft36,745.32
You save:  Ft11,024.70
SEK kr762.14
List Price:  SEK kr1,088.81
You save:  SEK kr326.67
ARS$61,174.36
List Price:  ARS$87,395.69
You save:  ARS$26,221.33
Bs486.59
List Price:  Bs695.16
You save:  Bs208.56
COP$277,528.94
List Price:  COP$396,486.91
You save:  COP$118,957.97
₡35,172.98
List Price:  ₡50,249.28
You save:  ₡15,076.29
L1,732.56
List Price:  L2,475.19
You save:  L742.63
₲520,857.74
List Price:  ₲744,114.38
You save:  ₲223,256.64
$U2,703.34
List Price:  $U3,862.08
You save:  $U1,158.74
zł282.38
List Price:  zł403.41
You save:  zł121.03
Already have an account? Log In

Transcript

Let's talk about slow HTTP method and why it is like one of the trickiest methods to cope with it. So, this is how a slow HTTP attack works. Suppose that we have an attacker here and we have web server, which is waiting for connections and suppose that the attacker has established an HTTP connection. So the connection is established. And then when it comes to actually sending the data packets sending the requests, what attacker does is it just sends a packet in which indicates that there is more to come, you know, it does a server that okay, this is like the packet number one, but there is more coming. So just wait.

So per the HTTP protocol rules, the server just waits and at the same time, of course, the attacker establishes multiple such connections. And in each connection, it says yeah, more is coming, more is coming, etc. In the end, the attacker just takes over all the resources, the server reserved for establishing new connections, because all these connections are pending, waiting for new packets to come. And of course, attacker doesn't let these connections get terminated either by sending keeper lives. The reason why it's hard to deal with is you as the server can almost never know whether it's an attacker, or it's just a legitimate user with a low bandwidth on the other side. In other words, you don't know if the client is trying to exploit your resources or his just, let's say, trying to download the file.

That's why he is establishing so many connections but probably having a connection issue at the same time. Maybe he's on mobile, and he's traveling. And maybe at certain moments, basically, he has some connection issues. And that's why he just keeps his connections on hold. You can almost never 400% make sure that It's an attacker, or it is a legitimate user with low bandwidth. Yet, there are, of course, some indicators, which tell us that, you know, this is Roger an attacker, and we are going to talk about those indicators.

But before that, let me just go ahead and show you the two types of this kind of attack. The first one is slow HTTP headers. And the second one is slow posts. The logic behind them is the same. The only difference is in HTTP headers. As the name implies, it keeps the connection pending by making the server expect to final crlf tag for headers.

And actually, this example here is for HTTP headers. As you can see, headers are divided into crlf tags. If it wasn't an attack, then that would be another crlf tag, a double zero left tag indicating that you know This is the end of this pagination on the headers. And basically, this is the last packet. But of course, the attacker ever since this packet, it just keeps sending the packet that you see on the screen, indicating that you know, more is coming, wait for more, and etc. As I just mentioned, in slow post, again, the logic the same.

The only thing is, this is used with POST requests, and it uses the same logic, but not in this headers, rather under the form section in the data section. So this indicates that the more of this data below them the post request is coming. And that case, the server expects more of this data apart. Now, how can we detect it? before we're actually going to detection what we need to do is get the web server timeout. 300 chickens is difficult for Apache for example, after that, Single crlf texts are sent in headers.

And the time gap between two requests is less than 300 seconds, then it's wise to raise an alert. Of course, it doesn't mean that again, you're under attack, it just indicates that there might be an attack. So basically, this is I can see the only way to detect them. Remember, that is not true. So just because we have both of them set doesn't mean that you know, you will be basically protected. You need to be constantly checking the connection attempts in order to avoid slow HTTP attacks, and be prepared to get many false positives.

And just like in the case of detection, mitigation is not trivial either. And correct settings for that, where I depending on the web server you use, I have just provided a link in resources which explains you what you should do. Best Practices per server type. But as a general rule, I can recommend you to limit the connection attempts and tractor alerts raised in this detection part. And as a second suggestion, I can recommend you to buffer the requests at your proxy before reaching to your server, although this might create performance issues and finally of course, following the instructions in the link

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.