WEBVTT - This file was automatically generated by VIMEO

0
00:00:06.300 --> 00:00:10.500
Welcome back guys in this module. I

1
00:00:09.500 --> 00:00:12.600
 will discuss bypassing web application

2
00:00:12.600 --> 00:00:15.600
 of firewalls. This is a very nice

3
00:00:15.600 --> 00:00:16.400
 example.

4
00:00:17.400 --> 00:00:21.300
Because we have web application firewalls

5
00:00:20.300 --> 00:00:23.800
 in our corporate environments, right

6
00:00:23.800 --> 00:00:26.700
 they are placed in between us

7
00:00:26.700 --> 00:00:30.800
 users also attackers

8
00:00:29.800 --> 00:00:32.600
 hackers and web applications.

9
00:00:32.600 --> 00:00:35.900
 So what the what the web application firewalls

10
00:00:35.900 --> 00:00:38.800
 are trying to do is something like

11
00:00:38.800 --> 00:00:41.900
 this trying to figure out whether someone is

12
00:00:41.900 --> 00:00:44.000
 trying to hack the web app, right?

13
00:00:45.200 --> 00:00:49.300
And if there is a kind of suspicious traffic, then

14
00:00:48.300 --> 00:00:51.500
 the web application firewalls just

15
00:00:51.500 --> 00:00:54.600
 blocks the connection between the user

16
00:00:54.600 --> 00:00:57.600
 or hacker and the web application and

17
00:00:57.600 --> 00:01:01.100
 and you've got a problem you as a penetration tester

18
00:01:00.100 --> 00:01:02.700
 you as a ethical hacker, right?

19
00:01:03.700 --> 00:01:06.900
And that's the reason why you have to learn how

20
00:01:06.900 --> 00:01:09.500
 to bypass web application of firewalls in

21
00:01:09.500 --> 00:01:13.500
 order to successfully find SQL injections and exploit

22
00:01:12.500 --> 00:01:16.100
 them. So this is a an obstacle

23
00:01:15.100 --> 00:01:18.200
 for ethical hackers and

24
00:01:18.200 --> 00:01:21.300
 Pen testers, right? It just makes

25
00:01:21.300 --> 00:01:23.300
 the game more difficult for us.

26
00:01:24.200 --> 00:01:27.800
Okay, so let me hear start

27
00:01:27.800 --> 00:01:30.900
 with this command now, you

28
00:01:30.900 --> 00:01:33.500
 know very well what this command

29
00:01:33.500 --> 00:01:34.000
 is all about.

30
00:01:34.900 --> 00:01:38.500
We've got the URL like example.com items

31
00:01:37.500 --> 00:01:41.300
 dot PHP search name XYZ.

32
00:01:40.300 --> 00:01:43.600
 So we are just the research just

33
00:01:43.600 --> 00:01:46.300
 a kind of search functionality and we

34
00:01:46.300 --> 00:01:49.400
 are going to find out where there is something

35
00:01:49.400 --> 00:01:52.500
 like xyzat right in our online store.

36
00:01:52.500 --> 00:01:55.600
 You can put whatever you want but important thing is

37
00:01:55.600 --> 00:01:58.700
 certain parameter, so nothing extraordinary here

38
00:01:58.700 --> 00:02:01.400
 and then we've got risk Free level five

39
00:02:01.400 --> 00:02:04.500
 and banner. So what I want to focus right

40
00:02:04.500 --> 00:02:07.600
 now on is that this

41
00:02:07.600 --> 00:02:11.000
 command can be used to send maximum

42
00:02:10.400 --> 00:02:14.100
 number of payloads to

43
00:02:13.100 --> 00:02:16.300
 the web application, right? So if

44
00:02:16.300 --> 00:02:16.900
 you want to

45
00:02:17.700 --> 00:02:20.400
Figure out if surge name

46
00:02:20.400 --> 00:02:23.400
 parameters is vulnerable to SQL injection

47
00:02:23.400 --> 00:02:26.400
 and you want to send a maximum

48
00:02:26.400 --> 00:02:29.400
 number of payloads, you're gonna use risk-free and level

49
00:02:29.400 --> 00:02:33.500
 5 and that's the maximum one you can do. It may

50
00:02:33.500 --> 00:02:36.300
 happen that no injection point will

51
00:02:36.300 --> 00:02:38.300
 be detected. So this is it.

52
00:02:39.200 --> 00:02:42.300
So, you know how to send the maximum number of payloads, but it may happen

53
00:02:42.300 --> 00:02:43.800
 that you will not be successful.

54
00:02:45.100 --> 00:02:49.100
And well, there are different reasons of

55
00:02:48.100 --> 00:02:51.700
 why you might not be successful. One of

56
00:02:51.700 --> 00:02:54.900
 them is like there is no SQL injection

57
00:02:54.900 --> 00:02:57.500
 possible here, right? So it

58
00:02:57.500 --> 00:03:00.300
 may happen that surgeoning parameter is not vulnerable.

59
00:03:01.300 --> 00:03:06.000
To a SQL injection. It's possible, but maybe

60
00:03:07.100 --> 00:03:11.000
our attack is blocked by web application firewall

61
00:03:10.600 --> 00:03:12.900
 in short was

62
00:03:13.700 --> 00:03:16.300
And well, if you

63
00:03:16.300 --> 00:03:19.800
 don't learn how to bypass web application firewall, then

64
00:03:19.800 --> 00:03:22.800
 you cannot learn if indeed there

65
00:03:22.800 --> 00:03:25.500
 is any kind of SQL injection

66
00:03:25.500 --> 00:03:26.800
 vulnerable You're not right?

67
00:03:27.600 --> 00:03:30.100
So this is another challenge for you.

68
00:03:30.900 --> 00:03:33.400
Trying to bypass web application firewall and

69
00:03:33.400 --> 00:03:36.600
 learn if SQL injection is possible or not.

70
00:03:38.300 --> 00:03:41.200
So now let me show you how you can and bypass web

71
00:03:41.200 --> 00:03:44.500
 application firewall just to give you a kind of overview of how

72
00:03:44.500 --> 00:03:45.200
 it works.

73
00:03:46.900 --> 00:03:48.200
There is something called.

74
00:03:49.200 --> 00:03:51.900
Thumpers scripting in SQL map

75
00:03:52.600 --> 00:03:55.600
and tamper scripts can be used to

76
00:03:55.600 --> 00:03:58.200
 you know mutate your

77
00:03:58.200 --> 00:04:01.500
 requests so that well you

78
00:04:01.500 --> 00:04:04.400
 are actually for example able to bypass web application

79
00:04:04.400 --> 00:04:05.000
 firewalls.

80
00:04:05.700 --> 00:04:09.300
So tampering script takes your request mutates

81
00:04:08.300 --> 00:04:11.700
 this request so that it may

82
00:04:11.700 --> 00:04:15.400
 be possible after this mutation to go

83
00:04:14.400 --> 00:04:17.200
 through the firewall. Just

84
00:04:17.200 --> 00:04:21.500
 just an example. There are quite many different campus

85
00:04:20.500 --> 00:04:21.900
 Scripts.

86
00:04:22.400 --> 00:04:26.000
Here you can you can go to temper directory

87
00:04:25.300 --> 00:04:28.300
 in SQL map and you can learn about them. But

88
00:04:28.300 --> 00:04:32.100
 let me just give you one example popular one random

89
00:04:31.100 --> 00:04:32.600
 case.

90
00:04:33.200 --> 00:04:36.300
This is a an exemplary tamper script

91
00:04:36.300 --> 00:04:39.700
 that can be used to bypass web application firewalls.

92
00:04:40.400 --> 00:04:44.000
And as the name suggests, let's say this tamper

93
00:04:43.100 --> 00:04:46.400
 script is used to change the

94
00:04:46.400 --> 00:04:49.600
 keywords to a mixture of small and

95
00:04:49.600 --> 00:04:52.300
 capital letters, right? So when you go a little

96
00:04:52.300 --> 00:04:56.400
 bit down into the actual SQL injection

97
00:04:55.400 --> 00:04:59.300
 commands, then you

98
00:04:59.300 --> 00:05:02.300
 will see a keywords like for example, select, right?

99
00:05:03.100 --> 00:05:06.700
Well on default we use capital letters and

100
00:05:06.700 --> 00:05:09.100
 web application firewalls have

101
00:05:09.100 --> 00:05:13.200
 some rules like they're trying to figure out

102
00:05:12.200 --> 00:05:17.200
 whether some suspicious keywords

103
00:05:16.200 --> 00:05:19.100
 are going to send by a user.

104
00:05:19.900 --> 00:05:22.200
And if it's gonna happen

105
00:05:22.200 --> 00:05:25.400
 then potentially it might might mean that someone is trying

106
00:05:25.400 --> 00:05:28.500
 to launch a school injection attack here, right? But one

107
00:05:28.500 --> 00:05:32.200
 of the ways of how you can bypass this firewalls

108
00:05:31.200 --> 00:05:33.100
 is you can try.

109
00:05:34.200 --> 00:05:37.700
To send instead of let's say the classical the

110
00:05:37.700 --> 00:05:40.300
 default names like capital letters. You

111
00:05:40.300 --> 00:05:43.700
 can try to send the mixture of small and capital

112
00:05:43.700 --> 00:05:46.400
 letters like here right and it may

113
00:05:46.400 --> 00:05:49.400
 help you ethical hacker to bypass web application

114
00:05:49.400 --> 00:05:52.400
 firewall. This is just an example to give you an idea of

115
00:05:52.400 --> 00:05:55.700
 how how it works. And now let's

116
00:05:55.700 --> 00:05:58.300
 go to the command and here is the command

117
00:05:58.300 --> 00:06:01.500
 actually right? So in our case we've got for example search

118
00:06:01.500 --> 00:06:01.900
 name.

119
00:06:02.700 --> 00:06:05.200
We are going to find out whether a search name parameter.

120
00:06:05.800 --> 00:06:09.000
Is vulnerable to SQL injection? We've got

121
00:06:08.400 --> 00:06:11.500
 risk Free level 5 and

122
00:06:11.500 --> 00:06:14.900
 in addition to this we've got temper random

123
00:06:14.900 --> 00:06:18.200
 case because well if

124
00:06:17.200 --> 00:06:18.500
 we are

125
00:06:19.600 --> 00:06:22.800
not successful with risk free and level 5

126
00:06:22.800 --> 00:06:25.500
 then the actually only thing that we can do more is

127
00:06:25.500 --> 00:06:28.300
 try to do some kind of tamper scripting right

128
00:06:28.300 --> 00:06:31.800
 and at the very end we've got Banner, right?

129
00:06:32.700 --> 00:06:35.800
So what I suggest here is something like

130
00:06:35.800 --> 00:06:36.100
 this.

131
00:06:36.800 --> 00:06:39.200
Risk-free level 5, of course, assuming that you've

132
00:06:39.200 --> 00:06:42.900
 got staging platform. If you are not successful try

133
00:06:42.900 --> 00:06:46.000
 with tamper script so -temper

134
00:06:45.100 --> 00:06:48.500
 and for example random case and then if

135
00:06:48.500 --> 00:06:51.500
 you are not successful, then it probably means that

136
00:06:51.500 --> 00:06:54.000
 SQL injection is not possible here.

137
00:06:54.800 --> 00:06:57.600
Okay. So now you have a kind of

138
00:06:57.600 --> 00:07:00.800
 understanding of how you can bypass web application firewalls

139
00:07:00.800 --> 00:07:03.700
 with the so called tamper scripts. So

140
00:07:03.700 --> 00:07:06.600
 let's jump to the demo and let me show you how it works in

141
00:07:06.600 --> 00:07:07.200
 practice.
