WEBVTT - This file was automatically generated by VIMEO

0
00:00:08.290 --> 00:00:13.070
Hi and welcome back to section six net Cat Penetration Test.

1
00:00:14.400 --> 00:00:18.420
In this video we are going to talk about testing network latency.

2
00:00:19.370 --> 00:00:20.203
In the last video,

3
00:00:20.570 --> 00:00:25.470
we saw how to start a troubleshooting and we saw how to scan hosts

4
00:00:26.030 --> 00:00:27.190
a network with net cap.

5
00:00:28.060 --> 00:00:32.800
The result of this scanning was to check if some ports are open and

6
00:00:32.860 --> 00:00:35.040
if the expected service are well run.

7
00:00:36.260 --> 00:00:40.320
The second step in troubleshooting in this case is to check if,

8
00:00:40.540 --> 00:00:43.640
if the network is the cause of the problems.

9
00:00:44.070 --> 00:00:49.000
Sometimes the latency with the network is too large and cause problems in

10
00:00:49.000 --> 00:00:53.200
application connect. There are some tools to test the network latency,

11
00:00:53.420 --> 00:00:55.920
but net CAT can be used. In this case,

12
00:00:56.540 --> 00:01:01.240
the latency is very important because even the S is working in a high

13
00:01:01.310 --> 00:01:05.340
latency. The connection could not be possible for this task.

14
00:01:05.760 --> 00:01:10.720
We could use Net CAT again because Net Cat was designed to establish data

15
00:01:10.720 --> 00:01:15.360
channels. You can use Net CAT to help off an application that give us some time

16
00:01:15.550 --> 00:01:17.800
informality. So in this case,

17
00:01:18.780 --> 00:01:22.000
in Linux-based environment we can use software called Time.

18
00:01:22.500 --> 00:01:26.680
The software Time could give us some timing functionality,

19
00:01:27.830 --> 00:01:31.040
this software calculus, the total run in time of any common.

20
00:01:31.390 --> 00:01:35.960
Another tool that we need to use in this case is the software to produce data

21
00:01:36.620 --> 00:01:37.920
during our test.

22
00:01:38.700 --> 00:01:41.640
And for this we could use the software called Yes,

23
00:01:42.460 --> 00:01:46.360
the software produce an output as a string repeatedly

24
00:01:47.330 --> 00:01:52.130
until something kill it. So we have the common like this on screen.

25
00:01:52.150 --> 00:01:52.983
We have

26
00:01:54.200 --> 00:01:58.800
a server not getting and server that we receive a data

27
00:01:59.540 --> 00:02:04.400
and from another point we use the software time give us

28
00:02:04.670 --> 00:02:08.280
time personality and the software, yes,

29
00:02:09.060 --> 00:02:13.480
to give us data functionality and we use a pipe.

30
00:02:13.540 --> 00:02:17.760
That's mean that what we have in the left will be the input, what we,

31
00:02:17.860 --> 00:02:20.680
we have in the right and in the right common line.

32
00:02:20.980 --> 00:02:25.880
We have clients in instance from of netcat that we

33
00:02:25.880 --> 00:02:28.120
connect with the server one time.

34
00:02:28.140 --> 00:02:32.640
We have the time span on the operation and the number of bytes we can provide

35
00:02:33.310 --> 00:02:34.840
with the latency calculation,

36
00:02:35.180 --> 00:02:39.320
the speed of transmission will be equals to the size of the data sent

37
00:02:39.750 --> 00:02:41.560
divided by the transmission time.

38
00:02:42.300 --> 00:02:46.870
So now let's take a look on how we can use and calculate our

39
00:02:47.210 --> 00:02:51.890
our operation. So here I have two screen here.

40
00:02:53.030 --> 00:02:54.690
The left one is uh,

41
00:02:54.970 --> 00:02:59.560
Microsoft Windows here present my network and the second one is my

42
00:02:59.970 --> 00:03:00.803
Linux environment.

43
00:03:01.800 --> 00:03:06.780
So let's do some calculation and verify the latency of this network.

44
00:03:07.730 --> 00:03:09.230
So in the left side here,

45
00:03:10.340 --> 00:03:13.780
I run instance of Netcat in a server mode.

46
00:03:13.960 --> 00:03:18.700
So that's mean that I will use the option V to get verbose and

47
00:03:18.900 --> 00:03:22.540
to get more details about all the, the stuff that Net Cat is doing.

48
00:03:23.300 --> 00:03:26.140
L to listen and p to specify a port.

49
00:03:26.280 --> 00:03:31.200
So the host will be the IP on this machine and the port will

50
00:03:31.200 --> 00:03:34.800
be 4 4, 4 4. Okay.

51
00:03:34.860 --> 00:03:38.320
And the data that I will receive during, uh,

52
00:03:38.320 --> 00:03:42.330
connection I will send for a local file.

53
00:03:42.950 --> 00:03:46.690
So receive it by data that, okay,

54
00:03:47.230 --> 00:03:51.990
so on the left side will be my server and the right side will be

55
00:03:53.300 --> 00:03:55.020
a net cat instance client.

56
00:03:55.680 --> 00:03:58.320
And I use the same command that we saw before.

57
00:03:58.460 --> 00:04:03.450
So I use the common time is in the Linux based environment

58
00:04:04.480 --> 00:04:09.300
is a problem to calculate and give us the time of the

59
00:04:09.300 --> 00:04:11.300
some operation we are gonna use.

60
00:04:11.720 --> 00:04:16.140
The yes is a common to produce as output of this commodities.

61
00:04:16.200 --> 00:04:17.980
We will produce a string format,

62
00:04:19.120 --> 00:04:24.080
a string data and we'll repeat forever until something kill this

63
00:04:24.470 --> 00:04:27.080
operation. And in the pipe,

64
00:04:27.100 --> 00:04:31.040
that's mean that what what we have in left would be the input for the command

65
00:04:31.040 --> 00:04:35.550
that we have in right. So here is my common, uh,

66
00:04:35.550 --> 00:04:37.830
is my net cat common client instance.

67
00:04:38.920 --> 00:04:43.180
So I use the VV to get more information about this connection. Local host,

68
00:04:43.690 --> 00:04:48.390
this is the, the IP of the this machine here running windows,

69
00:04:48.930 --> 00:04:53.830
uh, of windows and the the port. Okay?

70
00:04:54.410 --> 00:04:58.830
So the result here will be time that I took for run

71
00:04:59.260 --> 00:05:01.710
this command, the quantity of bite.

72
00:05:01.980 --> 00:05:06.150
Because with this we will be able to

73
00:05:06.890 --> 00:05:10.150
verify and to check the latency of this,

74
00:05:10.860 --> 00:05:15.590
this command of this network. Okay, so let me start a server.

75
00:05:16.620 --> 00:05:21.550
Okay? The service is okay and now I will start my client.

76
00:05:22.130 --> 00:05:23.590
So for this operation here,

77
00:05:23.830 --> 00:05:28.390
I have to put control C to break this common 'cause. It's how the,

78
00:05:28.570 --> 00:05:32.950
the software, the application, the program works. So let's start.

79
00:05:33.710 --> 00:05:35.760
Okay, so now we have a connections done.

80
00:05:36.000 --> 00:05:40.640
A connection is okay and the yes common is produces data.

81
00:05:40.860 --> 00:05:43.930
And because the net cat client here,

82
00:05:44.360 --> 00:05:47.210
this data is passing to my server here.

83
00:05:47.310 --> 00:05:51.450
So let me broke this comment like this, like this,

84
00:05:52.280 --> 00:05:54.450
okay, so the connection was broken.

85
00:05:57.280 --> 00:06:02.040
I have this comment took 18 seconds and this is the quantity

86
00:06:02.180 --> 00:06:03.720
of bytes transmit. Okay?

87
00:06:04.020 --> 00:06:08.080
So now we have all the elements that make us

88
00:06:08.840 --> 00:06:11.240
possible to calculate a latency. Okay,

89
00:06:11.240 --> 00:06:15.840
so now I'm gonna use a calculator to make some calculation.

90
00:06:16.340 --> 00:06:18.960
So this is the result of bytes.

91
00:06:19.810 --> 00:06:24.390
So we have a scale, uh, this byte, kilobytes megabytes,

92
00:06:24.970 --> 00:06:29.630
and we have to choose one quantity of bytes of kilobytes or

93
00:06:29.630 --> 00:06:32.030
megabytes. So let's use here megabytes.

94
00:06:32.570 --> 00:06:37.130
So to jump to bytes two kilobytes a megabytes,

95
00:06:37.130 --> 00:06:40.650
we have to divide this input by 124.

96
00:06:41.540 --> 00:06:44.960
So if we have a hundred, a thousand,

97
00:06:44.960 --> 00:06:49.190
24 bytes, actually we have one kilobyte.

98
00:06:49.610 --> 00:06:53.230
If we have 1,024 kilobyte,

99
00:06:54.160 --> 00:06:58.880
actually we have uh, one megabyte. So this is how it works in open science.

100
00:06:58.980 --> 00:07:01.520
So let me put the, the result of byte

101
00:07:02.880 --> 00:07:07.150
4 4 6 4 6 4 0

102
00:07:07.970 --> 00:07:10.700
divided to thousand 24.

103
00:07:11.820 --> 00:07:15.520
So this is the quantity of kilobytes and divided for

104
00:07:16.840 --> 00:07:17.680
thousand 24.

105
00:07:18.220 --> 00:07:22.600
So this is four two megabytes now

106
00:07:23.270 --> 00:07:27.120
divided by the the time 18 two.

107
00:07:27.820 --> 00:07:31.680
So this is the result of megabytes by second.

108
00:07:32.340 --> 00:07:34.660
So let's take not here.

109
00:07:35.720 --> 00:07:39.900
So the first one was 1 23 megabytes

110
00:07:40.740 --> 00:07:45.280
by seconds. Let's do again the same operation to get some results.

111
00:07:45.780 --> 00:07:50.390
And when this we have some average, okay, so,

112
00:07:51.360 --> 00:07:55.140
uh, let show that the file, it's here. Okay, this is the file.

113
00:07:55.830 --> 00:08:00.110
Lemme this, this one clear again.

114
00:08:00.490 --> 00:08:02.670
And let's repeat the same operation.

115
00:08:03.370 --> 00:08:06.950
So I will run server with another file.

116
00:08:07.020 --> 00:08:11.870
Name one in. I will start again by server, my,

117
00:08:11.890 --> 00:08:15.280
my client to make a connection.

118
00:08:15.900 --> 00:08:19.440
So let's wait some seconds for example,

119
00:08:19.590 --> 00:08:23.600
4, 3, 2, 1. It's okay.

120
00:08:24.480 --> 00:08:29.220
So this command took 20 seconds and we have this concept

121
00:08:29.320 --> 00:08:33.740
of bite. And let's repeat the operation here.

122
00:08:34.680 --> 00:08:35.513
So we'll be

123
00:08:37.070 --> 00:08:41.120
5, 1, 2 and more. Four zeros,

124
00:08:41.460 --> 00:08:44.970
1, 2, 3, 4 divided by 2020

125
00:08:44.970 --> 00:08:47.880
4,004.

126
00:08:48.740 --> 00:08:53.520
So 4.8 megabytes and now divided by the time

127
00:08:53.660 --> 00:08:57.030
2073. Okay,

128
00:08:58.230 --> 00:09:03.200
so the result was a little better than the previous one,

129
00:09:04.080 --> 00:09:05.610
megabytes by seconds.

130
00:09:07.140 --> 00:09:11.790
Let's repeat the same operation again to get more data.

131
00:09:13.350 --> 00:09:16.010
The server, the client,

132
00:09:17.470 --> 00:09:21.940
let's take some longer now to get more time,

133
00:09:22.520 --> 00:09:25.660
to give more time and to produce more data.

134
00:09:26.280 --> 00:09:30.260
So 5, 4, 3, 2, 1. It's okay.

135
00:09:32.410 --> 00:09:33.243
So now

136
00:09:34.430 --> 00:09:39.000
4, 4, 6, 4 6, 4 0 divided by

137
00:09:40.080 --> 00:09:42.880
24. 24.

138
00:09:43.660 --> 00:09:47.660
So 4.2 megabytes divided by the time.

139
00:09:49.500 --> 00:09:53.990
So it's able to check that we are a little variation here

140
00:09:56.180 --> 00:09:59.680
in this network. So first one, the second result,

141
00:10:00.700 --> 00:10:04.450
the third one, let's took another example,

142
00:10:04.520 --> 00:10:07.850
another evaluation just to get more data.

143
00:10:08.550 --> 00:10:12.340
So lemme clear again, clear again,

144
00:10:13.470 --> 00:10:18.240
run the server. Running again. Client,

145
00:10:18.390 --> 00:10:20.360
this time will be more short.

146
00:10:20.620 --> 00:10:25.000
So 5, 4, 3, 2, 1. It's okay,

147
00:10:25.310 --> 00:10:26.143
it's okay.

148
00:10:27.880 --> 00:10:30.420
So now we have here

149
00:10:31.050 --> 00:10:35.500
5, 3, 1, 6, 6 0 8 divided by

150
00:10:39.660 --> 00:10:42.510
four. So now we have,

151
00:10:42.570 --> 00:10:44.670
we have more megabytes

152
00:10:46.180 --> 00:10:48.720
and we have to divide by the time eight

153
00:10:50.350 --> 00:10:54.770
divided by 8.04. Okay?

154
00:10:54.770 --> 00:10:58.770
The result is better. So we have a little

155
00:11:00.410 --> 00:11:04.180
variation here. So if we, we have more data here,

156
00:11:05.470 --> 00:11:07.690
average will be better.

157
00:11:08.230 --> 00:11:13.160
But I mean this procedure here about the transfer of

158
00:11:13.160 --> 00:11:16.560
data with netcat, a calculator in a noted,

159
00:11:17.260 --> 00:11:21.680
we are able to check and to calculate our valuation

160
00:11:22.100 --> 00:11:25.950
and get the Latins at this moment in this network.

161
00:11:26.490 --> 00:11:30.790
So this is very useful to have this information

162
00:11:31.290 --> 00:11:34.810
and proceed with our troubleshoot operation.

163
00:11:35.510 --> 00:11:40.320
This video we saw how to use Netcat to help to test network

164
00:11:40.590 --> 00:11:45.240
latency. The next video you'll take a look at application connectivity.

165
00:11:45.520 --> 00:11:46.400
I hope to see you there.
