4.2 Windows Files Part 1

Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
or

Already have an account? Sign In »

Time
5 hours 21 minutes
Difficulty
Beginner
CEU/CPE
6
Video Transcription
00:01
all right. Hello, And welcome to command on basics. This video we're gonna learn about Windows file commands one. I'm Christopher Hyler, and let's begin.
00:09
So are learning objectives for this video. We're gonna learn the echo command during the I cackles command and understand the FC file. Compare commend
00:18
pre assessment. The eye cackles command is he used to change file permissions. Is this true or false?
00:26
It is true. So the eye cackles Command is used to change the A C. L's or the access control list for a file or a folder. So this is very useful way in order to be able to change file permissions from the command line.
00:42
All right, we're gonna start off with the echo and we went over the Echo Command Ah, lot earlier in the environment variables session in that in that video. So this is still very useful command in orbit to combine with environment variables or when you're scripting Iran as well. Learn in this course
01:00
and we can get the output that we're looking for
01:03
so that we can take it and redirect it or make sure that it's coming out in the correct type of data for how we need to utilize it later. So it's a very useful tool that you need to be comfortable with in order to become effective at the command line.
01:19
It's very similar to the Lenox Echo as well, so we can just echo a message.
01:26
Hello there
01:27
and it goes straight back to us. And then we can also echo environment variables as we've learned.
01:34
So let's say
01:38
and we could see it is Sunday, September 15 2019.
01:44
All right, so we have the eye cackles command as we learned a little bit already about in the pre assessment where it stands for integrity, control, access, control this. So this is a very useful way in order to change the file permissions at a remove violent Herron's whole bunch of very useful options for us at the command line.
02:01
And I will say that
02:04
being able to use the command line effectively,
02:07
it will save you a lot of time. Um, when I was a system administrator, I had the
02:15
the daunting task of taking about 2000 users,
02:19
and every single user had full control over every singles user's personal folder on the network, and so this was due to a network glitch where the power went out or we're transferring files or something crazy happened, although we had to do,
02:34
we had to go in and individually give full control to each individual user for each individual folded.
02:39
And that sounds pretty straightforward, except that's a lot of clicking to do for 2000 people. So what I did is I used the I cackles command and had it automatically look through each user name from the domain that had a folder
02:53
and had it automatically assigned inheritance and removed the full control permission for everybody else.
03:00
For that individual user. I let that run took about half a hour to run, and I was done completely done 100% accurately saved so much of my time and so much of the time for the rest of my team.
03:14
All right, so let's jump in and take a quick look at the eye cackles command.
03:16
So first I'm gonna do D I r. To see what's inside of this folder I'm working in.
03:22
Let's say I wanna look at file, too,
03:23
so I'm going to do I cackles file tab once and have again and then could see that he changed from find one to file, too.
03:32
And as you can see, there's a lot of inherited permissions already with the administrators systems, Thunder kid users built in users hope once you get stuff.
03:40
Now let's say you want to give myself access to, uh, this file and say I want to get myself full control over this file.
03:49
So I'm gonna do I'm gonna do my cackles file too
03:53
Slash Grant,
03:54
then my user name
03:55
and F for full control
04:00
and said it successfully processed it. So we will use up Eric, eat twice and look at the A Seal's again for this file
04:08
and check it out. Now I am a full control over this file.
04:12
It's very similar. If we look at the help for my cackles
04:15
you slash question Mark
04:18
and we could see we can also remove
04:23
different occurrences in the a c l weaken Grant deny Ah, whole bunch of interesting, different uses for I cackles. If you're not familiar with Windows permissions, I would highly recommend you take the time to learn them and how different inheritance and the deny inheritance works together because you can get very tricky.
04:41
So before you start going crazy on the,
04:44
you know, different A seals for files take the time to learn how the they all work together.
04:48
All right, now we have the FC file Compare command, and what is used for is to compare two files for differences, and we can use it to quickly find any changes between a file. One useful way of using this is for, ah, long file. For example, let's say that we have all sorts of different output, but we know that one maybe just slightly different than the other,
05:10
and used the F C Command to compare them together and see where those differences are.
05:15
So let's go into you, my command prompt type door again and let's do F C.
05:20
I'll compare and file one and filed two.
05:27
And look at that. This is the difference between these files. This is the first text file here,
05:31
and it said this is the second text file here, and if we had a longer files, he would have only spit out the strings that were different on each file. So this is a very useful way to look through and make sure if the's files or different or the same or not.
05:48
All right. So post assessment,
05:50
which command displays messages to the prompt, is it? Aye, aye, Cackles be eco, See? Cat or D F. C.
06:00
Answer is B echo. The Echo command will display any message to the trump that you type in. So it's a very useful way in order to validate different types of output. Or if you're trying to sanitize data for different different commands,
06:15
the eye cackles command is used to change a seals. As we've learned, the cat command is not for Windows. That is for the clinics to see the contents of a file. And the FC Command is used to compare files together not to display messages to the prompt.
06:30
All right, so in this video willing, the Echo command again lend the eye cackles command and how we can use it In order to change file permissions for file. We understood the FC Command to compare two files together for differences and I hope to see you in the next video
Up Next