WEBVTT - This file was automatically generated by VIMEO

0
00:00:13.280 --> 00:00:17.700
Hi, and welcome to section four net CAT Penetration Test.

1
00:00:18.360 --> 00:00:19.193
In this video,

2
00:00:19.510 --> 00:00:23.340
we're going to talk about using Net CAT for basic operations with files.

3
00:00:24.430 --> 00:00:29.170
Net CAT is a terminal console application and does not have a graphical

4
00:00:29.170 --> 00:00:33.080
interface. This has a positive and negative side.

5
00:00:33.420 --> 00:00:37.800
For regular users, this could be a problem because not so user-friendly.

6
00:00:38.140 --> 00:00:42.640
By default, net Cat doesn't use encryption, and this could be a negative point.

7
00:00:43.500 --> 00:00:46.320
In the feature videos, we'll see an option about this.

8
00:00:47.260 --> 00:00:52.240
We say that Net Cat is our most universally available on all

9
00:00:52.240 --> 00:00:56.400
modern Linux distribution. And because of the any map.org initiative,

10
00:00:57.100 --> 00:01:00.400
net CAT is also easily available to Microsoft Windows.

11
00:01:01.180 --> 00:01:04.080
Net Cat have some characters, for example,

12
00:01:04.550 --> 00:01:09.000
he's Fast Net Cat is a light software and can run in a cross

13
00:01:09.360 --> 00:01:10.193
platform scenario.

14
00:01:10.940 --> 00:01:14.720
Net CAT can also operate very rapidly and minimum,

15
00:01:14.720 --> 00:01:16.120
minimum of resources.

16
00:01:16.670 --> 00:01:21.640
Even a user in minimum privilege can successfully move a file with

17
00:01:21.860 --> 00:01:24.670
Netcat itself in a penetration testing.

18
00:01:25.090 --> 00:01:29.750
The ability to ly send data across the port of your choosing

19
00:01:29.930 --> 00:01:33.760
can be unavailable, can be very useful.

20
00:01:34.380 --> 00:01:38.610
Netcat can send and push the data in either direction.

21
00:01:38.920 --> 00:01:43.290
This does not depend of the direction the session has initiated.

22
00:01:43.320 --> 00:01:47.180
From Net Cat can use any port of choice,

23
00:01:47.760 --> 00:01:51.420
so he doesn't have limitations about this or on,

24
00:01:51.560 --> 00:01:54.740
and or only works in a standard set of ports.

25
00:01:55.160 --> 00:01:58.220
So Net Cat is able to use any port.

26
00:01:59.850 --> 00:02:02.660
Another TER is about a small footprint,

27
00:02:03.170 --> 00:02:07.980
sometimes not possible to install additional software in production servers,

28
00:02:08.160 --> 00:02:11.740
for example. And it allows simple portable application.

29
00:02:11.800 --> 00:02:15.980
So this scenario is very positive to Net cat. Net CAT is very portable,

30
00:02:18.500 --> 00:02:21.960
simple operation to operate some software or tools.

31
00:02:22.420 --> 00:02:26.880
The people that are using the software need to have some kind of training or a

32
00:02:26.880 --> 00:02:30.960
lot of additional configuration to start use this software or tool.

33
00:02:31.620 --> 00:02:34.240
But that is not true. In net cat,

34
00:02:34.260 --> 00:02:38.880
net cat is very simple to use a basic format to transfer data.

35
00:02:38.980 --> 00:02:43.640
We net get is, uh, to start a server, uh, in specif,

36
00:02:43.740 --> 00:02:46.240
in specify, uh, a port, a open port,

37
00:02:47.140 --> 00:02:51.800
and on the other side is to start a client that have the same

38
00:02:52.150 --> 00:02:56.960
similar structure to specify IP in the port and

39
00:02:56.960 --> 00:02:59.990
some options. Okay,

40
00:03:00.130 --> 00:03:04.940
so now I run in my Linux environment here to do

41
00:03:04.940 --> 00:03:07.300
some examples. So, uh,

42
00:03:07.400 --> 00:03:11.900
the basically structure that we saw to start that fire transfer using

43
00:03:12.040 --> 00:03:15.680
netcat is to create kind of environmental,

44
00:03:16.080 --> 00:03:21.080
a kind of flow to, uh, create a client and a server.

45
00:03:21.830 --> 00:03:23.560
Okay? So for example,

46
00:03:24.510 --> 00:03:29.320
we have here two terminals and I will transfer file from

47
00:03:29.340 --> 00:03:34.230
one side to another side. Okay? So first of all, I'll check where I'm

48
00:03:35.880 --> 00:03:38.500
the actual, uh, folder.

49
00:03:40.280 --> 00:03:41.740
So I use this, this one

50
00:03:44.360 --> 00:03:47.490
I'll enter in that tape folder and uh,

51
00:03:47.490 --> 00:03:49.990
and I will create a new director,

52
00:03:50.210 --> 00:03:55.110
create some file to start to transfer this file to another direction. Okay?

53
00:03:55.570 --> 00:03:58.430
So first of all, I, you enter in a tape file,

54
00:04:00.870 --> 00:04:02.880
then I will create a new folder.

55
00:04:05.280 --> 00:04:09.480
Enter in this new folder, and, uh,

56
00:04:10.530 --> 00:04:14.380
this folder is, is of course empty. There's no file over there.

57
00:04:14.680 --> 00:04:18.700
So I start and create some information.

58
00:04:19.030 --> 00:04:23.060
First of all, I will, for example, use a command to,

59
00:04:23.280 --> 00:04:28.220
to check the Linux kernel version that

60
00:04:28.240 --> 00:04:30.740
I'm running. Here is the, the, you name a common

61
00:04:32.900 --> 00:04:36.270
with the option A. So this will give me, uh,

62
00:04:36.270 --> 00:04:40.750
some information about the version of the kernel that I'm run here. Okay?

63
00:04:41.250 --> 00:04:43.350
So now I'll create a file.

64
00:04:43.590 --> 00:04:46.530
I will use this command and redirect,

65
00:04:46.590 --> 00:04:50.250
use the sign to redirect the output of this, uh,

66
00:04:50.250 --> 00:04:54.010
result of this command will not be, the terminal will be a file.

67
00:04:54.630 --> 00:04:59.360
So it'll be output text. Okay?

68
00:04:59.460 --> 00:05:01.000
So the file is, okay,

69
00:05:01.830 --> 00:05:06.600
I'll let use the cat to take a look of the content

70
00:05:06.740 --> 00:05:11.230
of this file. So this is the content that add text content.

71
00:05:13.020 --> 00:05:16.680
And now I'll put more information in this file.

72
00:05:17.720 --> 00:05:18.300
For example,

73
00:05:18.300 --> 00:05:23.290
I use the common list and use the option l

74
00:05:23.530 --> 00:05:27.020
a h to get more information.

75
00:05:27.240 --> 00:05:31.340
So this is the information about the file, about the, the time,

76
00:05:32.830 --> 00:05:34.370
the authority for the file.

77
00:05:35.030 --> 00:05:39.810
So now I'll redirect this information to my file,

78
00:05:39.950 --> 00:05:43.770
but I will not, I I don't, I don't want to override information. So,

79
00:05:43.870 --> 00:05:46.250
so I use the double, uh,

80
00:05:46.320 --> 00:05:51.050
sign to upend the, the information to output.

81
00:05:52.410 --> 00:05:55.780
Now I use the CAT option again,

82
00:05:57.420 --> 00:06:01.950
this is the information that was appended to my file. Okay?

83
00:06:02.610 --> 00:06:06.150
So now I have a file here

84
00:06:07.780 --> 00:06:12.750
in this, the content of bite, okay? In this side here,

85
00:06:12.780 --> 00:06:17.230
this, this terminal here, I use this common tool verify. Where am I?

86
00:06:17.780 --> 00:06:21.310
Okay, I'll enter in the temp folder.

87
00:06:22.140 --> 00:06:24.070
I'll create a new temp folder.

88
00:06:27.850 --> 00:06:31.230
Okay, so I have the,

89
00:06:31.290 --> 00:06:35.670
the both folders that I have. I, I want to have

90
00:06:37.540 --> 00:06:40.990
this terminal and clear this demo. So, okay,

91
00:06:41.210 --> 00:06:45.960
we have two different folders and I use

92
00:06:46.340 --> 00:06:50.680
Netcat to transfer a file. You want the one side for another side, okay? Uh,

93
00:06:50.680 --> 00:06:55.320
this is a, a local, uh, environment. So I will use a local host, but,

94
00:06:55.540 --> 00:06:55.860
uh,

95
00:06:55.860 --> 00:07:00.560
we saw that we can use another IP address to send a

96
00:07:01.150 --> 00:07:05.960
file from this machine to another machine. We, no, we, no problem.

97
00:07:06.670 --> 00:07:08.400
Okay, so we saw that, uh,

98
00:07:08.460 --> 00:07:13.200
the structure is to to to start a server and to start a client, okay?

99
00:07:13.500 --> 00:07:18.200
To begin the transferation, okay? So now in this side here,

100
00:07:18.590 --> 00:07:22.760
I'll start a server. Okay? So the command is n c,

101
00:07:23.470 --> 00:07:27.490
it's like this, okay? So I'll start a server.

102
00:07:28.160 --> 00:07:29.450
I'll use the uh,

103
00:07:29.450 --> 00:07:34.050
dash VV to get more information about the procedure that I'm run here.

104
00:07:34.880 --> 00:07:39.780
I'll use l to listen, uh,

105
00:07:39.780 --> 00:07:41.980
dash p to specify the port,

106
00:07:42.640 --> 00:07:47.200
and I use the W five. That's mean that I will put, uh,

107
00:07:47.200 --> 00:07:50.480
information, an option, option to say, Hey,

108
00:07:51.590 --> 00:07:55.670
I will use a, a timeout, okay? To say when my,

109
00:07:55.770 --> 00:08:00.590
my file is finished, the, the, the transfer file is finished the net,

110
00:08:00.590 --> 00:08:01.630
the server in this case,

111
00:08:01.630 --> 00:08:05.830
the server will wait five seconds to close the connection, to close the, the,

112
00:08:05.830 --> 00:08:09.990
the socket hit the connection. And you have direct what?

113
00:08:10.260 --> 00:08:15.110
When a file, when a by information arrive here,

114
00:08:15.730 --> 00:08:17.630
the net cat will, uh,

115
00:08:17.630 --> 00:08:21.350
head direct this information to output

116
00:08:22.500 --> 00:08:24.270
file. So at this moment,

117
00:08:24.450 --> 00:08:27.590
the quantit of pipe that net CAT is receiving here,

118
00:08:27.590 --> 00:08:32.120
we head direct and create output text file. Okay?

119
00:08:32.580 --> 00:08:35.760
In the other side, in the client side,

120
00:08:37.070 --> 00:08:40.040
I'll start netcat, okay?

121
00:08:40.590 --> 00:08:44.120
I'll use Netcat and use this uh, structure here.

122
00:08:44.520 --> 00:08:46.920
I use dash VV to get more information,

123
00:08:47.460 --> 00:08:51.320
use the option W five to say the,

124
00:08:51.420 --> 00:08:54.120
the same thing about create, about a timeout.

125
00:08:55.670 --> 00:09:00.270
I have to specify the client have to specify a host, n i p to say, Hey,

126
00:09:00.430 --> 00:09:04.510
I want to connect with this host using this port.

127
00:09:04.930 --> 00:09:09.550
So we'll be, uh, local host. This is door.

128
00:09:10.060 --> 00:09:13.430
Okay? So this is the door that, uh, in this side here,

129
00:09:14.590 --> 00:09:17.110
the server is open. Okay? So we have to,

130
00:09:17.130 --> 00:09:20.270
to match the local host and the port.

131
00:09:21.440 --> 00:09:25.220
And I'll use this sign here to say, Hey,

132
00:09:26.660 --> 00:09:28.200
my, my file here,

133
00:09:29.450 --> 00:09:34.450
my file here will be the input for this

134
00:09:34.450 --> 00:09:39.090
command here. So this command here will receive this output here,

135
00:09:40.290 --> 00:09:43.580
okay? Is the, is the different here. This,

136
00:09:43.600 --> 00:09:48.340
the file will be the input. And in this, uh, in this option here,

137
00:09:48.440 --> 00:09:52.700
in this condition here will be, uh,

138
00:09:52.760 --> 00:09:57.580
the output of this result. Okay? So I have five, five seconds,

139
00:09:58.290 --> 00:10:02.490
okay? I can increase this for example, uh,

140
00:10:03.810 --> 00:10:07.440
eight second, and I, I'll repeat the,

141
00:10:08.710 --> 00:10:13.310
this information here. This value A,

142
00:10:14.010 --> 00:10:18.310
so now I will start a server. I have to first start a server and then,

143
00:10:18.810 --> 00:10:23.550
uh, start a client. So now I will start a server here is listening,

144
00:10:23.930 --> 00:10:28.300
and then I will put start a client. Okay?

145
00:10:28.680 --> 00:10:31.970
So in the server, the server say, Hey, I'm,

146
00:10:31.970 --> 00:10:34.680
listen in this port here,

147
00:10:35.280 --> 00:10:38.080
I have a connection to a local host.

148
00:10:40.060 --> 00:10:44.360
The client here, uh, he say, Hey, hi, have a, this connection here,

149
00:10:44.360 --> 00:10:48.960
local host in this port is open. Okay? I have a timeout, okay?

150
00:10:48.980 --> 00:10:53.640
Is is eight second, and this is very interesting because in the client side,

151
00:10:54.440 --> 00:10:59.080
I have the information sent was sent 253 bytes

152
00:11:00.050 --> 00:11:04.620
when received zero because was a client who I was sending the information.

153
00:11:05.280 --> 00:11:07.140
And in the server side,

154
00:11:07.820 --> 00:11:12.360
I have 0 cent and the same quantity of

155
00:11:12.490 --> 00:11:17.040
bytes receive it by the, the client. Okay? Receive it here.

156
00:11:18.040 --> 00:11:22.250
And if I use the L list file,

157
00:11:23.600 --> 00:11:28.000
I have some, some files here, but I have the output text here.

158
00:11:28.340 --> 00:11:31.830
If I use cat output text,

159
00:11:33.280 --> 00:11:36.400
I have the same information that we have here in the client.

160
00:11:37.930 --> 00:11:39.630
So first was the first information

161
00:11:41.570 --> 00:11:46.300
here is the first information that, that I insert in the text file,

162
00:11:47.010 --> 00:11:50.380
okay? And then was the, uh,

163
00:11:50.380 --> 00:11:53.200
list result of the, in this direct,

164
00:11:53.580 --> 00:11:57.760
so the file was transferred from one side to another, okay?

165
00:11:57.760 --> 00:12:00.280
In this environment was a local host,

166
00:12:00.660 --> 00:12:03.890
but I can use any destination.

167
00:12:06.240 --> 00:12:10.940
Now I'm running Microsoft Windows and the idea here is the same, okay?

168
00:12:11.180 --> 00:12:13.620
I will create some file, I,

169
00:12:13.650 --> 00:12:18.180
I'll create the same structure about the server and the client and I will

170
00:12:18.580 --> 00:12:23.020
transfer this file to one direct, to one side, to another side, okay? Uh,

171
00:12:23.130 --> 00:12:27.300
here in my Microsoft Windows, I'm using the net cat version,

172
00:12:28.040 --> 00:12:32.700
uh, about the any map org in, uh, initiative website.

173
00:12:33.370 --> 00:12:36.620
Okay? So we saw in the early videos that, uh,

174
00:12:36.880 --> 00:12:41.100
is like a portable version about any cat, okay? Uh,

175
00:12:41.320 --> 00:12:46.100
and have some, uh, optimizations about some, some aspect, okay?

176
00:12:46.100 --> 00:12:50.580
But idea is the same. So for example, here, this side,

177
00:12:51.220 --> 00:12:53.460
I will create a file. I you, for example,

178
00:12:53.600 --> 00:12:58.420
use this command ver to get the version up to windows of windows that,

179
00:12:58.420 --> 00:12:59.253
that I'm running.

180
00:12:59.480 --> 00:13:04.030
So I use VER and head direct this formation for a file.

181
00:13:04.370 --> 00:13:07.600
So I'll create a input file,

182
00:13:08.600 --> 00:13:12.360
input text file, okay, great.

183
00:13:12.980 --> 00:13:14.200
And I'll do the same.

184
00:13:14.420 --> 00:13:18.750
So I'll get the D comment to get all the

185
00:13:18.750 --> 00:13:20.350
informations, uh,

186
00:13:20.570 --> 00:13:25.450
all the files of these are list of files and folders in folder.

187
00:13:25.590 --> 00:13:26.970
So sub folders in this case.

188
00:13:27.390 --> 00:13:31.290
So I use dear and I will direct the information.

189
00:13:31.590 --> 00:13:36.250
The information will not, uh, sent to my output, but to my, my console,

190
00:13:36.590 --> 00:13:39.930
but we'll append it to uh,

191
00:13:40.130 --> 00:13:43.450
a file to my input file. Okay?

192
00:13:43.710 --> 00:13:46.450
So if I use type here and input,

193
00:13:47.510 --> 00:13:51.640
I'm able to see the information is the same. It's like this,

194
00:13:51.780 --> 00:13:53.960
the same version of CAT in Linux.

195
00:13:54.540 --> 00:13:58.110
I'm able to get the content of the file.

196
00:13:58.530 --> 00:14:02.070
So now I have the first information here about the version of the windows,

197
00:14:02.770 --> 00:14:03.603
and then

198
00:14:04.650 --> 00:14:08.330
the information was contact was the,

199
00:14:08.910 --> 00:14:13.810
the d uh, formation. Okay? So I,

200
00:14:13.870 --> 00:14:15.170
in this folder here,

201
00:14:15.760 --> 00:14:20.410
this side of my consoling using another folder here,

202
00:14:21.270 --> 00:14:24.750
so I have some files here. Okay,

203
00:14:25.330 --> 00:14:29.520
let me clean the window here, here.

204
00:14:30.140 --> 00:14:34.080
And now I will start the same structure about server and

205
00:14:35.560 --> 00:14:39.740
client. So this the, the common is net cat,

206
00:14:40.330 --> 00:14:43.580
okay? Uh, and I will start, uh, server,

207
00:14:44.480 --> 00:14:48.770
I'll use the dash VV to get more, more information,

208
00:14:49.480 --> 00:14:50.313
okay?

209
00:14:50.450 --> 00:14:55.450
I use the LB lesson in port in this case here, net cat,

210
00:14:55.520 --> 00:14:57.090
this, this version of net cat.

211
00:14:57.510 --> 00:15:01.850
I'm not used to use the W five to start output

212
00:15:02.610 --> 00:15:05.510
to start a delay, for example, this is already

213
00:15:07.130 --> 00:15:12.130
optimize it in this version, okay? So this not need to put any, uh, uh,

214
00:15:12.320 --> 00:15:15.090
timeout information. So this is

215
00:15:17.090 --> 00:15:21.590
the server structure. I will specify a port for four for four in this case,

216
00:15:22.410 --> 00:15:25.630
and I will specify the,

217
00:15:25.890 --> 00:15:30.710
the result we'll be in a file. So I you,

218
00:15:31.690 --> 00:15:36.040
I'll create a output V3, for example.

219
00:15:36.380 --> 00:15:41.270
So I think file, okay, text and in the client side,

220
00:15:42.180 --> 00:15:44.790
I'll, uh, use the same, okay?

221
00:15:45.330 --> 00:15:47.310
So I use net CAT command.

222
00:15:48.180 --> 00:15:52.950
I'll use the dash dash VV to get more information about the,

223
00:15:53.130 --> 00:15:57.110
all the, the information that is passing. With this,

224
00:15:57.740 --> 00:16:01.590
with this connection, I have to specify a lock.

225
00:16:01.950 --> 00:16:05.190
A host in this case would be a local host, okay?

226
00:16:05.460 --> 00:16:07.800
Is project E here in my machine,

227
00:16:08.280 --> 00:16:11.820
I have to specify the port 4, 4 4.

228
00:16:12.200 --> 00:16:14.380
So it's a match for the server here.

229
00:16:15.470 --> 00:16:18.010
And I'll have to specify here, uh,

230
00:16:18.100 --> 00:16:22.370
input the file that I wanna transfer to the server.

231
00:16:22.990 --> 00:16:26.480
So it'll be the input text. Okay?

232
00:16:27.770 --> 00:16:32.160
First I have to start a server and then I will start a client to uh,

233
00:16:32.160 --> 00:16:35.680
start this connection. So on this side here, I'll start a server.

234
00:16:38.520 --> 00:16:40.650
This not the client, okay?

235
00:16:41.190 --> 00:16:44.170
So what we have here first in the server,

236
00:16:44.610 --> 00:16:49.210
I have the version of the software, okay? A reference for the, to the,

237
00:16:49.470 --> 00:16:50.930
to the any maps website.

238
00:16:53.100 --> 00:16:57.190
And was a listening in this specific port here

239
00:16:58.300 --> 00:17:00.400
we have a connection, okay?

240
00:17:00.860 --> 00:17:05.850
And then we have a close connection in the client side,

241
00:17:07.170 --> 00:17:11.430
we have initial connection here,

242
00:17:12.390 --> 00:17:16.160
okay? It was that trying to, to get some information about security, about the,

243
00:17:16.180 --> 00:17:20.780
the, the Ss SS L. But we have a connection here,

244
00:17:21.130 --> 00:17:25.060
okay? D C P is a protocol by default, use it in Netcat. Okay?

245
00:17:25.850 --> 00:17:27.740
Even in this, in this version,

246
00:17:28.500 --> 00:17:31.150
I have a connection in this sport,

247
00:17:32.660 --> 00:17:37.100
I have some information about the read request, uh,

248
00:17:37.450 --> 00:17:41.040
read, write, request, and read. Okay?

249
00:17:41.190 --> 00:17:44.240
Some callbacks only to get the feedback of the,

250
00:17:44.420 --> 00:17:46.320
the server to the client.

251
00:17:47.690 --> 00:17:52.560
We have the number of informa bytes here sent. Okay?

252
00:17:53.740 --> 00:17:58.040
Uh, and then this is some internal, uh,

253
00:17:58.360 --> 00:18:02.920
structure information about soc uh, connection in the net cat. Okay?

254
00:18:03.380 --> 00:18:03.840
Uh,

255
00:18:03.840 --> 00:18:08.680
'cause I used the VV was more information that the software was able to,

256
00:18:09.020 --> 00:18:12.590
to send and now the, the connection is closed.

257
00:18:13.430 --> 00:18:17.930
So the file was input text here and now it was the, uh,

258
00:18:18.240 --> 00:18:20.770
send it and here was the output.

259
00:18:21.190 --> 00:18:23.490
If I use the comment to get the files,

260
00:18:24.290 --> 00:18:27.810
I have this one output victory. Okay,

261
00:18:28.150 --> 00:18:32.990
so this file is here present and we can check that we have the same

262
00:18:33.750 --> 00:18:37.030
quantity of bytes in the client and in the server.

263
00:18:37.900 --> 00:18:42.750
And if I use type again to check the content of

264
00:18:42.760 --> 00:18:45.980
input will be this one.

265
00:18:46.640 --> 00:18:51.140
If I use type here to get the information about input would be the same

266
00:18:51.140 --> 00:18:55.020
information here. So we, the file was sent

267
00:18:57.770 --> 00:19:02.430
in this video we saw an introduction to using Net CAT to manipulate

268
00:19:02.440 --> 00:19:03.273
files.

269
00:19:04.200 --> 00:19:07.580
In the next video we'll take a look at net CAT variants.
