WEBVTT - This file was automatically generated by VIMEO

0
00:00:07.350 --> 00:00:12.190
Hi, and welcome back to section three Netcat Penetration Test. In this video,

1
00:00:12.640 --> 00:00:14.630
we're going to talk about banner grabbing.

2
00:00:14.780 --> 00:00:19.710
With netcat Be is simply the ability to connect the

3
00:00:19.870 --> 00:00:23.470
basic network services and collect information that they display.

4
00:00:23.690 --> 00:00:28.270
The term stems from grabbing the information displayed from services

5
00:00:28.540 --> 00:00:30.910
when that connection is first made.

6
00:00:31.340 --> 00:00:35.030
Usually the name of the service and the version install out.

7
00:00:35.670 --> 00:00:40.150
A useful feature of Net CAT is ability to connect our service in attempt to

8
00:00:40.310 --> 00:00:44.790
identify version information by triggering our response from the service

9
00:00:45.130 --> 00:00:48.630
banner. And this can be applied to many different services.

10
00:00:49.110 --> 00:00:54.070
A service is application that runs in the background waiting for someone or

11
00:00:54.070 --> 00:00:55.390
something, use it.

12
00:00:56.700 --> 00:01:00.680
And in Linux and Microsoft Windows has a lot of service price style,

13
00:01:01.220 --> 00:01:05.200
for example, S s H and ACHE two web server.

14
00:01:05.670 --> 00:01:10.480
Here we have some default ports or some protocols and sub,

15
00:01:10.580 --> 00:01:14.640
for example, for H T P, the, the Port 80 F T p, SS,

16
00:01:14.800 --> 00:01:19.000
s h for pop and Map and S M T P.

17
00:01:19.870 --> 00:01:23.420
Those are the default ports for those services.

18
00:01:25.580 --> 00:01:27.870
Here in my Linux Carlins environment,

19
00:01:28.330 --> 00:01:32.230
we take some examples of bunny wrapping using net cap.

20
00:01:33.020 --> 00:01:37.940
Let's, let me open a terminal.

21
00:01:40.170 --> 00:01:42.200
So first of all,

22
00:01:43.160 --> 00:01:46.780
the objective of graphing is to access the, uh,

23
00:01:47.140 --> 00:01:51.550
a service to get more information that we can,

24
00:01:52.370 --> 00:01:55.660
okay? For example, let's connect with the, uh,

25
00:01:55.980 --> 00:02:00.200
Microsoft Web server. So NCAT

26
00:02:02.150 --> 00:02:03.800
dash V for the information.

27
00:02:06.990 --> 00:02:09.150
Microsoft, the, the host and the port.

28
00:02:10.170 --> 00:02:14.710
So look at now we are open connection for the,

29
00:02:15.020 --> 00:02:15.853
this,

30
00:02:16.280 --> 00:02:21.090
a i p here for those host for this part here

31
00:02:22.420 --> 00:02:26.720
is a, a http, uh, web server, and the connection is open.

32
00:02:27.510 --> 00:02:30.570
Okay? So it's okay.

33
00:02:31.110 --> 00:02:33.810
We don't have a lot of information with this connection.

34
00:02:33.910 --> 00:02:38.560
So let me close this connection here and we can use some,

35
00:02:39.720 --> 00:02:43.690
some options to get more details about this disconnect.

36
00:02:44.670 --> 00:02:48.190
So when we are connecting with this, the web server,

37
00:02:49.740 --> 00:02:53.280
the web server is waiting for some request.

38
00:02:54.180 --> 00:02:56.760
So we can use some messengers.

39
00:02:57.060 --> 00:03:01.640
And all these messengers has a, a, a format. Okay?

40
00:03:01.750 --> 00:03:04.720
Here we are talking about the, the headers.

41
00:03:05.300 --> 00:03:07.640
We have some formalization for this message.

42
00:03:07.780 --> 00:03:11.880
And the header is the beginning of our request are all our response.

43
00:03:12.220 --> 00:03:14.040
So when the device and, uh,

44
00:03:14.040 --> 00:03:18.220
server are talking are exchanging messengers,

45
00:03:19.040 --> 00:03:22.810
we have to follow some, some protocols. So in this case,

46
00:03:23.310 --> 00:03:27.090
we can use beginning of a protocol. We can use, uh,

47
00:03:27.340 --> 00:03:30.770
ahead to get more information about the server, for example.

48
00:03:31.190 --> 00:03:35.920
And we can use our option here. So I will print, uh,

49
00:03:36.120 --> 00:03:41.010
I will compose ahead and use as input

50
00:03:41.160 --> 00:03:44.970
from my connection from Net cat. So format is like this.

51
00:03:45.350 --> 00:03:48.610
I'm using this information here. I'm composing, uh,

52
00:03:48.710 --> 00:03:50.530
the beginning of a header here.

53
00:03:52.170 --> 00:03:55.470
I'm saying what the, the verb, what's the,

54
00:03:55.470 --> 00:03:58.940
the beginning of my head with a head. Okay.

55
00:03:58.990 --> 00:04:03.980
Could be a post or a get, for example. So my option here is head,

56
00:04:04.680 --> 00:04:09.300
I'm, uh, specializing the version of the http, okay?

57
00:04:09.300 --> 00:04:12.700
The protocol that we are using to connect with the web server.

58
00:04:14.420 --> 00:04:19.060
I'm specifying the host, host in our case here.

59
00:04:19.570 --> 00:04:23.090
It's not local host, it's Microsoft

60
00:04:24.650 --> 00:04:27.380
on the same here.

61
00:04:33.410 --> 00:04:37.530
So this is the, the character to, to break line. Okay?

62
00:04:37.530 --> 00:04:39.690
So I'm formatting my header.

63
00:04:39.870 --> 00:04:43.130
So it's head http host.

64
00:04:44.220 --> 00:04:47.160
Am I using this option here? I use the pipe

65
00:04:48.800 --> 00:04:49.633
character here,

66
00:04:49.670 --> 00:04:53.850
the pipe that mean that all information that that we have in the left will be,

67
00:04:53.870 --> 00:04:58.370
uh, input for the common poll for the common on the right. Okay?

68
00:04:58.370 --> 00:05:00.650
So this here will be, uh,

69
00:05:00.820 --> 00:05:04.910
input from my comment here.

70
00:05:05.960 --> 00:05:08.830
Okay? So let's try, okay,

71
00:05:09.220 --> 00:05:14.150
look at now I have more information than before. Okay?

72
00:05:15.350 --> 00:05:18.130
Now I have, uh, open connection.

73
00:05:19.740 --> 00:05:24.320
This is a response from the server. Okay? The,

74
00:05:24.320 --> 00:05:25.880
the communication works like this.

75
00:05:26.160 --> 00:05:31.000
I have a request for the server and the server really respond.

76
00:05:31.590 --> 00:05:36.120
Okay? Will send me a messenger. And so this is a format for the response,

77
00:05:36.400 --> 00:05:38.240
H t p response. So the version,

78
00:05:39.220 --> 00:05:42.560
the number here to 2000 and it's okay, is a,

79
00:05:43.360 --> 00:05:47.070
a good response from the server. I have the type of the,

80
00:05:47.090 --> 00:05:51.710
the response is a is a content type a text. We have, uh,

81
00:05:51.830 --> 00:05:55.750
a tag here. We have, uh, information about the server

82
00:05:57.350 --> 00:06:00.670
DyNet stores. This is a cloud, uh, platform service.

83
00:06:02.200 --> 00:06:05.700
We have information through connection here. So keep alive.

84
00:06:05.700 --> 00:06:09.860
That's mean that H T P is a stateless protocol, but, uh,

85
00:06:10.010 --> 00:06:11.540
with some formation,

86
00:06:12.090 --> 00:06:15.620
some we can stabilize a's like a fake connection,

87
00:06:15.640 --> 00:06:19.660
but it's not a true connection. But, uh, uh, it's a kind of connection, okay?

88
00:06:21.040 --> 00:06:24.140
And the, the time. So with this option here,

89
00:06:25.130 --> 00:06:30.010
I was able to get more information about my server. So this is, uh,

90
00:06:30.010 --> 00:06:32.730
uh, what grabbing really is,

91
00:06:33.670 --> 00:06:38.530
is to get more little information from here, from that to compose all my,

92
00:06:38.950 --> 00:06:42.050
my scan, my collection of information. Okay?

93
00:06:42.150 --> 00:06:46.820
So now we can move to the other example.

94
00:06:47.200 --> 00:06:51.060
As we saw before, we have some, some services, okay?

95
00:06:51.480 --> 00:06:53.980
And the point here is to get more details about this.

96
00:06:54.600 --> 00:06:58.700
So continuing the http server in Linux,

97
00:06:59.360 --> 00:07:02.740
we have the full http server called Apache.

98
00:07:03.630 --> 00:07:06.220
So let's verify, for example,

99
00:07:06.280 --> 00:07:09.900
my Apache is if my Apache is running or not.

100
00:07:10.080 --> 00:07:13.700
So I will verify, I verify the service.

101
00:07:15.740 --> 00:07:20.550
I'll get a detail, uh, status of Apache. So my Apache is disabled right now.

102
00:07:20.570 --> 00:07:23.640
So let me start it. Okay.

103
00:07:24.930 --> 00:07:29.910
So now I have Apache service web server running.

104
00:07:31.740 --> 00:07:36.640
And let me connect me this Apache to verify if I'm able to

105
00:07:36.640 --> 00:07:39.760
get more details about the version, for example, of the service.

106
00:07:40.900 --> 00:07:44.160
So I will execute a net, get, uh, connection,

107
00:07:45.240 --> 00:07:47.220
get to verify if it's open or not.

108
00:07:54.310 --> 00:07:59.190
In this time, I was able to get to connect with the Apache.

109
00:08:00.390 --> 00:08:05.230
I can use another, uh, option that we saw in the last video about the dash Z.

110
00:08:05.740 --> 00:08:09.230
Only to verify is, is a scan, okay? To verify,

111
00:08:09.290 --> 00:08:12.830
see if he's open or not. If I remove the Z,

112
00:08:13.330 --> 00:08:18.030
I'm connect with the service. Okay? If I use the Z dash z,

113
00:08:18.210 --> 00:08:22.470
I'm, I'm not connect. I'm not connect. I'm only to get the, the status.

114
00:08:26.870 --> 00:08:27.280
So here,

115
00:08:27.280 --> 00:08:32.090
I'll use the same option that I use it to connect and to access more information

116
00:08:32.090 --> 00:08:33.450
about the Microsoft web server.

117
00:08:35.070 --> 00:08:39.130
So I use this format here, but now I will change the host.

118
00:08:40.380 --> 00:08:42.150
I'll use local host

119
00:08:43.930 --> 00:08:47.220
from my net CAT connection, common

120
00:08:48.970 --> 00:08:52.350
and in my, uh, header, okay?

121
00:08:53.380 --> 00:08:58.180
Apache is h p web server. So I use the same, uh,

122
00:08:58.240 --> 00:09:02.940
option here. I use, I will send a message, a request. My request would be

123
00:09:04.590 --> 00:09:09.290
not, I get from some resource, but to get only the head,

124
00:09:09.310 --> 00:09:13.740
that's mean the beginning of the messenger. So

125
00:09:15.800 --> 00:09:18.810
this was a bad format. This is our response from the server.

126
00:09:19.870 --> 00:09:24.300
But this is the information here. I'm able to get

127
00:09:25.940 --> 00:09:30.630
a version of this Apache web server. So this is bunny grabbing.

128
00:09:30.930 --> 00:09:35.310
I'm getting all the detail, could be big information on, uh, uh,

129
00:09:35.470 --> 00:09:36.310
a little information.

130
00:09:36.490 --> 00:09:40.790
But I was able now to get the version of this Apache running

131
00:09:41.290 --> 00:09:45.920
in this service. And for next example,

132
00:09:46.830 --> 00:09:51.420
lets me connect to the SS s H service, uh, here, my Linux,

133
00:09:51.560 --> 00:09:53.540
my current, my current Linux environment.

134
00:09:54.240 --> 00:09:59.240
So let me verify if the A S S

135
00:09:59.440 --> 00:10:03.420
S H is connected, no is disabled.

136
00:10:03.520 --> 00:10:07.600
So let me start it, this service, okay,

137
00:10:08.260 --> 00:10:11.470
now let me, okay,

138
00:10:11.610 --> 00:10:16.110
now my service A S S H service is running. Okay?

139
00:10:17.890 --> 00:10:19.070
And I'll connect

140
00:10:20.620 --> 00:10:23.940
with this service is is local host,

141
00:10:24.520 --> 00:10:29.470
and I used the port 22 dash

142
00:10:29.790 --> 00:10:34.570
Z. So now I'm able to see that it's open.

143
00:10:35.480 --> 00:10:38.300
That's mean that this service is, is run. Okay?

144
00:10:38.930 --> 00:10:43.700
Here we have two jobs to get this information or doing a

145
00:10:43.800 --> 00:10:47.340
netcat like this or checking a status. Okay?

146
00:10:49.920 --> 00:10:51.220
And now I will connect,

147
00:10:52.580 --> 00:10:57.310
I'll connect the s ss h service to try to get more

148
00:10:57.310 --> 00:11:00.890
information about this. It's local.

149
00:11:01.150 --> 00:11:05.980
My host is local host and the, the,

150
00:11:06.160 --> 00:11:09.060
the port for s s h H 22.

151
00:11:12.730 --> 00:11:17.090
Now I'm connected in this port and I here is,

152
00:11:17.210 --> 00:11:21.210
I was able to see the version of these services.

153
00:11:23.010 --> 00:11:27.300
Okay? So I'm getting information and composing all the, the,

154
00:11:27.400 --> 00:11:32.180
the information list that I have for the next step to planning all

155
00:11:32.320 --> 00:11:36.860
my penetration task, the thread model, for example,

156
00:11:37.120 --> 00:11:38.820
or the payload or how the,

157
00:11:39.120 --> 00:11:44.060
or which tool I can use to explore more information about the sales.

158
00:11:44.800 --> 00:11:49.630
In this video, we saw how we can do bundle grabbing using netcat.

159
00:11:50.170 --> 00:11:54.990
The next video, we'll take a look in sniffing packet in Netcat.

160
00:11:54.990 --> 00:11:55.750
Hope to see you there.
