WEBVTT

1
00:00:00.560 --> 00:00:04.670
OK so the next couple of videos are going to talk about Path escalations.

2
00:00:04.670 --> 00:00:10.550
One being the binary path or the bin path and the other being the UN quoted service path.

3
00:00:10.550 --> 00:00:12.110
Now these are common.

4
00:00:12.110 --> 00:00:17.260
You will see these in CTF style games and in labs et cetera.

5
00:00:17.290 --> 00:00:23.930
So pay close attention on how we enumerate these and how we find these types of exploits.

6
00:00:23.930 --> 00:00:30.830
Now in the detection here for the binary parts what we're seeing is that it's kind of already giving

7
00:00:30.830 --> 00:00:34.100
it to us and we're going to go a little bit above that.

8
00:00:34.130 --> 00:00:36.230
Now we can actually use power up.

9
00:00:36.230 --> 00:00:41.360
So if we go to our machine and we say hey power up I want to know what you can find.

10
00:00:41.360 --> 00:00:43.130
We'll let that run really quick.

11
00:00:43.130 --> 00:00:48.110
So let's go ahead and just shift right click and open a command window here.

12
00:00:48.470 --> 00:00:50.030
And what I'm going to say is.

13
00:00:50.030 --> 00:00:57.650
Power show execution policy bypass we'll quickly load up power up and then we'll run the invoke called

14
00:00:57.650 --> 00:01:01.680
checks now while this is running.

15
00:01:01.680 --> 00:01:06.420
Let's go ahead and look at a more manual method and we'll talk about what the binary path is.

16
00:01:06.450 --> 00:01:12.400
So let's do a command prompt and what we'll say here is we're going to run axis checks.

17
00:01:12.420 --> 00:01:21.510
Let's see these over to our desktop and then tools and access check and we're just gonna run access

18
00:01:21.510 --> 00:01:25.140
check 64 and we're going to give it the following switches.

19
00:01:25.140 --> 00:01:35.520
We're going to give it a U W C V and we're gonna say everyone with a Asterix or a wildcard and this

20
00:01:35.520 --> 00:01:36.570
should have a space here.

21
00:01:36.570 --> 00:01:37.110
I'm sorry.

22
00:01:38.100 --> 00:01:41.590
So before I hit enter let's talk about what we're doing with Axis check.

23
00:01:41.630 --> 00:01:43.680
We are looking for a few things.

24
00:01:43.680 --> 00:01:47.940
The U is going to say hey let's suppress the air so we don't want to see any errors when we're doing

25
00:01:47.940 --> 00:01:54.720
this checks we just want to bring back only the positive findings with the W We only want to show the

26
00:01:54.720 --> 00:02:02.790
objects that have write access so we're not going to show anything where we cannot write to and the

27
00:02:02.850 --> 00:02:09.420
C is gonna say hey I want you to display the service name for this and the v is verbose so let's go

28
00:02:09.420 --> 00:02:16.110
ahead and enter and what I'm doing to as I'm saying everyone as a group so everybody on this computer

29
00:02:16.110 --> 00:02:22.380
what can everybody do and where do we have right access as everyone and you're gonna see we have read

30
00:02:22.380 --> 00:02:30.150
right to this a d ACL service and if we go look through our power up really quick it should show up

31
00:02:30.150 --> 00:02:35.490
in here as well so you're going to see that we're going to have the service permissions and we have

32
00:02:35.530 --> 00:02:42.660
DSL service and we can invoke service abuse name D ACL service you can give that one a try if you want

33
00:02:43.200 --> 00:02:48.480
the big thing is here is we can restart the service that's important because if we can restart the service

34
00:02:48.480 --> 00:02:53.190
we control it so if it's running right now we have the ability to add something militias and then restart

35
00:02:53.190 --> 00:02:53.720
it.

36
00:02:54.000 --> 00:03:01.820
Super important there on top of that if we look a little bit above we'll see that we have unquote in

37
00:03:01.830 --> 00:03:07.770
service pass which we'll get to hear in the next video so make sure you know that these exist too but

38
00:03:07.770 --> 00:03:13.180
back to the binary path and let's scroll down just a little bit we have the service provisions for this

39
00:03:13.180 --> 00:03:18.350
DSL service we we bring this up and we should query this just a little bit further.

40
00:03:18.430 --> 00:03:27.420
So what we can do is we can just say something like access check 64 to see and we'll make these same

41
00:03:27.420 --> 00:03:36.390
kind of call oh we'll just do a w you the C same thing again and we'll say D A C L SBC.

42
00:03:36.540 --> 00:03:40.440
So now we found this we're just going to run the same thing but we're gonna run it against the service

43
00:03:40.440 --> 00:03:48.230
itself and we're gonna see a little bit more information here we could see read write for everybody

44
00:03:50.100 --> 00:03:55.110
and we see also that we have this service change config which was in the other one as well so we can

45
00:03:55.110 --> 00:04:00.130
change the configuration here but it's always good to see the whole settings as to what everybody has.

46
00:04:00.150 --> 00:04:06.150
So why do we pull everyone will we put everyone because that's our group we could have pulled on administrators

47
00:04:06.150 --> 00:04:09.760
we could have pulled on authority system but we want to see where everybody has.

48
00:04:09.930 --> 00:04:17.220
So remember we pulled down who has right access to a wild card so the only thing that came back was

49
00:04:17.220 --> 00:04:23.730
this DSL service we have changed config status which means we can change the configuration.

50
00:04:23.730 --> 00:04:34.200
Now how can we do that let's go ahead and query the service so we'll say SC QC we'll say D ACL SPC

51
00:04:36.700 --> 00:04:43.900
in you're gonna see that we have this binary path name which is calling out this ACL serve as well because

52
00:04:43.900 --> 00:04:48.600
we have the change config we can actually change its configuration of what you're seeing here.

53
00:04:48.850 --> 00:04:53.980
So let's go ahead and get malicious let's change the configuration so what we're gonna do is we're going

54
00:04:53.980 --> 00:04:58.010
to say S C config and we're gonna say D.

55
00:04:58.120 --> 00:05:11.970
ACL S.V. C and we're gonna say bin path is equal to and we'll say net local group administrators user

56
00:05:12.900 --> 00:05:17.230
at and it says success.

57
00:05:17.280 --> 00:05:22.340
So let's query one more time you can see that net local group administrators user ad.

58
00:05:22.410 --> 00:05:31.910
Now let's go ahead and just do a net local group administrators and you'll see that administrators and

59
00:05:31.910 --> 00:05:34.990
TCM is just the only two in here right now.

60
00:05:35.060 --> 00:05:41.210
So let's go ahead and say SC start DACA.

61
00:05:41.310 --> 00:05:45.040
SPC let's do a net real quick.

62
00:05:45.050 --> 00:05:48.200
We might get in there and actually have this working and we do.

63
00:05:48.260 --> 00:05:51.650
So the air threw me off there for a second but the the air is fine.

64
00:05:51.650 --> 00:05:54.170
We're not starting anything because we remove the application.

65
00:05:54.170 --> 00:05:59.060
So if you see through here the ACL service that you see there's nothing to start anymore.

66
00:05:59.090 --> 00:06:02.880
So what we're doing is just running a command and you're gonna see an error here.

67
00:06:02.930 --> 00:06:04.040
So here we go.

68
00:06:04.040 --> 00:06:09.520
The user has been added in and we can tell now we are part of the administrator's group.

69
00:06:09.530 --> 00:06:16.300
So we have successfully elevated the privileges using the bin path exploit so in the next video we're

70
00:06:16.300 --> 00:06:22.580
gonna do is we're going to focus instead on the escalation using unquote ad service parts.

71
00:06:22.660 --> 00:06:27.580
So let's go ahead and meet me in the next video and we directly move on to the unquote service.
