WEBVTT - This file was automatically generated by VIMEO

0
00:00:16.400 --> 00:00:20.000
Hi, my name is David. Welcome to my course how

1
00:00:19.800 --> 00:00:22.300
 hackers find SQL injections in

2
00:00:22.300 --> 00:00:24.600
 minutes with SQL map.

3
00:00:25.700 --> 00:00:28.600
In this course, I'm gonna show you how you

4
00:00:28.600 --> 00:00:31.300
 can automatically detect and

5
00:00:31.300 --> 00:00:34.600
 exploit SQL injection vulnerabilities in

6
00:00:34.600 --> 00:00:35.500
 web applications.

7
00:00:36.800 --> 00:00:38.500
Let's start with an introduction.

8
00:00:39.900 --> 00:00:42.800
We are going to talk in this course about SQL injection.

9
00:00:42.800 --> 00:00:45.800
 This is a kind of foundation. Right we want

10
00:00:45.800 --> 00:00:48.400
 to find out if SQL injection

11
00:00:48.400 --> 00:00:51.300
 vulnerability is present in our web

12
00:00:51.300 --> 00:00:54.400
 application or not. And if it is present.

13
00:00:55.100 --> 00:00:58.500
Then we want to exploit this vulnerability. That's our

14
00:00:58.500 --> 00:01:01.800
 goal. And we want to do it automatically. That's why

15
00:01:01.800 --> 00:01:03.300
 we are going to use SQL map.

16
00:01:04.200 --> 00:01:07.000
So this is the foundation we need to have SQL injection.

17
00:01:07.600 --> 00:01:11.000
And for some of you who are not very familiar

18
00:01:10.300 --> 00:01:13.100
 with SQL injection. I will make

19
00:01:13.100 --> 00:01:15.300
 a very brief introduction.

20
00:01:16.700 --> 00:01:18.600
So SQL injection, what's that?

21
00:01:19.700 --> 00:01:22.800
When the attacker is able to change the

22
00:01:22.800 --> 00:01:25.500
 logic of the underlying SQL query

23
00:01:25.500 --> 00:01:29.600
 then actually we are talking about SQL injection

24
00:01:29.600 --> 00:01:32.100
 attack or SQL injection vulnerability.

25
00:01:33.600 --> 00:01:36.500
What are the consequences of this tag? One of

26
00:01:36.500 --> 00:01:39.300
 the consequences is retrieving the

27
00:01:39.300 --> 00:01:42.700
 data from the database? So as a consequence of

28
00:01:42.700 --> 00:01:46.200
 SQL injection the attacker can fetch

29
00:01:45.200 --> 00:01:49.100
 the data from the database, for example, the passwords

30
00:01:48.100 --> 00:01:51.400
 of all users. I'm gonna

31
00:01:51.400 --> 00:01:54.400
 show you how to do it automatically in this course, but this

32
00:01:54.400 --> 00:01:56.400
 is one of the consequences

33
00:01:57.600 --> 00:02:00.300
So we are now talking about confidentiality, right?

34
00:02:00.300 --> 00:02:03.600
 We can fetch the data from the database another one

35
00:02:03.600 --> 00:02:06.500
 as a result of SQL injection.

36
00:02:06.500 --> 00:02:08.400
 The attacker can for example

37
00:02:09.500 --> 00:02:12.200
change the Integrity of the data in the database. So

38
00:02:12.200 --> 00:02:15.600
 the attacker can add his own data to

39
00:02:15.600 --> 00:02:16.200
 the database, right?

40
00:02:17.400 --> 00:02:20.200
The attacker can even erase the entire

41
00:02:20.200 --> 00:02:23.800
 database. So you see that there's

42
00:02:23.800 --> 00:02:26.300
 a lot of different consequences. It's

43
00:02:26.300 --> 00:02:27.500
 very severe consequences.

44
00:02:28.500 --> 00:02:31.100
of SQL injection attack

45
00:02:32.800 --> 00:02:36.100
and we definitely want to find out

46
00:02:35.100 --> 00:02:38.600
 if our web applications or

47
00:02:38.600 --> 00:02:41.600
 web applications of our clients are vulnerable

48
00:02:41.600 --> 00:02:43.800
 to SQL injection attack or not.

49
00:02:44.300 --> 00:02:46.200
And we can do it in two different ways.

50
00:02:47.300 --> 00:02:50.700
We can either do it manually or we

51
00:02:50.700 --> 00:02:53.900
 can invest in automated

52
00:02:53.900 --> 00:02:54.400
 testing.

53
00:02:55.600 --> 00:02:58.700
Manual testing is really difficult for

54
00:02:58.700 --> 00:03:02.000
 many people because you need

55
00:03:01.300 --> 00:03:05.500
 to know a lot of details to go

56
00:03:04.500 --> 00:03:07.400
 to really high level

57
00:03:07.400 --> 00:03:10.200
 in terms of SQL injection detection and

58
00:03:10.200 --> 00:03:13.800
 exploitation. It's not so straightforward, right? So

59
00:03:13.800 --> 00:03:17.000
 you have to be really good really proficient

60
00:03:16.600 --> 00:03:20.400
 if you want to manually find SQL

61
00:03:19.400 --> 00:03:20.700
 injections.

62
00:03:21.400 --> 00:03:25.000
And in addition to this this is time consuming. This

63
00:03:24.100 --> 00:03:28.300
 is not very scalable. So it's

64
00:03:27.300 --> 00:03:31.000
 good to think about automated testing.

65
00:03:32.100 --> 00:03:35.200
So we've got a lot of Pros related to

66
00:03:35.200 --> 00:03:37.700
 automated testing right a lot of advantages.

67
00:03:38.500 --> 00:03:41.700
This is scalable. This is fast. You don't need

68
00:03:41.700 --> 00:03:45.000
 to know all these underlying details. Very

69
00:03:44.400 --> 00:03:46.100
 nice. Very cool.

70
00:03:47.300 --> 00:03:50.400
So indeed, we are going to focus

71
00:03:50.400 --> 00:03:53.700
 on automated SQL injection detection and

72
00:03:53.700 --> 00:03:56.700
 exploitation. I want to emphasize one

73
00:03:56.700 --> 00:04:00.000
 thing detection and exploitation because what

74
00:03:59.500 --> 00:04:02.300
 the attacker wants to do is something like

75
00:04:02.300 --> 00:04:05.400
 this first detect SQL injection

76
00:04:05.400 --> 00:04:09.600
 of vulnerability. And once this vulnerability

77
00:04:08.600 --> 00:04:11.900
 has been detected then the attacker

78
00:04:11.900 --> 00:04:12.900
 wants to do exploitation.

79
00:04:13.800 --> 00:04:17.200
That's why detection and exploitation together. And

80
00:04:16.200 --> 00:04:20.900
 of course, I'm going to cover both

81
00:04:20.900 --> 00:04:23.400
 of them in this course. So we've

82
00:04:23.400 --> 00:04:26.800
 got a few keywords here automation SQL injection detection and

83
00:04:26.800 --> 00:04:29.200
 exploitation right? Cool. What kind of

84
00:04:29.200 --> 00:04:30.900
 tool can we use to make it happen?

85
00:04:31.900 --> 00:04:34.300
SQL map as you already know from the title

86
00:04:34.300 --> 00:04:37.900
 of this course is really very popular tool used

87
00:04:37.900 --> 00:04:38.900
 by many hackers.

88
00:04:39.600 --> 00:04:42.700
By many successful hackers and you

89
00:04:42.700 --> 00:04:45.300
 can just use this tool to make it happen.

90
00:04:46.900 --> 00:04:49.900
Okay, so this is a kind

91
00:04:49.900 --> 00:04:52.400
 of introduction to this course

92
00:04:52.400 --> 00:04:55.300
 and now we are going to start the journey and the question

93
00:04:55.300 --> 00:04:58.300
 is how is the journey going to look like?

94
00:04:58.300 --> 00:05:02.000
 Well, let's jump to the table of contents and

95
00:05:01.300 --> 00:05:04.300
 see what's exactly covered in

96
00:05:04.300 --> 00:05:04.800
 this course.

97
00:05:06.100 --> 00:05:09.700
First I will focus on the basics of actual map.

98
00:05:10.400 --> 00:05:13.000
Right. I want you to be able to.

99
00:05:14.200 --> 00:05:17.800
Just basically use this tool to find some

100
00:05:17.800 --> 00:05:20.700
 let's say simple SQL injection.

101
00:05:20.700 --> 00:05:23.700
 So just the beginning we just have to start with

102
00:05:23.700 --> 00:05:24.000
 this.

103
00:05:25.300 --> 00:05:28.300
Then we are going to go to

104
00:05:28.300 --> 00:05:32.200
 something very cool. I'm gonna show you how easily

105
00:05:31.200 --> 00:05:35.700
 you can use this tool to dump database

106
00:05:34.700 --> 00:05:37.600
 table entries. It's gonna

107
00:05:37.600 --> 00:05:41.000
 be fantastic. It's gonna be blazing fast, right? So

108
00:05:40.300 --> 00:05:43.700
 I'm gonna show you how easily you

109
00:05:43.700 --> 00:05:47.400
 can fetch the data from the database with one

110
00:05:46.400 --> 00:05:49.600
 single command with this tool

111
00:05:49.600 --> 00:05:52.400
 with SQL map really nice really beautiful

112
00:05:52.400 --> 00:05:55.400
 and here you will start seeing the power of

113
00:05:55.400 --> 00:05:58.300
 the stall and everything of course will be automated right.

114
00:05:59.800 --> 00:06:04.000
Then I will jump to another very

115
00:06:03.300 --> 00:06:06.400
 interesting subject how you

116
00:06:06.400 --> 00:06:09.400
 can go from SQL injection to remote code

117
00:06:09.400 --> 00:06:12.600
 execution. This is fantastic because what the

118
00:06:12.600 --> 00:06:15.500
 attacker wants to do is to

119
00:06:15.500 --> 00:06:19.000
 have the most powerful attack,

120
00:06:18.000 --> 00:06:19.300
 right?

121
00:06:20.300 --> 00:06:23.000
SQL injection itself is it's really powerful.

122
00:06:24.100 --> 00:06:27.500
You can fetch data from database as I mentioned. You can change the Integrity

123
00:06:27.500 --> 00:06:30.400
 of the data in the database. So this is really powerful.

124
00:06:30.400 --> 00:06:34.200
 But now imagine that you can jump from

125
00:06:33.200 --> 00:06:36.900
 SQL injection to remote code

126
00:06:36.900 --> 00:06:39.300
 execution remote code execution as

127
00:06:39.300 --> 00:06:42.800
 the name suggests is about launching an

128
00:06:42.800 --> 00:06:45.600
 arbitrary code remotely. So it's basically

129
00:06:45.600 --> 00:06:48.100
 means that you can do whatever you want on the

130
00:06:48.100 --> 00:06:52.000
 vulnerable machine, right? And this is the highest possible

131
00:06:51.300 --> 00:06:54.500
 attack that you can launch. If

132
00:06:54.500 --> 00:06:57.600
 you've got remote code execution. This actually means

133
00:06:57.600 --> 00:07:00.300
 that this system is now yours. It's

134
00:07:00.300 --> 00:07:03.500
 full yours, right? So what the attackers want to

135
00:07:03.500 --> 00:07:06.500
 do is trying to go from

136
00:07:06.500 --> 00:07:09.300
 SQL injection to remote code execution to have more

137
00:07:09.300 --> 00:07:13.000
 powerful attack. This is like escalation,

138
00:07:12.300 --> 00:07:15.700
 right? We want something even more

139
00:07:15.700 --> 00:07:18.200
 powerful at the end. This is how it works. This is

140
00:07:18.200 --> 00:07:21.400
 what attackers want to do. And this is what I'm

141
00:07:21.400 --> 00:07:23.400
 going to discuss and now imagine

142
00:07:23.900 --> 00:07:26.700
That you can automatically jump from

143
00:07:26.700 --> 00:07:29.500
 SQL injection to remote code execution with

144
00:07:29.500 --> 00:07:32.300
 this tool. It's gonna be beautiful and it

145
00:07:32.300 --> 00:07:33.500
 will open your eyes really.

146
00:07:34.800 --> 00:07:37.200
Okay next when I

147
00:07:37.200 --> 00:07:40.600
 discuss the power of exploitation dumping database

148
00:07:40.600 --> 00:07:43.200
 table entries going from SQL injection to

149
00:07:43.200 --> 00:07:46.600
 remote code execution. Both of them are related to exploitation,

150
00:07:46.600 --> 00:07:49.600
 right so exploitation of SQL injection of vulnerability.

151
00:07:50.300 --> 00:07:53.500
And when this subjects are discussed, I will

152
00:07:53.500 --> 00:07:57.200
 go deeply into more

153
00:07:56.200 --> 00:07:59.500
 advanced testing with SQL

154
00:07:59.500 --> 00:08:02.200
 map what I mean here. I'm gonna show you how you can

155
00:08:02.200 --> 00:08:06.000
 maximize the power of SQL injection detection with

156
00:08:05.400 --> 00:08:08.900
 this tool and it's gonna be a really

157
00:08:08.900 --> 00:08:11.500
 nice. So you have to do some kind of tuning of

158
00:08:11.500 --> 00:08:14.500
 this tool to really Unleash the Power of the stall,

159
00:08:14.500 --> 00:08:17.900
 right? And this is what what I'm going to cover and then

160
00:08:17.900 --> 00:08:20.900
 last but not least bypassing web

161
00:08:20.900 --> 00:08:24.100
 application of firewalls. Yeah, we've

162
00:08:23.100 --> 00:08:27.100
 got web application. Firewalls Waf in

163
00:08:26.100 --> 00:08:30.100
 short in our Enterprise, right?

164
00:08:29.100 --> 00:08:32.800
 So they are just placed

165
00:08:32.800 --> 00:08:35.600
 in between you so user.

166
00:08:36.300 --> 00:08:38.300
And the web application, right?

167
00:08:39.200 --> 00:08:42.500
So what the company is trying to do that they

168
00:08:42.500 --> 00:08:45.400
 are actually buying web application firewalls. They put

169
00:08:45.400 --> 00:08:48.500
 this fire rules in front of web applications and the

170
00:08:48.500 --> 00:08:51.900
 web application firewalls are supposed to detect

171
00:08:51.900 --> 00:08:54.200
 different kinds of attacks. Right?

172
00:08:54.200 --> 00:08:57.700
 So for example web application of firewalls are supposed

173
00:08:57.700 --> 00:09:01.000
 to detect SQL injection attempts.

174
00:09:00.600 --> 00:09:04.400
 And once the potential SQL

175
00:09:03.400 --> 00:09:06.400
 injection attack is detected the traffic

176
00:09:06.400 --> 00:09:08.800
 is blocked, right? So this is and this is it.

177
00:09:09.600 --> 00:09:12.700
But if you want to actually

178
00:09:12.700 --> 00:09:15.400
 find SQL injection of vulnerability and

179
00:09:15.400 --> 00:09:18.100
 you've got web application firewall, then this is a problem for

180
00:09:18.100 --> 00:09:21.300
 you. I mean you are and you as a hacker, right you

181
00:09:21.300 --> 00:09:24.600
 as a penetration tester because this device

182
00:09:24.600 --> 00:09:27.300
 this Appliance is going

183
00:09:27.300 --> 00:09:30.400
 to block your suspicious traffic, right?

184
00:09:31.300 --> 00:09:34.300
And this is an obstacle for you. You have

185
00:09:34.300 --> 00:09:38.000
 to bypass web application firewall and then

186
00:09:37.200 --> 00:09:41.000
 you can try to detect SQL injection

187
00:09:40.800 --> 00:09:44.300
 vulnerability and exploit. Right? So this

188
00:09:43.300 --> 00:09:46.300
 is your enemy in terms

189
00:09:46.300 --> 00:09:49.400
 of testing and you need to know how to bypass web

190
00:09:49.400 --> 00:09:52.700
 application firewalls in order to successfully. Yeah

191
00:09:52.700 --> 00:09:55.700
 detect and exploit SQL injection vulnerabilities

192
00:09:55.700 --> 00:09:58.900
 in the Enterprise, right? So this is all I'm

193
00:09:58.900 --> 00:10:01.700
 going to cover so as you can see a lot

194
00:10:01.700 --> 00:10:04.200
 of knowledge is going to be covered in

195
00:10:04.200 --> 00:10:06.800
 this course, and I hope you like it.

196
00:10:08.400 --> 00:10:11.700
So let's jump to the next module and

197
00:10:11.700 --> 00:10:14.400
 let's discuss the basics of

198
00:10:14.400 --> 00:10:15.600
 SQL map.

199
00:10:16.200 --> 00:10:19.400
I hope you will enjoy this course and make the

200
00:10:19.400 --> 00:10:20.000
 most of this knowledge.
