WEBVTT

00:01.590 --> 00:11.450
We can use the Linux command, see harsh mod or change more to change permissions of the file or folder.

00:13.170 --> 00:19.680
Uh, this is the common thing that people use in this next year when a root user or the files owner

00:19.680 --> 00:21.460
can change permissions.

00:21.900 --> 00:28.630
In this lecture, we use a C judgment to change permission on hash.

00:28.680 --> 00:37.110
Get that he's seen that start using two different methods versus using numerical representation of permissions.

00:37.110 --> 00:39.360
And then we use a symbolic representation.

00:40.910 --> 00:48.500
Changing permissions with decimal notation, we can use a shortcut to refer now to permission by using

00:48.500 --> 00:56.030
a symbol, a single number to represent one, our double helix set of permissions.

00:56.480 --> 01:01.730
So like everything underlying the operating system, the permissions are represented in binary.

01:02.090 --> 01:07.250
So on and off switches are represented by one and zero, respectively.

01:08.150 --> 01:14.060
You can think of the RW X permissions on a string on off switches.

01:14.060 --> 01:23.480
So when all the emissions are granted, this equates in a one on one in binary and binary sit like this

01:23.480 --> 01:32.000
is them, then easily represented as one digit by converting it into a octal and each digit number system

01:32.000 --> 01:35.400
that starts with zero and ensuites seven.

01:36.230 --> 01:46.160
So and this represents a set of three binary digits, meaning we can represent an entire W P R W, except

01:46.160 --> 01:48.290
with one just the one digit.

01:48.520 --> 01:55.780
Uh, this can be zero one two three four five six seven eight seven, actually.

01:55.810 --> 01:57.200
Lastly, 7.8.

01:57.860 --> 01:58.970
So um.

02:02.670 --> 02:09.000
Here I will create a table here for a better understanding here.

02:09.420 --> 02:14.640
So in binary and here this is the binary here.

02:15.490 --> 02:17.910
Uh, octal, octal.

02:17.940 --> 02:23.030
And I will show you here is our W X.

02:24.720 --> 02:25.820
Our top picks.

02:26.320 --> 02:36.480
So the binary is zero, if binary zero zero zero octal is zero smell and RW, it's not read on or write

02:36.480 --> 02:37.710
nor execute yet.

02:38.640 --> 02:43.980
So if binary zero zero one here okodili, there's going to be one.

02:44.160 --> 02:46.550
And this can be not really.

02:46.560 --> 02:49.890
It's not right, but execute executable here.

02:50.400 --> 03:01.050
If binary is zero one zero and octal is two, then this means this is them not readable but readable

03:01.050 --> 03:03.330
and not executable here.

03:04.380 --> 03:10.830
And if binary zero one one and octal is three, then this means.

03:12.940 --> 03:22.000
This is not readable, but rewritable here and executable, if binary is one zero zero.

03:22.620 --> 03:24.880
And this man in octal for.

03:26.440 --> 03:27.010
So.

03:28.230 --> 03:34.650
This means this is not treated, is sexual readable, not rewritable, nor executable.

03:35.700 --> 03:44.340
And if there is one zero one, this means in Oakdale is five here and this is readable.

03:45.010 --> 03:47.010
Um, this is readable.

03:47.250 --> 03:48.180
Not right.

03:48.180 --> 03:50.520
Bill and executable here.

03:50.520 --> 03:52.260
And so readable.

03:52.440 --> 03:54.450
Not readable and executable.

03:55.620 --> 03:59.130
And here we have six and seven.

03:59.130 --> 04:09.000
Lastly, one one zero equals just six in October by a system here, and this is the readable writable

04:09.450 --> 04:10.770
executable here.

04:11.220 --> 04:20.360
But if the binary is one three one one one one, and this means in Oakdale, we have seven here.

04:21.070 --> 04:24.130
Um, and this is readable, right?

04:24.150 --> 04:26.490
Well and executable as well.

04:27.360 --> 04:31.380
So using this information, let's go through some examples.

04:31.980 --> 04:39.030
First, if you want to set only the read permission, we called off the table and look at the value

04:39.450 --> 04:39.990
for it.

04:39.990 --> 04:42.120
For example, this is the read permission.

04:42.820 --> 04:44.190
And this is the fourth.

04:44.580 --> 04:53.280
We can declare this using four or just read, write, execute, or we can declare it in binary.

04:53.640 --> 05:00.450
Next, if we want to set permission to write and execute, we could use the same methodology and look

05:00.450 --> 05:08.300
for what's said and what sets the W and what system is which is executable and write about.

05:09.180 --> 05:15.120
So as you can see here, no, we have our W X here.

05:15.570 --> 05:18.430
So we want just write about the exhibit unexcusable.

05:18.480 --> 05:21.000
And as you can see in Oakdale, this is them.

05:21.690 --> 05:22.080
Three.

05:22.740 --> 05:24.720
So the binary zero one one.

05:26.020 --> 05:26.440
So.

05:29.930 --> 05:35.540
Now we can, um, pass an argument here is a very short comment.

05:36.050 --> 05:36.620
Come in.

05:36.890 --> 05:43.700
So for example, let's, uh, create a new file or fear here of the Cuban section.

05:43.850 --> 05:44.210
OK.

05:44.860 --> 05:45.890
Uh, for example.

05:47.650 --> 05:51.810
Torch here, uh, it's um.

05:52.060 --> 05:53.160
Oh, what's?

05:54.590 --> 05:55.940
Polls while.

05:57.710 --> 06:00.710
Unless there, as you can see here, we create except for.

06:01.170 --> 06:02.830
While this is not enough.

06:03.350 --> 06:05.850
This has not incited any thing.

06:05.870 --> 06:08.690
There's just a file with zero lights here.

06:09.050 --> 06:21.140
So let's declare Ellis L.A. As you can see here, we have example file here, which is created by county.

06:21.740 --> 06:30.510
So let's cheng this permission to, uh uh, let's see how much seven seven four hash, actually.

06:31.260 --> 06:32.960
Example file.

06:34.820 --> 06:40.940
Unless L.A. and as you can see here, we changed these permissions it.

06:42.690 --> 06:43.080
So.

06:47.820 --> 06:58.640
Uh, you shall see R W here, R W X R W E S R e r on the left side of the this example file.

06:59.060 --> 07:04.430
So this confirms that that is, uh, see how someone can successfully change permission on the file

07:04.610 --> 07:10.160
to give the both the owner and the group ability to execute the file.

07:28.690 --> 07:36.610
So Europe's use of permission to protect users or groups files and directories from other users in the

07:36.610 --> 07:40.870
system can be used for offensive and defensive purposes.

07:41.380 --> 07:42.600
Little no, no.

07:43.120 --> 07:48.760
Now know how to manage these permissions and how to exploit weak points in the security system.

07:49.150 --> 07:51.680
In particular, Estudiantes guided.
