WEBVTT - This file was automatically generated by VIMEO

0
00:00:06.300 --> 00:00:09.600
Hello again in this module. I'm

1
00:00:09.600 --> 00:00:13.000
 going to cover more advanced testing with

2
00:00:12.300 --> 00:00:14.400
 SQL map.

3
00:00:15.600 --> 00:00:19.200
As I mentioned in the last video you

4
00:00:18.200 --> 00:00:22.000
 want not only to be an

5
00:00:21.300 --> 00:00:24.500
 expert in exploitation, but

6
00:00:24.500 --> 00:00:27.300
 also an expert in detection. So now I'm

7
00:00:27.300 --> 00:00:28.200
 going to focus.

8
00:00:29.400 --> 00:00:32.700
More on the detection or how

9
00:00:32.700 --> 00:00:36.200
 you can maximize the power of SQL injection

10
00:00:36.200 --> 00:00:37.700
 detection with SQL map.

11
00:00:38.400 --> 00:00:41.300
Okay. So what I'm going

12
00:00:41.300 --> 00:00:45.000
 to show you is how you can test post

13
00:00:44.600 --> 00:00:47.600
 parameters right because till

14
00:00:47.600 --> 00:00:51.500
 now you have been playing with me with get

15
00:00:50.500 --> 00:00:53.400
 parameters with URLs and

16
00:00:53.400 --> 00:00:56.500
 get parameters. We also need to play with

17
00:00:56.500 --> 00:00:59.100
 post parameters, right? This is

18
00:00:59.100 --> 00:01:01.800
 the first thing I'm gonna show you in this module.

19
00:01:02.400 --> 00:01:04.800
So let's start with the command.

20
00:01:05.700 --> 00:01:08.400
The command is like this and SQL map Dash

21
00:01:08.400 --> 00:01:12.100
 you and again in between the

22
00:01:11.100 --> 00:01:14.600
 quotes. We are going to have the

23
00:01:14.600 --> 00:01:15.900
 URL in this example.

24
00:01:17.100 --> 00:01:20.300
This is https column slash

25
00:01:20.300 --> 00:01:23.300
 slash example.com/login PHP. So

26
00:01:23.300 --> 00:01:25.300
 I'm going to authenticate here, right?

27
00:01:26.100 --> 00:01:29.800
But when I authenticate myself to

28
00:01:29.800 --> 00:01:32.200
 the web application, my data is

29
00:01:32.200 --> 00:01:36.400
 sent in the post parameters. So now

30
00:01:35.400 --> 00:01:39.000
 if you want to tell SQL

31
00:01:38.100 --> 00:01:41.800
 map dear SQL map, my post

32
00:01:41.800 --> 00:01:44.900
 parameters are for example, login

33
00:01:44.900 --> 00:01:47.300
 and password. Then you have to use

34
00:01:47.300 --> 00:01:50.300
 dash dash data, right? So Dash you and

35
00:01:50.300 --> 00:01:54.000
 URL and then dash dash data

36
00:01:53.700 --> 00:01:57.300
 and post parameters together

37
00:01:56.300 --> 00:01:59.000
 with the values, right?

38
00:02:00.300 --> 00:02:03.400
So here I've got - data equals sign and in between

39
00:02:03.400 --> 00:02:06.300
 the codes I've got login. So there is

40
00:02:06.300 --> 00:02:09.800
 a parameter post parameter named login with

41
00:02:09.800 --> 00:02:13.300
 a value ABC and post

42
00:02:12.300 --> 00:02:16.000
 parameter named password with a

43
00:02:15.200 --> 00:02:17.400
 value d e f

44
00:02:18.100 --> 00:02:21.400
And at the very end, we see dash dash

45
00:02:21.400 --> 00:02:24.700
 banner and this is what you already know very well in case

46
00:02:24.700 --> 00:02:28.000
 of successful SQL injection detection.

47
00:02:27.400 --> 00:02:30.500
 The banner will be retrieved.

48
00:02:31.300 --> 00:02:34.400
Now you are the master of exploitation. So I'm just going to

49
00:02:34.400 --> 00:02:37.800
 focus on how to do more things and I want to focus

50
00:02:37.800 --> 00:02:40.700
 my teaching activities on

51
00:02:40.700 --> 00:02:43.200
 detection right now. Okay, so keep in mind that you

52
00:02:43.200 --> 00:02:46.600
 can put instead of banner whatever you have learned so far, but

53
00:02:46.600 --> 00:02:49.800
 now I want to put an emphasis on

54
00:02:49.800 --> 00:02:52.300
 on detection on different scenarios like

55
00:02:52.300 --> 00:02:55.400
 post parameters. That's why I'm going to just extract the

56
00:02:55.400 --> 00:02:58.200
 banner, you know how to extract whatever you want. So what's

57
00:02:58.200 --> 00:03:01.200
 gonna happen here? The SQL map is going to

58
00:03:01.200 --> 00:03:04.600
 find out whether login parameter is vulnerable to

59
00:03:04.600 --> 00:03:08.300
 SQL injection and password parameter is

60
00:03:07.300 --> 00:03:10.300
 vulnerable to ask you all

61
00:03:10.300 --> 00:03:13.500
 injection. Right? We've got two post parameters and both of

62
00:03:13.500 --> 00:03:17.300
 them will be tested for SQL injection.

63
00:03:16.300 --> 00:03:19.200
 Okay, so far

64
00:03:19.200 --> 00:03:22.800
 so good, you know how to test post parameters as

65
00:03:22.800 --> 00:03:26.000
 well. Of course, you can change this command.

66
00:03:25.100 --> 00:03:28.200
 We've Dash cookie if you

67
00:03:28.200 --> 00:03:31.000
 want, right, you know from the one of the very first mod.

68
00:03:31.400 --> 00:03:34.900
Tools how to use the dash cookie. If you need to provide your authentication

69
00:03:34.900 --> 00:03:37.800
 key, right? So you just need to connect different dots

70
00:03:37.800 --> 00:03:40.800
 to build your own commands. This

71
00:03:40.800 --> 00:03:43.800
 is how it works and and I hope you understand everything

72
00:03:43.800 --> 00:03:45.700
 and until now.

73
00:03:46.500 --> 00:03:49.800
Great, so post parameters are covered.

74
00:03:49.800 --> 00:03:51.600
 But now the question is

75
00:03:52.700 --> 00:03:55.800
What about the maximum number of payloads?

76
00:03:55.800 --> 00:03:59.500
 This is very nice question because well it

77
00:03:58.500 --> 00:04:01.100
 turns out that on default.

78
00:04:02.100 --> 00:04:05.500
SQL map is not going to send the maximum

79
00:04:05.500 --> 00:04:08.900
 number of payloads in the in the

80
00:04:08.900 --> 00:04:11.600
 detection phase right? Remember there is

81
00:04:11.600 --> 00:04:14.300
 detection first and exploitation after that.

82
00:04:15.200 --> 00:04:18.900
And in this detection we want to

83
00:04:18.900 --> 00:04:21.800
 have the highest possible

84
00:04:21.800 --> 00:04:24.800
 likelihood of finding SQL injection.

85
00:04:24.800 --> 00:04:27.400
 That's why we want to send the

86
00:04:27.400 --> 00:04:30.200
 maximum number of payloads different variants, right?

87
00:04:31.100 --> 00:04:34.600
Use different testing techniques just to maximize

88
00:04:34.600 --> 00:04:37.400
 our chance of finding SQL injection.

89
00:04:38.400 --> 00:04:41.900
And on default and SQL map

90
00:04:41.900 --> 00:04:45.000
 is not going to send all different

91
00:04:44.000 --> 00:04:46.200
 payloads.

92
00:04:47.500 --> 00:04:50.800
how to ask sqlmap to

93
00:04:50.800 --> 00:04:53.100
 send this maximum number of payloads

94
00:04:54.100 --> 00:04:57.400
here it is. I've got a new command a little bit different

95
00:04:57.400 --> 00:04:58.200
 than the previous one.

96
00:04:59.500 --> 00:05:01.300
The only difference is that.

97
00:05:02.300 --> 00:05:06.200
Now you can also see two other switches like dash

98
00:05:05.200 --> 00:05:08.600
 dash risk equal sign free

99
00:05:08.600 --> 00:05:11.600
 and dash dash level equal sign

100
00:05:11.600 --> 00:05:12.400
 five.

101
00:05:14.300 --> 00:05:17.700
And and this is what you need to have the maximum

102
00:05:17.700 --> 00:05:21.300
 number of payloads to be send in

103
00:05:20.300 --> 00:05:23.700
 the SQL injection detection phase

104
00:05:23.700 --> 00:05:26.700
 right risk free.

105
00:05:26.700 --> 00:05:30.700
 You see Dash risk equals sign free. It means that the risky

106
00:05:29.700 --> 00:05:32.500
 payloads will also be

107
00:05:32.500 --> 00:05:34.900
 included in the detection phase.

108
00:05:35.600 --> 00:05:39.100
And level five is just like sent as

109
00:05:38.100 --> 00:05:41.800
 many combinations as you can right, but

110
00:05:41.800 --> 00:05:43.300
 you don't have to go into the details.

111
00:05:44.400 --> 00:05:47.400
I really don't recommend you to do this kind

112
00:05:47.400 --> 00:05:50.900
 of thing on production system

113
00:05:50.900 --> 00:05:53.300
 because SQL injection

114
00:05:53.300 --> 00:05:56.700
 can lead to for example changing the

115
00:05:56.700 --> 00:05:59.500
 Integrity of the data and database it

116
00:05:59.500 --> 00:06:02.100
 can lead to deletion of the data from the

117
00:06:02.100 --> 00:06:04.800
 database. So this is very risky.

118
00:06:05.600 --> 00:06:08.300
Because you generally don't want.

119
00:06:09.900 --> 00:06:12.500
To change the Integrity of the data in the database, right?

120
00:06:13.400 --> 00:06:16.800
So be really aware of this switches like

121
00:06:16.800 --> 00:06:19.100
 that's just risk and dash level. They are very

122
00:06:19.100 --> 00:06:22.600
 powerful. They allow you to do as many different

123
00:06:22.600 --> 00:06:26.500
 combinations of payloads as possible. But at

124
00:06:25.500 --> 00:06:28.800
 the same time they are risky.

125
00:06:29.800 --> 00:06:32.100
so when you do penetration testing and you've got

126
00:06:32.100 --> 00:06:35.400
 a separate isolated staging platform

127
00:06:35.400 --> 00:06:38.300
 then okay, you can use this so I

128
00:06:38.300 --> 00:06:38.600
 just want to

129
00:06:39.400 --> 00:06:42.700
You to be aware of this. But anyway, in terms

130
00:06:42.700 --> 00:06:45.600
 of unleashing the power of this

131
00:06:45.600 --> 00:06:48.500
 tool. This is what you can do

132
00:06:48.500 --> 00:06:52.100
 and I'm going to show you how you can really maximize

133
00:06:51.100 --> 00:06:54.400
 the power of this tool in terms of detection. That's

134
00:06:54.400 --> 00:06:57.700
 why I'm discussing this subject. Okay. So

135
00:06:57.700 --> 00:07:00.200
 what I have covered here is how to

136
00:07:00.200 --> 00:07:03.500
 test post parameters and how to maximize the number

137
00:07:03.500 --> 00:07:06.600
 of payloads in SQL detection

138
00:07:06.600 --> 00:07:10.300
 phase and of course, we are all the

139
00:07:10.300 --> 00:07:14.200
 time rooted in the reality of SQL map tool.

140
00:07:13.200 --> 00:07:16.600
 Okay, great. So let's jump

141
00:07:16.600 --> 00:07:21.200
 to the demo and let me show you how it

142
00:07:19.200 --> 00:07:22.500
 works in practice.
