WEBVTT - This file was automatically generated by VIMEO

0
00:00:08.380 --> 00:00:13.000
Hi, and welcome back to Section 12 tunneling through a network.

1
00:00:13.340 --> 00:00:17.200
In this video, you'll learn how to perform H T D P tunneling.

2
00:00:18.350 --> 00:00:23.280
I hope you're excited. So, Letson, in this scenario,

3
00:00:23.730 --> 00:00:25.920
we'll be using this topology design.

4
00:00:26.620 --> 00:00:31.320
We don't need to make any further modifications to our current lab

5
00:00:31.320 --> 00:00:35.720
topology. However, we are creating a scenario in this scenario,

6
00:00:36.540 --> 00:00:39.680
our taco machine, which is our main Carly machine,

7
00:00:39.780 --> 00:00:44.440
it is on the internet and we have successfully compromised a

8
00:00:44.600 --> 00:00:46.440
Lenox machine within a company,

9
00:00:47.050 --> 00:00:51.040
which is this one which says compromised Lenox machine.

10
00:00:51.810 --> 00:00:55.870
The thing is, the Compromise Lenox machine has access to the internet.

11
00:00:56.400 --> 00:01:01.350
Hence we are able to have a shell between the Compromise Lenox machine

12
00:01:01.650 --> 00:01:05.550
and our attack machine. But if we were to, let's say,

13
00:01:05.550 --> 00:01:10.390
perform additional scans and exploitation to other systems on the internal,

14
00:01:10.810 --> 00:01:11.710
on the internal network,

15
00:01:12.480 --> 00:01:17.310
these internal systems may not have direct internet access. For instance,

16
00:01:17.760 --> 00:01:21.430
metal exploitable tree do not have internet access.

17
00:01:21.980 --> 00:01:26.710
Perhaps it has been blocked by a firewall or some other device.

18
00:01:27.690 --> 00:01:32.430
But the compromised OX machine has direct connectivity to the Meta Exploitable

19
00:01:32.500 --> 00:01:33.390
tree machine.

20
00:01:33.850 --> 00:01:38.630
The objective is to set up an each T D P tunnel between

21
00:01:39.130 --> 00:01:43.910
our attack machine to the Compromise System and from the Compromise System to

22
00:01:43.910 --> 00:01:46.860
the Meta Exploitable tree machine. Therefore,

23
00:01:47.240 --> 00:01:51.860
if we have to transfer any tools between one system to another system,

24
00:01:52.750 --> 00:01:57.700
it'll reduce the need to transfer tools from Theta Machine to the compromised

25
00:01:57.700 --> 00:02:00.260
system then to the meta exploitable system,

26
00:02:00.800 --> 00:02:05.340
we want to establish direct connectivity from Theta machine

27
00:02:05.900 --> 00:02:10.020
straight to Meta Tree Windows virtual machine. To get started,

28
00:02:10.470 --> 00:02:14.620
we'll definitely need to create an additional Carli Lenox virtual machine.

29
00:02:15.620 --> 00:02:19.760
So I'm simply going to delete my clone machine that I had created earlier today.

30
00:02:20.550 --> 00:02:25.450
And let's start by creating a clone version or Carli Lenox virtual machine.

31
00:02:26.150 --> 00:02:28.410
Simply right click on it, click on clone,

32
00:02:29.070 --> 00:02:32.340
click on full clone current machine state,

33
00:02:32.960 --> 00:02:37.710
and let's change the market address policy to generate new market addresses

34
00:02:37.850 --> 00:02:39.190
for all network adapters.

35
00:02:39.450 --> 00:02:44.150
And click on this clone machine will function as a compromise

36
00:02:44.220 --> 00:02:45.870
machine on the internal network.

37
00:02:46.790 --> 00:02:51.690
So we can simply adjust the name to let's say Compromise

38
00:02:52.970 --> 00:02:56.970
Lenox vm. And let's click on clone.

39
00:02:57.650 --> 00:03:01.240
This will take a few minutes, so perhaps a few seconds to complete.

40
00:03:01.750 --> 00:03:05.240
Once this is complete, we can simply power on this virtual machine.

41
00:03:05.900 --> 00:03:10.790
Keep in mind this clone machine will be our compromise system on

42
00:03:10.790 --> 00:03:11.623
the internal network,

43
00:03:12.080 --> 00:03:16.310
which has access to meta exploitable tree windows virtual machine.

44
00:03:21.090 --> 00:03:23.820
Great. So we have the clone machine.

45
00:03:25.180 --> 00:03:29.280
You can simply power on the meta exploitable tree windows, which machine,

46
00:03:29.540 --> 00:03:31.080
and let's capture the IP address.

47
00:03:31.860 --> 00:03:36.560
You can simply hover on a network icon and you can see the internal IP address

48
00:03:36.740 --> 00:03:39.720
as 1 7 2 31 20.

49
00:03:41.730 --> 00:03:45.000
Let's power on our Compromise Lenox virtual machine.

50
00:03:45.450 --> 00:03:49.080
Let's say the start button and once the virtual machine is powered on,

51
00:03:49.380 --> 00:03:54.120
let us update the packages Source repository ands installed

52
00:03:54.560 --> 00:03:58.800
H TT P tunnel package three.

53
00:03:58.970 --> 00:04:00.000
Let's log in.

54
00:04:02.380 --> 00:04:06.080
And since this compromised launch machine has internet access,

55
00:04:06.570 --> 00:04:11.360
let's open a terminal to update the packages repository and then

56
00:04:11.770 --> 00:04:14.480
we'll install the H T D P tunnel two.

57
00:04:15.540 --> 00:04:19.230
So let's do pseudo app update and enter.

58
00:04:19.920 --> 00:04:24.370
Enter your password like so. Alicia, take a few seconds to complete.

59
00:04:27.900 --> 00:04:31.930
Great. Next, let's install the H T D P tunnel tool.

60
00:04:32.520 --> 00:04:36.970
This tool is needed on border compromise system and our attacker system.

61
00:04:43.210 --> 00:04:45.520
Great. We'll need to bill a tunnel,

62
00:04:46.080 --> 00:04:51.000
specifically a local S port forwarding between our

63
00:04:51.000 --> 00:04:55.200
compromised OX machine and our target Windows system.

64
00:04:55.730 --> 00:04:59.680
Since our target Windows system is running the remote desktop protocol,

65
00:05:00.300 --> 00:05:02.800
the protocol doesn't really matter to put simply.

66
00:05:03.380 --> 00:05:06.880
So while we are on the Compromise Lenox system,

67
00:05:07.380 --> 00:05:09.880
let us enable S SSH to do this,

68
00:05:09.900 --> 00:05:13.730
we can simply type pseudo service

69
00:05:15.190 --> 00:05:16.950
s SSH and let's type start.

70
00:05:17.560 --> 00:05:20.510
Great to verify this service is running,

71
00:05:20.720 --> 00:05:24.750
let's type SS space dash A NT P

72
00:05:25.570 --> 00:05:30.480
grab will specify port 22 to verify our system

73
00:05:30.480 --> 00:05:34.400
is listing on port 22. Excellent. Next,

74
00:05:35.330 --> 00:05:39.360
we'll need to actually establish a local port base holding.

75
00:05:40.420 --> 00:05:43.210
To do this on the compromise system,

76
00:05:43.550 --> 00:05:47.090
we are going to type SSH dash capital L

77
00:05:48.130 --> 00:05:50.220
0 0 0 0.

78
00:05:52.330 --> 00:05:54.760
Let's use 8 8 88.

79
00:05:57.160 --> 00:06:00.770
Next we will specify the IP address of for Target,

80
00:06:00.820 --> 00:06:04.530
which is a Windows virtual machine, the ip, it's

81
00:06:04.590 --> 00:06:09.590
1 7 2 31 8

82
00:06:10.550 --> 00:06:13.090
and we'll specify the port for rdp,

83
00:06:13.500 --> 00:06:15.570
which is 3 3 89.

84
00:06:17.380 --> 00:06:21.870
Next we need to specify our local credentials for our

85
00:06:22.040 --> 00:06:23.390
Carly Links virtual machine.

86
00:06:24.240 --> 00:06:29.150
We'll specify Carly at and we'll specify the LU Park IP

87
00:06:29.150 --> 00:06:29.983
address,

88
00:06:30.370 --> 00:06:35.350
which is 1 2 7 0 0 1 let's

89
00:06:35.350 --> 00:06:39.860
it enter. And now we are trying to log into our own system.

90
00:06:40.280 --> 00:06:44.820
In other words, the Compromise Carly Logs machine trying to log into itself.

91
00:06:44.990 --> 00:06:49.720
Let's type yes and let's enter the password create

92
00:06:50.220 --> 00:06:53.400
so we have S SSH into our own system.

93
00:06:55.560 --> 00:07:00.330
Next we need to actually tell our local system

94
00:07:00.670 --> 00:07:03.690
to listen on port 1, 2, 3, 4,

95
00:07:03.990 --> 00:07:08.450
and de encapsulate any in common H T D P traffic and

96
00:07:08.690 --> 00:07:13.210
redirect it to port 8, 8, 8 8. To do this,

97
00:07:13.420 --> 00:07:18.010
let's type HTS like sue dash dash forward

98
00:07:18.920 --> 00:07:21.750
dashboard local hosts

99
00:07:23.930 --> 00:07:27.750
88 88 and specify port

100
00:07:27.970 --> 00:07:30.610
1, 2, 3, 4. Great.

101
00:07:31.410 --> 00:07:35.550
So put simply any in common traffic on this host on port

102
00:07:35.730 --> 00:07:36.790
1, 2, 3, 4.

103
00:07:37.370 --> 00:07:41.150
It will be redirected or forwarded to port 88.

104
00:07:42.580 --> 00:07:46.420
Let's it enter. Do we want to install htp?

105
00:07:46.990 --> 00:07:50.490
Let's type yes. Actually they don't install,

106
00:07:50.590 --> 00:07:53.210
so let's just type Y and it enter.

107
00:07:54.320 --> 00:07:59.140
Enter the Carlys password once more and this will simply download

108
00:07:59.410 --> 00:08:04.100
uninstall HTP two. Once it's finished,

109
00:08:04.960 --> 00:08:09.560
we will press up a few times to execute our command.

110
00:08:09.560 --> 00:08:11.340
Once more like so

111
00:08:13.910 --> 00:08:17.550
I actually made a mistake, it's actually HTS

112
00:08:19.610 --> 00:08:23.640
great. Ensure syntax is accurate,

113
00:08:24.210 --> 00:08:25.600
Wells is not going to work.

114
00:08:26.530 --> 00:08:30.350
So now that we have everything set up on our compromise machine,

115
00:08:30.600 --> 00:08:34.950
let's minimize this. Now let's power on our Tucker machine,

116
00:08:34.950 --> 00:08:37.390
which is our main Cali machine.

117
00:08:38.200 --> 00:08:42.060
Simply it starts and once our machine is powered on,

118
00:08:42.200 --> 00:08:44.500
simply log in and open the terminal.

119
00:08:47.070 --> 00:08:50.500
Great. So now that we are now Carly Attacker machine,

120
00:08:50.670 --> 00:08:55.560
let's open a terminal and let's install the H T T Tunnel

121
00:08:55.630 --> 00:08:59.890
tool We'll type app update

122
00:09:00.750 --> 00:09:04.210
to simply update the packages repository list.

123
00:09:08.250 --> 00:09:11.280
Great. Next we'll type app,

124
00:09:12.110 --> 00:09:16.750
install H T D P tunnel and let installation

125
00:09:17.030 --> 00:09:17.863
continue.

126
00:09:21.910 --> 00:09:24.480
Great. Now the installation is complete.

127
00:09:25.280 --> 00:09:29.870
Let's actually set up the final part of the HTT P tunnel from our

128
00:09:29.890 --> 00:09:33.270
system to the Compromise Carly Lenox machine.

129
00:09:34.270 --> 00:09:38.960
To do this we'll type HTC dash dash forward

130
00:09:39.290 --> 00:09:44.130
ports a 80 T followed by the IP address

131
00:09:44.470 --> 00:09:46.770
of the Compromise Lenox machine.

132
00:09:47.950 --> 00:09:52.130
Then we'll specify port 1, 2, 3, 4. That's it.

133
00:09:52.220 --> 00:09:57.020
Enter What this means is any traffic that is

134
00:09:57.020 --> 00:10:00.620
leaving our system that is going to the Compromise System,

135
00:10:00.870 --> 00:10:03.180
it'll go to port 1, 2, 3, 4.

136
00:10:03.890 --> 00:10:08.550
But on the Compromise System traffic will now be redirected to port 8 8 88

137
00:10:09.010 --> 00:10:13.670
and will be forwarded using each T D P two to Windows

138
00:10:14.530 --> 00:10:19.450
the system. So how could we test this out? Well,

139
00:10:19.830 --> 00:10:24.410
we can simply try to establish an R DP session from our tuck

140
00:10:24.440 --> 00:10:28.570
machine to the actual Windows target system.

141
00:10:29.380 --> 00:10:31.200
You can type our desktop like so,

142
00:10:32.240 --> 00:10:37.100
and we are gonna specify our lubar ip followed by Port 80

143
00:10:37.100 --> 00:10:37.933
80.

144
00:10:38.380 --> 00:10:42.880
Our traffic from this address will be sent to the

145
00:10:42.880 --> 00:10:47.480
compromised lung system with a destination port of 1, 2, 3, 4,

146
00:10:47.970 --> 00:10:48.840
let's it enter.

147
00:10:49.680 --> 00:10:54.180
And you may have to actually accept the user credentials or the certificate.

148
00:10:54.780 --> 00:10:58.410
Let's try this one more time and we seem to have some difficulties.

149
00:10:59.770 --> 00:11:02.870
One of the mistakes I've made is I've said incorrect.

150
00:11:03.010 --> 00:11:05.190
The IP address for this command,

151
00:11:06.190 --> 00:11:10.890
the Compromise Lock system is it is actually operating on the IP address

152
00:11:11.190 --> 00:11:13.850
of 1 7 2 3 1 40.

153
00:11:14.730 --> 00:11:18.770
Previously I was entering the incorrect IP address, which was 47,

154
00:11:19.470 --> 00:11:24.170
but after checking shortly, it is IP address 40.

155
00:11:24.860 --> 00:11:28.490
Let's it enter. Let's try to RDP once more.

156
00:11:29.150 --> 00:11:32.290
And here we go. From our Tucker system,

157
00:11:32.710 --> 00:11:36.610
we are able to RDP directly to the target system.

158
00:11:37.500 --> 00:11:38.890
Let's click on other users.

159
00:11:40.110 --> 00:11:44.910
Let's enter Vagrant as username and vagrant as

160
00:11:45.270 --> 00:11:47.470
password. As shown,

161
00:11:47.850 --> 00:11:52.470
we are able to log in directly from our attack machine,

162
00:11:53.430 --> 00:11:55.000
true on each T D P tunnel,

163
00:11:55.790 --> 00:12:00.440
that provides us access to internal systems which do not have internet

164
00:12:00.500 --> 00:12:03.430
access. During this video,

165
00:12:03.650 --> 00:12:08.150
you have learned how to set up each TDP tunneling using Carli Lenox.

166
00:12:09.140 --> 00:12:12.200
In the next video, you'll learn about poor traffic attacks.

167
00:12:12.720 --> 00:12:16.680
I hope this video has been affirmative for you and I'll see you in the next one.
