Now in our challenge we were taking a look at finding abandoned UIDs and being able to create users with that UID as well to go through and create a way for us to be able to find information that may have been left over.
Now to do this I gave y'all an amended find command and I have it here in our terminal window and we're going to go ahead and run this.
Now you'll notice there's a lot of permission denied here and the reason for that is trying to go deeper into folders that don't necessarily allow regular users to see them.
But usually the top level folders do and I point this out because right here I'll highlight before I zoom in and we can see that 1013 Home Eric.
So there was a user on this system and it may be right now that there is a user on this system named Eric.
Remember to verify that we want to do a simple cat slash se password and we can see that that user does not exist because the last one that we have is 1001 dummy which we created earlier in this skill.
So at some point Eric was created on this particular system with a UID of 1013 and was deleted and you could go through that output and scour through and see if there are any other user IDs that don't match up to what's in our password folder here.
But that being said knowing the parameters of our challenge and we saw in there that Home Eric does exist that folder and contents there within do exist and don't have access to them from usually any user on the system.
Now yes root could be able to go through and do that but we're doing this to be able to familiarize ourselves with limited permissions when we break into a system.
So at this point we want to create a user and we're just going to sudo useradd-u1013 and we'll call this user Eric2.
Now I'm also going to set a password for Eric2 sudo password Eric2 and password password and then I'm going to log into the system as Eric2 so that way I can go in and see if I can access the contents of that folder and get the secret answer.
Now after I've logged in you can clearly see that I am Eric2 after running the whoami command and I'm just going to do a quick ls-home-eric and I can see that I have access to be able to at least list the directory and I'm going to get familiar with not being able to use the up arrow for a second.
ls-home-eric-desktop and I can see that there's a secret so let's cat that out real quick.
Now I cut myself off in the past before I accidentally revealed the answer but I wanted you to know that not only did I have to go through and create the user like you will but I went through and deleted the one that I created so that way you can do this challenge on your own and successfully gain access to the secret that is within the abandoned folder and file.
And like I said this is good information to know as you go forward and continue to test out those Linux file insecurities because some of this stuff is by default and can be leveraged to our advantage as we're going throughout and pen testing and trying to gain further access.
I hope this has been informative for you and I'd like to thank you for viewing.