WEBVTT - This file was automatically generated by VIMEO

0
00:00:08.900 --> 00:00:13.400
Hi and welcome back to Section five Blackhead Tricks with Net Cat.

1
00:00:13.820 --> 00:00:18.680
In this video we are going to talk about Backdoors and Shell to maintain

2
00:00:18.680 --> 00:00:23.560
access to a system that was compromised. A backdoor is the best solution,

3
00:00:23.820 --> 00:00:26.400
and Net CAT is very useful for this task.

4
00:00:26.660 --> 00:00:31.520
We saw that net CAT can be used in listener mode and can be

5
00:00:31.520 --> 00:00:33.720
connected when we need to do this connection.

6
00:00:33.830 --> 00:00:36.360
It's important to remember that when we connect remotely,

7
00:00:36.620 --> 00:00:41.360
we have the same permissions as the user who launch the net cat in the

8
00:00:41.360 --> 00:00:44.560
listening mode. If we need a different type of permissions,

9
00:00:44.740 --> 00:00:49.240
we have to launch net CAT in the appropriate user or try to

10
00:00:49.310 --> 00:00:51.400
elevate one time connection.

11
00:00:51.400 --> 00:00:55.200
When we have a connection between two systems and something breaks this

12
00:00:55.200 --> 00:00:59.040
connection, we need retain this connection and to do this,

13
00:00:59.040 --> 00:01:00.760
there are some techniques for this.

14
00:01:01.260 --> 00:01:05.200
In the case of something in the network that can be caused problems for this

15
00:01:05.200 --> 00:01:06.033
connection,

16
00:01:06.100 --> 00:01:10.880
we can use another set of techniques to force the Compromise system to

17
00:01:11.200 --> 00:01:15.440
initiate the communication. This technique is calling shelf Shing.

18
00:01:15.890 --> 00:01:20.760
Shelf shoveling refers to the act of redirecting the input and output of

19
00:01:20.840 --> 00:01:24.880
a shell to a service so that it can be remotely accessed.

20
00:01:25.420 --> 00:01:26.253
In this case,

21
00:01:26.380 --> 00:01:30.360
we force the Compromise System to communicate back to the attack system.

22
00:01:30.500 --> 00:01:34.320
And to do this we'll use a composition of Net Cat Commons.

23
00:01:34.430 --> 00:01:39.040
It's a different flow of connections because it's the compromise system that

24
00:01:39.440 --> 00:01:41.480
communicates with the attack system.

25
00:01:41.900 --> 00:01:45.400
The reason is that if the Compromise system change its IP address,

26
00:01:45.860 --> 00:01:49.920
the attack system will not be able to maintain a connection in this way.

27
00:01:49.980 --> 00:01:54.040
So for this operation, we have this combination of Net Cat Commons.

28
00:01:54.700 --> 00:01:59.480
So first of all, we have two configuration in the compromised system.

29
00:02:00.100 --> 00:02:04.760
We have this composition of net cat, the host is the attack system,

30
00:02:05.180 --> 00:02:07.440
and a part number. We have a pipe.

31
00:02:07.860 --> 00:02:12.760
That's mean that what we have in the the left will be input that

32
00:02:13.150 --> 00:02:14.280
what we have in the right.

33
00:02:14.740 --> 00:02:19.360
So the second common will be path to the Bash and a second

34
00:02:19.590 --> 00:02:21.760
pipe operation. That's net.

35
00:02:22.020 --> 00:02:26.400
All we have in the left will be input to the right and the third common will be

36
00:02:26.420 --> 00:02:30.320
uh, net Cat. The host will be the same attack system,

37
00:02:30.900 --> 00:02:35.240
but now we have a different port. Okay? So we have in this option here,

38
00:02:35.390 --> 00:02:38.920
this example below net Cat, the host,

39
00:02:39.100 --> 00:02:43.760
the access that ends with 11 a port number 5, 5 6, 6 0

40
00:02:44.030 --> 00:02:46.800
pipe common a path to the bash,

41
00:02:46.800 --> 00:02:51.640
another pipe common and a second instance of net cat with the same

42
00:02:51.790 --> 00:02:56.400
host that aims with 11, but in a different port, 5, 5, 6, 1. Okay?

43
00:02:56.540 --> 00:03:01.480
And in the attack system we run instance of net cat running and listen on

44
00:03:01.480 --> 00:03:05.040
the port that we had specified in the compromise system.

45
00:03:05.470 --> 00:03:10.160
Here we have two environments on the left Microsoft Windows

46
00:03:10.980 --> 00:03:13.680
and the right, our Carol Linux environment.

47
00:03:14.220 --> 00:03:17.360
And let's do example of shell shoveling.

48
00:03:18.610 --> 00:03:22.230
So lemme configure and check the

49
00:03:23.720 --> 00:03:28.460
IP for my Microsoft Windows environment. So IP config

50
00:03:30.430 --> 00:03:35.340
in here, I can see that MYP ends in 11. Okay? So

51
00:03:37.010 --> 00:03:41.980
this will be our attack system and here will be our

52
00:03:41.980 --> 00:03:42.820
compromise system.

53
00:03:44.090 --> 00:03:47.910
So let me check the IP for this machine here.

54
00:03:48.850 --> 00:03:53.670
The IP here is the number ends with the number

55
00:03:53.670 --> 00:03:54.990
12. Okay?

56
00:03:56.930 --> 00:04:01.910
So we saw that we have two system, a attack system and a compromised system.

57
00:04:02.250 --> 00:04:07.110
And we have a combination of comments in our compromised system,

58
00:04:07.580 --> 00:04:10.590
okay? To avoid any interrupter of, for example,

59
00:04:11.370 --> 00:04:16.070
IP address could change or firewall or any interrupter.

60
00:04:16.410 --> 00:04:20.910
So we will in reverse a flow of communication.

61
00:04:21.610 --> 00:04:23.430
So in our attack system,

62
00:04:24.700 --> 00:04:29.450
we run a net cat within the instance to listen

63
00:04:29.970 --> 00:04:33.850
a port. Okay? So here I will create an instance, uh,

64
00:04:33.990 --> 00:04:38.800
in the Microsoft environment is we are using a

65
00:04:38.860 --> 00:04:39.920
net. Cat is a,

66
00:04:39.920 --> 00:04:44.240
it's like a net cat instance for Microsoft Windows environment.

67
00:04:44.940 --> 00:04:49.590
So let's use Z L P,

68
00:04:49.900 --> 00:04:53.150
okay? To get more details, listen in a specify port,

69
00:04:53.530 --> 00:04:58.390
in this case we create a port, open a port for 5, 5, 6, 0.

70
00:04:59.310 --> 00:05:01.440
Okay? So here I have, uh,

71
00:05:01.660 --> 00:05:05.400
netcat running in the listener mode.

72
00:05:06.680 --> 00:05:11.300
Listen for an port 5, 5, 6, 0 and I will run a second

73
00:05:11.620 --> 00:05:15.340
instance of netcat, but in a different port.

74
00:05:16.040 --> 00:05:18.310
So it will be LP

75
00:05:18.380 --> 00:05:22.510
5 5 6 61. Okay?

76
00:05:22.690 --> 00:05:23.950
In our system attack,

77
00:05:24.210 --> 00:05:28.470
we have two netcat systems running in lesser mode

78
00:05:29.130 --> 00:05:33.990
and in a different port. And in our compromise system here,

79
00:05:34.350 --> 00:05:38.950
I will run the combination of commands that we saw before. Okay? So I,

80
00:05:39.910 --> 00:05:41.810
the common is like this.

81
00:05:42.700 --> 00:05:46.280
So the first common is a net cat instance

82
00:05:47.830 --> 00:05:52.490
in the specify host 11, this is the host of our attack system.

83
00:05:53.230 --> 00:05:57.400
In this net catan view, we connect in the port 5, 5, 6, 0.

84
00:05:58.360 --> 00:05:59.193
Okay?

85
00:05:59.310 --> 00:06:04.090
The input here will be put redirect for my

86
00:06:04.090 --> 00:06:07.880
second common after the pipe. So

87
00:06:09.390 --> 00:06:12.000
this is an instance of, uh, a bash.

88
00:06:13.230 --> 00:06:17.650
And then the common here will be redirect for another command.

89
00:06:18.390 --> 00:06:23.170
In this case a net cat run connected to the same attack system

90
00:06:23.190 --> 00:06:26.250
11, but in a different port. Okay?

91
00:06:26.670 --> 00:06:30.580
So what we use and

92
00:06:31.770 --> 00:06:35.120
start or do, uh, common in this terminal here,

93
00:06:35.540 --> 00:06:40.440
the command will arrive in the compromised system and then we'll be redirection

94
00:06:40.980 --> 00:06:44.230
for the this distance here, okay?

95
00:06:44.290 --> 00:06:48.960
We have a redirection of flow to our uh,

96
00:06:48.960 --> 00:06:53.040
shell command. Okay? So now we have both listeners here,

97
00:06:53.860 --> 00:06:58.170
let bind a connection. Okay?

98
00:06:58.710 --> 00:07:01.610
So now I have a connection here. Okay?

99
00:07:02.310 --> 00:07:04.130
We have a connection from this host.

100
00:07:04.390 --> 00:07:07.890
12 is the IP address of our compromise system.

101
00:07:09.040 --> 00:07:13.260
And now I will check if everything's okay, is this connector is done.

102
00:07:13.800 --> 00:07:16.300
So I you for example, use a common

103
00:07:18.060 --> 00:07:20.440
to show k o version,

104
00:07:21.420 --> 00:07:25.170
you name dash A for example, and C,

105
00:07:25.390 --> 00:07:29.250
we don't have nothing here in our compromise system. Shell,

106
00:07:29.940 --> 00:07:32.360
but we have a right direction from here.

107
00:07:32.660 --> 00:07:36.720
So this is our result in this terminal here.

108
00:07:37.500 --> 00:07:40.440
Okay? So, okay,

109
00:07:41.540 --> 00:07:44.240
so all the common here,

110
00:07:45.100 --> 00:07:49.760
the common part start from this terminal here in the attack, okay?

111
00:07:50.300 --> 00:07:54.440
The common arrive in the comite system from this uh,

112
00:07:54.770 --> 00:07:57.400
connection here. Imagine that there's a connection here.

113
00:07:59.480 --> 00:08:04.380
The mouse here, the common, for example,

114
00:08:06.970 --> 00:08:10.150
you name dash a for example, arrive in this terminal,

115
00:08:10.690 --> 00:08:14.310
but will be redirect for this host and this port.

116
00:08:15.250 --> 00:08:20.190
So the common will redirect and come back to the

117
00:08:20.190 --> 00:08:25.000
attack system. So nothing is shown in the compromise system.

118
00:08:25.140 --> 00:08:29.960
So this is very hidden common, for example, hidden results or tips.

119
00:08:30.150 --> 00:08:31.480
Okay? The common is here,

120
00:08:31.790 --> 00:08:36.650
this is very interesting because this is attack

121
00:08:36.710 --> 00:08:38.330
is very, uh, interesting.

122
00:08:38.640 --> 00:08:42.750
There's no common result showing in this terminal here.

123
00:08:43.490 --> 00:08:47.770
And we have a redirection. So it's very interesting attack.

124
00:08:48.110 --> 00:08:48.943
In this video,

125
00:08:49.350 --> 00:08:54.250
we saw how to redirect the input and output of a shell to have a

126
00:08:54.450 --> 00:08:57.490
compromised system remotely accessed. The next video,

127
00:08:57.980 --> 00:09:01.690
we'll take a look at net cheat sheet. I hope.
