WEBVTT

1
00:00:00.330 --> 00:00:00.660
All right.

2
00:00:00.690 --> 00:00:03.360
Let's do this the manual method shall we.

3
00:00:03.360 --> 00:00:10.260
So remember when we found the exploit originally we did it fast to on search point and we saw that we

4
00:00:10.260 --> 00:00:13.180
had this remote command execution for Metis Boyd.

5
00:00:13.590 --> 00:00:18.570
Well we also have remote command execution down here in what appears to be a python file.

6
00:00:18.630 --> 00:00:19.950
So that would be interesting to me.

7
00:00:19.950 --> 00:00:28.480
I'm going to go ahead and just over to user share exploit database exploits windows remote.

8
00:00:29.160 --> 00:00:31.240
And that's exactly what this directory is.

9
00:00:31.290 --> 00:00:37.710
And then I just want to get it this 3 9 1 6 1 and let's read about it really quick

10
00:00:40.660 --> 00:00:46.420
so we're going to use the usage of Python exploit that Pi the target IP address and the target port

11
00:00:46.420 --> 00:00:47.530
number.

12
00:00:47.530 --> 00:00:53.080
It says we need to have a web server using our hosting net cat on port 80.

13
00:00:53.140 --> 00:00:55.390
We may need to run it multiple times to our success.

14
00:00:56.140 --> 00:01:01.490
So if we scroll through here we can see that we have to provide our local IP address.

15
00:01:01.540 --> 00:01:01.860
OK.

16
00:01:01.870 --> 00:01:06.590
So mine is 10 dot eleven dot for 114.

17
00:01:06.880 --> 00:01:12.600
And the port number we're going to host this up on I'll just call this all sevens for port three would've

18
00:01:12.620 --> 00:01:13.440
been fine as well.

19
00:01:13.450 --> 00:01:15.170
You can use whatever port you want here.

20
00:01:15.340 --> 00:01:18.130
So all sevens I'm going to go ahead and save this.

21
00:01:18.190 --> 00:01:22.880
Now that meets requirement number one requirement two is we need to host up net cat.

22
00:01:23.020 --> 00:01:25.340
So we do a locate net cat.

23
00:01:25.360 --> 00:01:31.980
You see I've already got it here in my transfer folder but you will have one as well and your users

24
00:01:31.980 --> 00:01:37.060
share windows resources so you can utilize a net cat there wherever you are.

25
00:01:37.060 --> 00:01:42.550
You just need to host that net cat files if you see I unless I have net cat here I'm just going to host

26
00:01:42.590 --> 00:01:43.450
up net cat.

27
00:01:43.690 --> 00:01:50.320
So python and simple HDP server on 80 and now we're hosting.

28
00:01:50.390 --> 00:01:54.970
So now all we gotta do is follow the syntax we say target IP target port number.

29
00:01:55.070 --> 00:01:57.770
So save this close it.

30
00:01:57.770 --> 00:02:01.680
Python 3 9 1 6 1.

31
00:02:02.120 --> 00:02:03.780
And then the IP is 10 dot 10.

32
00:02:03.780 --> 00:02:12.380
That 148 that one thirty nine for me on 80 80 run that and would actually help if I was listening on

33
00:02:12.380 --> 00:02:18.800
net cat I was not I'm very sorry net cat and the LP 7 7 7 7.

34
00:02:18.830 --> 00:02:20.330
Now let's try that one more time

35
00:02:23.890 --> 00:02:24.210
OK.

36
00:02:24.210 --> 00:02:24.710
There we go.

37
00:02:24.710 --> 00:02:28.100
You saw the get request was made last time and it did download neck cat.

38
00:02:28.100 --> 00:02:30.890
Now we've gone ahead and we have a shell in this machine.

39
00:02:31.040 --> 00:02:33.830
So if we say who am I.

40
00:02:33.830 --> 00:02:37.290
We could say we are still mountain bill perfect.

41
00:02:37.420 --> 00:02:37.940
All right.

42
00:02:37.960 --> 00:02:40.650
So we are in the startup folder.

43
00:02:40.750 --> 00:02:48.720
We can go ahead and do some enumeration here so let's go ahead and try uploading something like when

44
00:02:48.720 --> 00:02:53.070
PS for example and we'll run one piece and see if we can get that to work.

45
00:02:53.070 --> 00:02:59.480
So I'm going to host up where I actually am already hosting up when P 60 forward at EMC I'm just gonna

46
00:02:59.490 --> 00:03:01.060
use cert you tell the Bring that over.

47
00:03:01.230 --> 00:03:09.430
So sir you tell that I see your all cash dash F and then I'm missing a call out my IP address.

48
00:03:09.440 --> 00:03:22.540
Ten eleven for one 14 and then I'm going to say I want when PS 64 forward EMC and we'll just call it

49
00:03:23.050 --> 00:03:32.710
when PS dot XY see if it grabs it four or four not found.

50
00:03:32.740 --> 00:03:38.120
So looks like the syntax was not correct let me try it one more time sir.

51
00:03:38.140 --> 00:03:47.490
You tell that you see your all cache file HP ten that eleven up forward 114 and I'm just gonna paste

52
00:03:47.490 --> 00:03:52.290
it this time think the syntax matters here and then let's call this one piece di you see

53
00:03:55.260 --> 00:03:56.380
OK now we grabbed it.

54
00:03:56.400 --> 00:04:00.830
So the capital W here definitely matters with the lowercase W.

55
00:04:00.840 --> 00:04:05.710
So now we're just going to run one piece and see what comes back.

56
00:04:06.630 --> 00:04:08.060
And it comes back in pretty color.

57
00:04:08.080 --> 00:04:08.620
So nice.

58
00:04:08.650 --> 00:04:09.430
I love one piece.

59
00:04:09.430 --> 00:04:12.100
This is one of the best tools that you can run.

60
00:04:12.160 --> 00:04:17.830
So if we start looking through here as it's scrolling down and spewing all kinds of information we're

61
00:04:17.830 --> 00:04:24.910
looking for anything in red which would indicate that there is a perfect escalation or a mis configuration.

62
00:04:24.910 --> 00:04:31.270
So we can scroll through here and eventually we're going to find that there is unquote ad service parts

63
00:04:32.930 --> 00:04:36.140
and while we're scrolling through here we actually have auto log in credentials too.

64
00:04:36.170 --> 00:04:39.790
So we can log in as Bill under three through eight nine now if we wanted to.

65
00:04:39.830 --> 00:04:43.460
So just more dumping of information that we can find here it's awesome.

66
00:04:44.150 --> 00:04:44.480
OK.

67
00:04:44.480 --> 00:04:51.050
And if we look over here we could see we have interesting services under services information check

68
00:04:51.050 --> 00:04:57.770
if you can overwrite some binary performed yellow hijacking also check for unquote ID service Pat no

69
00:04:57.770 --> 00:05:00.890
quotes in spaces detected or space detected.

70
00:05:00.890 --> 00:05:04.050
This is telling us hey we've got unquote service bad.

71
00:05:04.400 --> 00:05:05.840
Beautiful right.

72
00:05:05.840 --> 00:05:11.150
So this is exactly what we want and we're going to just do the same thing we did before we're going

73
00:05:11.150 --> 00:05:14.150
to generate and drop a file into here.

74
00:05:14.150 --> 00:05:16.610
So I'm just going to C.D. into this folder

75
00:05:19.270 --> 00:05:24.350
go ahead and C.D. And I'm going to just paste that path like that.

76
00:05:25.000 --> 00:05:31.150
Now we're in the advanced system care folder if we l s or sorry if we dare I'm in a Linux mindset.

77
00:05:31.150 --> 00:05:35.860
We should have access to this folder we have the AFC XY that we need.

78
00:05:35.890 --> 00:05:42.640
So what I'm going to do is I'm going to come to the transfer and this s c service that you see we're

79
00:05:42.640 --> 00:05:43.540
going to regenerate.

80
00:05:43.540 --> 00:05:50.170
I'm going to go ahead to control c what I want to do is I want to run MSF venom with a payload of Windows

81
00:05:51.130 --> 00:05:59.960
X 64 actually windows sorry reverse underscore ECP and then we're going to just have a whole host of

82
00:05:59.990 --> 00:06:10.180
ten eleven def forward 1 14 and then a l port and we'll say all eights on this one file type of E XY

83
00:06:10.330 --> 00:06:18.000
and then we're gonna drop that right into this file name here this AFC let's go ahead and copy paste

84
00:06:18.630 --> 00:06:19.470
it's gonna overwrite

85
00:06:22.500 --> 00:06:29.520
and then I'm going to host up one more net cat so net cat and the LP of all eights

86
00:06:32.490 --> 00:06:39.480
come into here and we're going to perform a certain hotel sorry it's windows shall reverse DCP Windows

87
00:06:39.750 --> 00:06:41.670
shell reverse DCP

88
00:06:48.880 --> 00:06:49.220
OK.

89
00:06:49.250 --> 00:06:59.000
Now we're gonna come in here and we're going to just do a quick cert you tell your all cash dash f same

90
00:06:59.000 --> 00:07:07.490
thing as before ten eleven up four out one fourteen forward slash I'm going to paste this I want to

91
00:07:07.490 --> 00:07:14.900
paste it again make sure everything is running let's go ahead and start up our simple server so that

92
00:07:14.900 --> 00:07:22.300
we're hosting it hit enter here K we are listening on this port for net cat.

93
00:07:22.420 --> 00:07:25.940
So now all we got to do is start this service.

94
00:07:25.940 --> 00:07:35.980
So we'll do SC start advanced system care service nine

95
00:07:39.350 --> 00:07:41.030
and we've got a shell.

96
00:07:41.030 --> 00:07:41.930
Who am I.

97
00:07:41.930 --> 00:07:47.020
We are authority system we've owned this machine so that is it.

98
00:07:47.030 --> 00:07:52.340
Hopefully this was a good section for you I really try to hammer home on this section because it is

99
00:07:52.340 --> 00:07:57.680
one that you're gonna see and it's very common in the CTF types you're never going to really see this

100
00:07:57.710 --> 00:08:05.990
I don't think on a live machine but you never know but when it comes to CTF types or exams or or certifications

101
00:08:05.990 --> 00:08:08.320
labs whatever this is really common.

102
00:08:08.350 --> 00:08:11.910
So it's important to know important to just kind of lock that in.

103
00:08:12.020 --> 00:08:13.400
Remember what Ben parts are.

104
00:08:13.400 --> 00:08:20.060
Remember what the UN quoted service parts are and why they exist and now you've seen the manual way

105
00:08:20.060 --> 00:08:27.650
to do it using one piece and the net Cat version and you've also seen the interpreter slash Metis boy

106
00:08:28.010 --> 00:08:30.320
with the power up tool as well.

107
00:08:30.350 --> 00:08:35.370
So couple different options that you can use to kind of hunt these down and you can make this your own

108
00:08:35.390 --> 00:08:41.150
so hopefully this all made sense from here we're going to move on into one more walk through before

109
00:08:41.150 --> 00:08:48.050
we start getting into our Capstone challenge but we're going to talk about a fairly new escalation as

110
00:08:48.050 --> 00:08:53.840
of twenty twenty this is from twenty nineteen and it's CV twenty nineteen 13 eighty eight it's pretty

111
00:08:53.840 --> 00:08:56.900
neat and I will show you in the next section how we can escalate it.
