Hello, everybody. Welcome to the upset number two of the SCP cars.
Ah, the basically next comments. My name is Alejandro Ginia, and I'll be your instructor for today's session.
Ah, the learning operatives of these laugh is t understand the basics at the Lenox Kamins be able to identify and use commands to search files and be able to identify and use commands to take action over those files.
So let's get down to business, shall we? Um,
first, uh, well, uh, Lennox has some kind of database where all the files are located. I mean, um, baths and names and extensions. I said we first have to use the update Devi command
and these command will again go to all the paths and files and locations of the Lennox.
But the file system and they will update on location, the names, the extension. So you can later Ah, search those files
in that matter. This will take a while. I mean, if it's the first time you use the command, don't freak out if it takes a long time, because it is again going through the tire file system and looking for all the names and you know, put it in a kind of database.
So you can later searching that
So I will not execute a command. But that's a simple is that you can,
commands on and, you know, options that you can use with this command. For example, may dash f dash And that she, you know, everything you can use is actually in demand page, which is you know, man, it's just assured for manual. So, um,
you can search for all that. Um, so let's say that you execute that command, and then you're good to go. Uh, then we can We will use that lucky eight command, which is basically used to locate some files. You know, for example, locate, uh
dot t x t as I don't have, You know,
it gets gifts minutes. It's actually has the world war and has a t t x t. As you can see, it will go to everything, and you can yell out wire cars and everything. You can just put it here and it will search for all the extensions. But
let's get, you know, a little bit more specific. For example,
um, you want to example, let me just give you examples of the of the options you can use. For example, you can locate and print the number or count off match it interests in there. But for example, let's use the same word that the X t,
for example, okay, minus C which is, you know,
on. And that's a ward that t x t,
for example. It says that it contains what file with one hit, and it's because it actually it's one hit,
as you can see there, um,
this is there will be much more usefully. For example, we
ah, we can see that we have a several entries with a D X T exchange in, but for example, maybe you want to, um, search with pages that you have.
So as you can see, we have several documents hitting that criteria that could be special, especially useful when you're trying to see how many pie tin commands fightin
scripts. You have, for example, sorry about that.
Ah, we have several python commands and, you know, as you, uh, need to find any other I mean, just taking my using the wild card here. But for example, I want to see you won't find any command any any Piketon containing award. You know, work
seven hits. I'm sorry. 27 hits
for something, for example, Past sword dot Pai Tun.
So that's a really useful man. Another one is. You know, maybe, um, you want to ignore the case Distinctions? Because a dan, maybe you want to, um maybe search for this with
with the P. You know, you don't You don't care if the P is in upper cases on lower cases,
so you can use that dash e, um,
War the pi ton. And you know
it will locate whether he has
ah later capital letter or upper upper case. Later,
it will learn about her. So
how to be with information about the look a database, for example, locate
and you can see how May directories has how many files? Um,
it's a huge database again.
And, you know, other useful. How to search for an exact final ing east and locate, for example, remember that we even put locate ward that
t x t. It says that it contains one because at the end it has the word the 60 right here. But what happens if I actually
word that t X t entry. I forgot about this.
It actually doesn't. It doesn't I don't have any foul, uh, being named specifically Ward that t x t. Because at the end again, I don't have one. But what happens if I pick? Um
password that t X t. And he actually returns the fire
so we can have several others, for example. Remember when we want to count How many files we have? Name Word that heightened. I'm sorry
with the minus c for count and says 27 for example. What happens? He fight,
I have several files. But what happens if I want to leave me That, um What? The search actually returns to require number to avoid redundancy and to search results. You know, more specifically, you can use that minus AM, for example. Again,
let's stay away to sea.
and I just get the 1st 20 results for the for everything that is, you know, with a pipe and extension that's really useful when you're actually trying to actually get to the first files or the first you know, hits where you can imbue If you combine this with maybe, um there
the minus. I'm sorry. The miners are to search for specific files. Maybe that that will be helpful for you to look for any specific filed 21
Ah, let's switch to our more. You know, I don't want to say useful, but you can use more capabilities with the witch command. Um, the, you know, limits Which man is used for to find the location off a program? Um, theory off problems she'll run from that. You know,
folder, but in reality, this is not the case. But, you know, let's get into the for example. I just can't put here burps, right? For example, Worse. We'll set it for him later in the cars is really helpful approx program.
So, as you can see is actually in the US are being embarks. It,
you know, you can even add moment for Temple Hydro. She said I really help buzzword tool. Um,
you can run several. You know another clan, Jon, For possible cracking everything. As you can see, some of them run from the U S are being and some of them from the ears are s been, um,
You can get you know, the wish for him to show all the places that program is install using the following commands
which dash a ah, which, um,
it will again print everything. Every location off off where the program miss. As you can see, we have ah, has been years are as being John and has been John,
um, for example, wine. It's just do the exercise was wine, which is just ah problem to execute Lennox executed bols in the in the Kali environment. Um, that doesn't mean that John or wine is willing stall into places.
Um, for example, this just run this command to show what I'm talking about.
As you can see, this little iro right here, um,
is you know, this is a symbolic link on in reality. Just points to the location of the real program. You can have a late using the worries command instead of that which this can be used for, you know, looking at buying Aries of the program, the source code and the problem in the manual pages of the program, if you can simply, you know,
type. Word is John, for example.
you will see more information about it.
Eso basically which in worries you can use a combination of both files or both. Command some. Sorry to actually locate any
Ah, but you know the crowned. I guess a crown program of this look look, to locate files is the fine command. Um,
this file. You know, this command we find, um, well, list and find out the fire with the current directory as well as any other subdirectories in the current directory. I know it sounds a little bit like the same, but let me just give you an example. For example,
uh, for example, how about, um,
documents and, I don't know,
starting Caesar's some files in there, but, you know, you know, you can search fast by their name. You can use fine,
you know, find from the root directory minus name.
And for example, start that Pai Tun.
And you know, it will take a while ago. I actually put it in the entire directory, but you can see it actually gives me two results. So this is way more complete that the other, um,
commands that I showed you. For example, I don't wanna
This will take a lot of results, but let's see what happens.
Oh, my God. Says you can see defined and help Hope helpful thing about this is that you can actually, uh, limit you several for something. Let me just
He contains several options you can use. Weigh more than which and locate you can use for. Actually find for a search for files and programs as well. Let me just give you an example of a really interesting
Um, and I want to go on Lee to directories in depth. So maxed that
up to minus name and everything. It's actually I'm sorry. Everything that contains pi times crippled. You know what? It's shame. Well,
it doesn't have anything.
Offices. What happens if I put four? Okay, so in Ford, as you see one too
now in fort on directors depth, I can actually locate some HTML files. So it is a really powerful tool for simple you can use to find files with specific permissions using the purring option with, You know, let me just type the client right here for some fine
file, whatever. And term,
This is especially useful, and we'll see it later in in the pen testing course this especially useful to exploit avalanche ability, recall sticky bit. Some miss configurations over the permissions on the files can lead you to escalate privileges. So this is just
really useful way to find files to, you know, get this ticket, for example.
You can and you can do way more than that. For example, fine files that have been access it in the last 10 days. For example, the last 50 days? I don't know. So would pi Phi type. Fine.
Um, minus eight. Time.
And this will print files that again has been access it in the last 50 days.
Says you can see, for example, you can find files by sides. Um, just
size on, I don't know. 50.
and it will print all the files that you know,
um, you can find files in ranges and everything,
but the point is that you can use this commands to actually find any type files you won.
So just to finish, um,
you know, pass assessment questions. What tasks is performed by the locate command? Well, you know, look, a command. It will find any. Ah, file
that us, specify or, you know, extensions and everything.
What is performed by the other day become in it, will, you know, go through the entire file system and see where are the promise programs located and updated the database for those files. What task is performed by the, which minus Aikman. I will give you some time to think about it.
What do we say? That that minus a did
minus eight options did to day. Which command? What? Uh, this command is to show all the place is a pro or missing cell again. Uses the minus eight man.
Uh, in this life we discuss what is the update Devi command used for? What is the luck it command use for was the witch command used for and finally, what is defined command use for,
Ah, supplemental materials. I
recommend you to go to this web page over the wire wargames. These guys have really cool platform where you can practice all the commands are the bash commands you can use in linens way more than these four commands that I just showed you
looking forward in the next video we'll cover The basic service is you can use ink, Ali. Well, that's it for today, folks. Thank you for watching, and I hope to see you soon.