good morning everyone and welcome back to another session um today we're going to finish up 3. 1. 2 Access Control we finished the last session with uh up to step 17 where you're supposed to work on um the last couple of files with that scenario that we have if you look 17 was a security scenario that I asked you to go ahead and do on your own So today we're going to go ahead it's a short one we're going to continue on with step 18 talk about hidden files and grep and that's how we wrap up this particular activity so a couple of things to note here before we start I didn't talk about this last time but if you see a little dot dot dot right there that dot dot just means that there's going to be something after the ls don't worry about it don't type in the dot dot dot so that's something that you should probably know as well all right so let's go ahead and begin so I'm going to jump over here to our shell our virtual server here and click on connections and then we're going to go back into Alpha and now we're back into Alpha let's go ahead and close this let's open up this let's get this totally out and now they want us to go ahead and return to the home directory because we're starting off fresh we're already in the home directory and execute a list command so they want us to do CD just to make sure let's do CD and if you're continuing on this from before this is good because you'll hit CD against the home then you're going to type in LS and there's your list and then what they want us to do is they want us to do an LS space Dash a now the dash a stands for all and this is going to show us not just the files that we see here but it'll also show us anything that might be hidden so let's see what happens when we do this oh look at all that so you will notice that now we have a bunch of things in there there's a bunch of batch history bash logouts bash HRC batch Origins those are all hidden files all right you have the less sht is a hidden file the profile is the hidden file and you'll notice something in common with all of them right they all have this little dot in front of them that's why they're called dot files and I talk a little bit about how this works dot files are normally hidden from the average user so basically these files are typically tend to be files that are used more in the Linux or the shell or the the program itself so like when you look at bash history bash logout bash at RC bash origin that is actually stuff that's running in the background that's why they hide it they don't want you to know what those are the profile is probably the profile that was created for Alpha at pltw so that's why that's hidden and and that's what you're seeing right now okay now when you combine the ls Flags this is what says 19 when you combine LS flags and the dash a and the dash L you'll see a long listing of all of these files using these files you can view the downloads directly and then execute one of the dot files okay so we're going to do this this is Step 19.
so we're gonna do LS space Dash L A now they combine this when they did Dash l no they could have done Dash L Dash a they combine these two here and we're going to do this to see downloads we're actually going to get into the downloads file and you will notice this is a list of all of the things that are in there and now you're seeing a list similar to what you see if you were looking at a file explorer in in Windows all right you'll notice that you have your read write capabilities right here who's the group who's the owner who's the group what the file size is what the the year is and um sorry the modify and then your file names now they want us to go ahead and type in downloads and then they went forward slash dot ghost to execute a DOT file it does have a note here that you could have changed the directories to downloads but you don't need to that's why we're just going right in taking a look and it says Boop that's what's inside ghost okay so that's how you work with hidden files and again this is pretty straightforward there's nothing really to it they've just added two things they added the dash a which is to show us all the files including the hidden files and they combine the dash L and the dash 80 goes to dash La so we can see the hidden files and all of the permissions that's really all they did in this whole section right here all right the next section is the encryption section so litispace operating systems use it for an encryption commands one of the most secure is the gpg all right so let's take a look at this we're going to change the directories to our info so we got to look at our info so I'm going to do the CD get back up to this and then I'm going to do let's go ahead and CD info right we're going to get an info and we are in now info we've got email addresses in there right so what they want us to do in Step 21 is they want us to issue the gpg command now what is this gpg command it says that the gnu open source tool so it's a tool freely available anybody but basically it's a privacy card and it allows it it's an encryption program that's really what it is so what's going to happen is when I type in gpg dash C which means create email addresses it's going to tell me to take it this email address create a new file called email addresses and encrypt it and that is what we're going to do so we're going to type in gpg space Dash C email underscore addresses and now when I do this can open email addresses no such file symmetric encryption email address failed open air this is good so what did I do wrong all righty something happened let's take a look so did I do something wrong GP G space Dash C e oh it's because I put an S in there it's it's looking for email addresses and I typed in emails addresses so obviously you can see here it's looking for the the the current file email addresses but there's no such file that's what they're saying so now that I've typed it correctly it should work so let's go ahead and do that there you go now it enters a passphrase it wants us to do something simple so I'm going to do something simple right now I'm going to just type in pltw all lowercase just so I can remember it p l p w notice how the cursor does not move when I'm doing this this is going to screw some people up in Linux when you're typing in your passphrases or when they're asking to enter a phrase it's not going to show little dots or dashes or hyphens or anything like that it's just going to sit there and you're thinking you're doing something wrong or it's frozen up it's not frozen up that's the way passwords work all right so I typed in pltw and then I'm going to hit enter repeat passphrase knows how it changed so here we go and there we are now when I type in LS you will notice that now I have two files there I have email addresses and email addresses dot gpg all right so now what you do here is if you've encrypted email addresses you've done this for a reason so in this particular case there's no need to keep the email addresses so let's remove that okay so RM email address addresses now this one when I do this will get rid of the first one not the one with the gpg so now if I do the ls you'll notice that that's the only one that is still in there and now we have gotten rid of anything that somebody could maliciously use and we have taken it encrypted it so it's still there all the email addresses are still there they're just now encrypted okay and that's what they're asking you to do this is after step 22 at this point you can see we're at the home stretch right now so now they want us to use the cat command to try to do this so let's try this chat email underscore addresses now remember what the cat command does what does cat command do shows us the contents of the file right so technically if I do this it should give me a list of all my email addresses oh boy there it is okay so you will notice that this gives us a bunch of goofiness now this is something that I'm going to ask you to go ahead and take a picture of all right so when you look at this this is something that we want to see this is an encrypted file so you'll notice that this is your email addresses that's encrypted this is exactly what it looks like when you try to open that file all right and now we've got to go ahead and get back out of there let's go and now they want us to try on step 24 to use the gpg with a space a space Dash D command which is decrypt so now we're going to decrypt this file so gpg space and dash oops Dash D now you have to you can't just put this if you put this this is saying okay I want you to decrypt the gpg file go well what if there's more than one file it's going to give you an error because it's going to be looking for the source so let's go ahead and type in the source which is email underscore addresses dot gpg it should if I did this right there you go cast five encrypted data enter passphrase so this is going to ask me for my passphrase so here we go and now you can see what's inside the file this file contains email addresses using for outgoing email any local part here will be qualified by the system domain as you contain the lines of the Forum user one two three four five all right so that is gpg right there and using the gpg file which is to encrypt and decrypt remember that to encrypt a file you need the dash C to create it and to decrypt it you need the Dash D make sure you get those in your notes because you're going to need those a little bit later on and this is a good picture to show in fact I probably would have put a space if I was doing this and I was using those for notes I probably would have put a space somewhere after this line and then separate the two and then just draw an arrow so one thing you can do is you can just take this and I'm going to show you what I would do if I was doing this I would go ahead with a new snippet sketch I would go ahead and create this like here like that and then I would just basically create something here with some kind of of pen ballpoint pen let's make sure it's white and I would put something like this and put an encrypted file right here this is encrypted and then this stuff here is decrypted okay just so you have this in your notes you can see what an encrypt file and a decrypted file looks like Okay so all right so that's it and then it says right there at the end of this step 25 go ahead and close this close this up and you will notice that at step 25 they asked for another security scenario they're going to actually have you from a valid site consider this scenario and I'm going to have you guys do that one on your own as well all right and that goes that's it that's all we have for 3. 1.