WEBVTT - This file was automatically generated by VIMEO

0
00:00:09.960 --> 00:00:14.910
Hi, and welcome back to Section five Blackhead Tricks with Net Cat.

1
00:00:15.680 --> 00:00:19.180
In this video we're going to talk about rogue tunnel attacks.

2
00:00:19.880 --> 00:00:21.340
In penetration tests,

3
00:00:21.840 --> 00:00:26.780
we have some obstacles that dute the penetration and

4
00:00:26.860 --> 00:00:31.660
a way to bypass them is to explore some misconfiguration in the firewall

5
00:00:32.440 --> 00:00:36.860
or compromise another system inside the network that has

6
00:00:37.250 --> 00:00:38.180
high permissions,

7
00:00:38.440 --> 00:00:43.220
and then avoid the firewall and continue in the attack in one

8
00:00:43.220 --> 00:00:48.220
attack scenario. When the network administrator knows that there is uh,

9
00:00:48.220 --> 00:00:51.180
some external IP attacking the network,

10
00:00:51.980 --> 00:00:56.380
a rule can be created to deny all traffic originated from this ip.

11
00:00:56.600 --> 00:00:57.433
The Unix world,

12
00:00:58.020 --> 00:01:02.820
a very popular software used as firewall to have a control of

13
00:01:02.840 --> 00:01:06.340
the out traffic is called IP tables.

14
00:01:06.840 --> 00:01:11.660
IP tables is the base firewall used in the UNIX systems programming

15
00:01:11.660 --> 00:01:14.100
in C language, which allows blocking,

16
00:01:14.700 --> 00:01:19.580
redirecting and other operations when you receive package and our

17
00:01:19.580 --> 00:01:21.420
operation is through the command line.

18
00:01:21.720 --> 00:01:26.220
If we have a firewall block in any connection to a target host with a specific

19
00:01:26.600 --> 00:01:29.060
IP coming from an attack host,

20
00:01:29.460 --> 00:01:34.220
a good option is to exploit another host in this network and use it to

21
00:01:34.370 --> 00:01:37.180
four four wall all traffic,

22
00:01:38.100 --> 00:01:41.340
avoiding the firewall rules to attack the target host,

23
00:01:41.760 --> 00:01:46.300
and then creating a tunnel with net CAT between the target

24
00:01:46.490 --> 00:01:50.580
host and the exploit host as the connection

25
00:01:51.050 --> 00:01:54.820
between net CAT in the seven mode and client mode.

26
00:01:54.960 --> 00:01:56.820
As we saw before in this course,

27
00:01:57.600 --> 00:02:02.380
the common IP table is possible to use some options to get more details.

28
00:02:03.380 --> 00:02:04.213
For example,

29
00:02:04.780 --> 00:02:08.600
the option b l to get a list of rules,

30
00:02:09.380 --> 00:02:13.840
the option Z to get more detailed information in variable mode

31
00:02:14.860 --> 00:02:19.720
and the option N to display IP address in

32
00:02:19.990 --> 00:02:21.640
port in numeric format.

33
00:02:22.390 --> 00:02:26.760
Another possibility is to use attack called arpc

34
00:02:26.990 --> 00:02:29.680
poisoning or ARP spoofing.

35
00:02:30.140 --> 00:02:34.920
ARP means address resolution protocol and is used to

36
00:02:34.920 --> 00:02:39.280
determine which make address correspond to a particular ip,

37
00:02:39.280 --> 00:02:40.600
address a device,

38
00:02:40.950 --> 00:02:45.880
send an a broadcast packet to the network to

39
00:02:45.880 --> 00:02:50.480
every device on its broadcast domain in hopes that correct

40
00:02:50.860 --> 00:02:55.080
device will respond. We have two packets in the A procedure,

41
00:02:55.980 --> 00:02:58.160
ARP request, and ARP response.

42
00:02:58.590 --> 00:03:03.560
This attack works by saying the art messenger to a switch

43
00:03:03.780 --> 00:03:06.320
or a router with fake me address.

44
00:03:07.030 --> 00:03:11.760
This is useful to intercept the traffic of another host using

45
00:03:11.760 --> 00:03:12.593
this attack.

46
00:03:12.710 --> 00:03:17.440
This spoofing will change all communication designated to the target host

47
00:03:18.150 --> 00:03:22.800
that has a block into the avoiding any connection from the attack,

48
00:03:22.940 --> 00:03:23.773
for example,

49
00:03:23.820 --> 00:03:28.800
and will be passed to the exploited host that we have control.

50
00:03:28.980 --> 00:03:31.920
We have the common arc with some options, for example,

51
00:03:32.200 --> 00:03:37.080
v to our post mode and to get numerical addresses and

52
00:03:37.520 --> 00:03:41.200
a to shows entirely of the specific host.

53
00:03:41.950 --> 00:03:46.800
Here we have Kylie Linux environment and you see some operations using

54
00:03:47.140 --> 00:03:49.360
the IP tables and the ARB command.

55
00:03:49.700 --> 00:03:52.160
So here I have the option IP tables

56
00:03:54.870 --> 00:03:59.050
and for a simple call for the software is common,

57
00:03:59.720 --> 00:04:04.250
it's possible to see the version of the IP tables. We no common specify.

58
00:04:05.310 --> 00:04:08.090
If we input some options, for example,

59
00:04:09.570 --> 00:04:13.630
IP table and the option V N L for example,

60
00:04:14.570 --> 00:04:19.000
and we, we have to get the root access.

61
00:04:19.260 --> 00:04:22.200
So we use pseudo for this,

62
00:04:22.420 --> 00:04:27.400
and now it's possible to see more informations about the rules that are present

63
00:04:27.820 --> 00:04:29.240
in this firewall.

64
00:04:29.500 --> 00:04:33.610
If I clean this screen and use

65
00:04:34.440 --> 00:04:37.490
more detailed information for line number for example,

66
00:04:39.210 --> 00:04:41.060
it's possible to get more information

67
00:04:42.710 --> 00:04:46.570
in a number of lines here. For example, 1, 2, 3.

68
00:04:47.430 --> 00:04:52.400
This is more organizing mode to get information. What we are seeing in,

69
00:04:52.460 --> 00:04:54.440
in on screen, we have some,

70
00:04:54.870 --> 00:04:59.840
some rules for what we have for input for forward, for example,

71
00:05:00.540 --> 00:05:03.920
or output. And we have some specific rules.

72
00:05:05.150 --> 00:05:07.210
For example, here for the input,

73
00:05:07.550 --> 00:05:11.730
we don't have any rule for any specific ip, for example.

74
00:05:11.950 --> 00:05:16.810
So all the hosts are able to send information and

75
00:05:16.910 --> 00:05:19.170
we don't have any blocks, for example,

76
00:05:19.670 --> 00:05:23.190
but we have some information to docker.

77
00:05:23.770 --> 00:05:28.510
Docker is a technology that's possible to like to

78
00:05:29.020 --> 00:05:33.870
visualize a small quantity of software to run

79
00:05:34.130 --> 00:05:38.670
and to deploy some software system. For example,

80
00:05:39.330 --> 00:05:42.150
if we are developing a tool, for example,

81
00:05:42.890 --> 00:05:47.870
we have to deploy this tool on the internet and we have

82
00:05:47.890 --> 00:05:52.790
to signalize every requirement to store and

83
00:05:52.790 --> 00:05:56.510
then run our software. For example, using Docker,

84
00:05:57.520 --> 00:06:02.300
we can create image of this tool with all the requirements,

85
00:06:02.320 --> 00:06:03.153
for example,

86
00:06:03.760 --> 00:06:08.540
and any user can download this image and

87
00:06:08.680 --> 00:06:12.540
run this image in a docker. We have docker client, for example,

88
00:06:12.930 --> 00:06:13.820
like a player,

89
00:06:14.200 --> 00:06:19.140
and this docker will instantiate iage from

90
00:06:19.180 --> 00:06:23.140
I image to a con like a container running our software.

91
00:06:23.320 --> 00:06:27.900
So this is a very interesting way to distribute our

92
00:06:28.260 --> 00:06:29.620
software, our system, for example,

93
00:06:30.440 --> 00:06:34.780
and any container that's I instantiation of ih for example,

94
00:06:34.960 --> 00:06:38.300
any container can communicate with other containers.

95
00:06:39.200 --> 00:06:41.860
So this is a, I call a Docker network.

96
00:06:42.910 --> 00:06:47.370
So here I have a docker stolen in my

97
00:06:47.600 --> 00:06:52.150
machine here. This is not the scope of our course here,

98
00:06:52.690 --> 00:06:53.630
but for example,

99
00:06:54.690 --> 00:06:59.590
if I use like this one here, I, I can show my, the,

100
00:06:59.590 --> 00:07:04.070
the version running, uh, install in my machine here.

101
00:07:04.850 --> 00:07:07.590
So at the moment of the installation of Docker,

102
00:07:07.810 --> 00:07:12.550
we have some rules by the full and to slight synchronization

103
00:07:12.930 --> 00:07:15.470
of diesel installation for the docker.

104
00:07:15.490 --> 00:07:19.290
So we have some specific rules for Docker here, okay,

105
00:07:19.750 --> 00:07:21.610
but for any external ip,

106
00:07:21.610 --> 00:07:25.760
we didn't have no IP rule here,

107
00:07:28.910 --> 00:07:32.490
but as we saw before, if a host is blocking,

108
00:07:32.950 --> 00:07:34.570
if we have a firewall, for example,

109
00:07:34.710 --> 00:07:37.970
if we have IP rule for a specific external ip,

110
00:07:38.310 --> 00:07:41.450
we can exploit another host in this network.

111
00:07:42.030 --> 00:07:45.170
And then for this new machine exploited,

112
00:07:45.470 --> 00:07:49.610
we can curate a tunnel is a, a net cat common as we saw before,

113
00:07:50.230 --> 00:07:54.210
the server and the client and exploit a target host.

114
00:07:55.140 --> 00:07:58.080
So this is possible to create this, this tunnel or,

115
00:07:58.100 --> 00:08:00.920
or disconnector as we saw before in the course.

116
00:08:01.150 --> 00:08:05.480
It's only a connection between two hosts using netcat. Okay?

117
00:08:05.740 --> 00:08:10.520
Our other option that we saw was using a art as we

118
00:08:10.720 --> 00:08:13.920
saw a means address resolution protocol.

119
00:08:14.620 --> 00:08:18.360
So is used to get more information about uh,

120
00:08:18.500 --> 00:08:23.280
one device and on the end and other devices. So for example, we have uh, FU

121
00:08:25.190 --> 00:08:29.930
common arb here, and this is my, this is the,

122
00:08:30.310 --> 00:08:34.930
we have a host that is running my here

123
00:08:36.250 --> 00:08:41.090
and for the arp we have some informations about the ip,

124
00:08:41.110 --> 00:08:45.490
the MAC address, and the IP from the, from some of the devices. For example,

125
00:08:46.150 --> 00:08:50.890
let me use the option in to get the

126
00:08:51.030 --> 00:08:54.010
ip. So I have this host here in my network.

127
00:08:55.120 --> 00:08:57.930
This is the My gateway. My gateway here.

128
00:08:59.430 --> 00:09:03.110
I know that from this IP here I have this MEC address.

129
00:09:04.550 --> 00:09:08.280
Okay? So we have like a arc table here

130
00:09:10.210 --> 00:09:14.270
to identify, hey, this device here has this ip,

131
00:09:14.940 --> 00:09:19.020
this address the interface here

132
00:09:20.550 --> 00:09:21.970
and we have some information.

133
00:09:22.630 --> 00:09:26.410
So the attack here that we saw arc is spoofing,

134
00:09:27.030 --> 00:09:28.850
is to say, Hey router,

135
00:09:29.350 --> 00:09:32.890
you have this IP here and this me address,

136
00:09:33.510 --> 00:09:38.250
but I will masquerade the me of my device, my host,

137
00:09:39.430 --> 00:09:44.410
and I'll use ARP spoofing and I will pass another

138
00:09:44.790 --> 00:09:47.330
IP for this same MEC address.

139
00:09:48.240 --> 00:09:53.050
So it's like we have two make address the same me

140
00:09:53.050 --> 00:09:55.890
address but the different ips.

141
00:09:56.190 --> 00:09:59.250
So I'm spoofing this me address.

142
00:10:00.440 --> 00:10:04.740
So my information arrive from a device, the packet,

143
00:10:05.240 --> 00:10:09.440
the other information will be sent from both devices.

144
00:10:09.900 --> 00:10:14.800
So these are way to get information because I'm spoofing a MEC

145
00:10:14.910 --> 00:10:19.840
from another device. For example, here we saw that in our ARP table,

146
00:10:20.460 --> 00:10:25.360
we have only one information from the full gateway in the final

147
00:10:25.380 --> 00:10:28.960
off IP one 15.1, okay?

148
00:10:30.760 --> 00:10:33.540
In this IP here, in this address here,

149
00:10:34.840 --> 00:10:37.700
but in the same machine, in the same network.

150
00:10:37.850 --> 00:10:42.460
Here I have another host is a Microsoft Windows machine

151
00:10:43.400 --> 00:10:48.400
and the IP of this address of this host

152
00:10:49.340 --> 00:10:50.640
and means 15.

153
00:10:51.340 --> 00:10:56.190
So I'll use a common pinging like this to ping

154
00:10:56.190 --> 00:10:58.020
this machine. Okay?

155
00:10:58.520 --> 00:11:02.540
So pinging and the IP of this host

156
00:11:03.710 --> 00:11:07.530
and they're pinging this host here. Okay?

157
00:11:07.710 --> 00:11:11.890
And now if I use the same common ARB dash n,

158
00:11:12.930 --> 00:11:17.150
now I have a new host in my arc table.

159
00:11:18.430 --> 00:11:23.400
This is my new IP from this new device and I have

160
00:11:23.470 --> 00:11:26.880
this new MEC address from this host.

161
00:11:27.540 --> 00:11:32.170
So my, A table was in this version here,

162
00:11:32.360 --> 00:11:35.490
only one, only containing one host.

163
00:11:36.070 --> 00:11:38.230
Now I have this,

164
00:11:38.710 --> 00:11:43.080
a new host here and they are poofing work

165
00:11:43.430 --> 00:11:47.480
like this. Like we have, for example, I have a new, uh,

166
00:11:47.630 --> 00:11:50.240
they say machine that's in Mac address.

167
00:11:50.880 --> 00:11:55.860
I have this host host and when I use this attack,

168
00:11:56.420 --> 00:12:01.370
I will have another IP here, but using the same Mac address.

169
00:12:01.830 --> 00:12:06.610
So that's mean that all the information that we send for this Mac address will

170
00:12:06.610 --> 00:12:09.650
be received in this host and the new host here.

171
00:12:10.350 --> 00:12:14.690
So this is another option to create

172
00:12:15.160 --> 00:12:19.450
like a rogue tone tunnel to spoofing and to get information

173
00:12:20.680 --> 00:12:22.930
when we have this situation,

174
00:12:23.290 --> 00:12:28.050
a firewall blocking external ip, but we have

175
00:12:29.650 --> 00:12:34.420
possibility to exploit other hosts in this network

176
00:12:35.120 --> 00:12:40.070
and we can use this booth attack or we can use ARP

177
00:12:40.470 --> 00:12:44.970
spoofing or ARP cache poisoning or creating,

178
00:12:45.590 --> 00:12:50.230
trying to creating a tunnel between the target host,

179
00:12:50.700 --> 00:12:54.150
host, and this exploited host. In this video,

180
00:12:54.210 --> 00:12:59.030
we saw how it's possible to avoid obstacle in the network to have

181
00:12:59.050 --> 00:13:01.870
access to the target host. In the next video,

182
00:13:02.080 --> 00:13:05.310
we'll take a look at back doors and shell, I hope to see you there.
