Web Attack Vector #1 Response Challenges

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

Now let's talk about these HTTP flood response challenges that I briefly mentioned previously. Basically, we will be covering two types of HTTP response challenges in this lecture. The first one is going to be 302 redirect challenge. And the second one is JavaScript cookie challenge. Now for the sake of clarity, I would like to mention that 302 redirect also involves a sort of cookie. The only thing is it is not embedded in JavaScript.

In other words, this redirect this whole process that I'm going to describe you in most setting cookies, the only thing is, they are embedded as HTTP cookie headers. Whereas in JavaScript cookies case, the cookie is embedded as a JavaScript object in the page that is retrieved by the client. Let me start off with the first one and demonstrate to how it looks like Basically, this is like the whole process. And we have the proxy again here. This first part of the challenge series is actually a TCP challenge. And I can say, is not mandatory from application layer perspective.

So even though I decided to depict it here, you can just omit this part and start with the layer seven challenges. And how this challenge looks like is first we verify TCP cookie, which is this step. Then after this TCP challenge, when we received the first GET or POST request, we reply with L seven, which is a layer seven cookie here. Here the server presents the OSI layer. So you can consider it as an application layer cookie. In our case, it does apply to the 302 redirect.

And after answering with that, we just terminate the connection After that, we can again apply a TCP challenge, the same challenge that we discussed earlier in network layer section. However, at this part, we actually After establishing the connection, here, we actually expect the client to send the GET or POST request with the previously set and seven cookie, the application layer cookie that was set up in the previous stage. And if we received that, we again send the 302 redirect request. And we here also suddenly terminate the connection to only difference of the stage we are declined to http authentication table. So if the same client passes both stages, in other words, both the redirects, then we just let the traffic flow through directly between client and server, and we don't interfere with the rest of the traffic anymore. As I already briefly mentioned, you don't even have to use TCP challenge parts.

You can just Start of both stages directly with the application layer challenges. In other words, the application layer redirects. Basically we are here checking whether the clients remembers the cookies that we set for it after closing the connection, because if it is an attacker, it's quite unlikely that attacker will keep the trace of the cookies that we set on application layer. And he will just continue to send the same packets without the cookies that we set. Therefore, after verifying the cookie and redirects twice, we ensure that this is a real client. And we can just let the traffic flow.

Know when we investigate the packets. This is like an example package of we get requests in this example. This is how it looks like. As you can see, we encounter 302 redirect and cookies set as an additional HTTP header when it comes to JavaScript cookies We just set the cookie under descript bracelets, as you can see here. And we just direct the page to itself. It relies on the fact that the attacker is not using an emulation of JavaScript.

And therefore, if it is a real user, it's quite likely that he will be able to answer our JavaScript cookies, because most of the bots do not use JavaScript, although recently it is changing. So this JavaScript cookie might not be the best option all the time. However, this is a much more straightforward method than the previous ones, as we just set the cookie, and we redirect page itself here. And basically that's all we don't do any other complicated redirects, as we described previously. Now these challenges are fine. However, when it comes to POST requests, as opposed to get, we need to consider a few things while applying those response challenges.

The first thing is the data sent in the post request Google lost in most cases. And when it comes to 302 redirect method, some browsers will convert the post request to a get request. So please bear that in mind while designing your for defenses. And as part of JavaScript redirect methods, some browsers may warn the users about this redirect to itself, which might cause an unnecessary panic on client side. And that's all matters that I would like to discuss. If you also know other matters, related to challenging the traffic's, you can mention in comments.

I will be waiting for your feedback on that.

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.