Hello everyone and welcome back to Part 22 of my learned ethical hacking course.
In this part I'm going to discuss the directory commands within the motel.
I haven't discussed this and I think it's important for the next part because I already created it but
it didn't really make sense.
Throughout the course because I was talking about uploading and downloading files I originally had that
for Part 22 which I uploaded but now it's gone down because it doesn't make any sense.
And I showed you how to upload and execute in fact upload and execute files to the target computer.
But I need to go into more detail about the directory system.
So once you've got a connection on your rebase TGP yes or TTP I've got a connection going so I've already
created a payload of listen for a connection and I've executed the payload on the target computers at
the target computer in this case.
Is this Windows 10 virtual machine.
It's already on my local server and have downloaded the payload and execute it.
That's why I've got a connection.
So if you can't remember how to do this just go back and watch gaining full access with Mattel.
I think it's part when you're 19 not to show it will be in the description the link for it if you can't
remember how to actually set this up correctly.
Don't watch that if you don't know if you do great set everything code but now we can continue.
So once you first get a connection and you type system vote this just gives you basic information about
the computer.
So since we've basically unloaded the payload and the payload took control of the system we can manipulate
the directories.
So if you type P WD click enter as you can see this is the directory we're currently in.
This is because this is where the payload is basically stored and this is the direction we're in on
the computer.
You can manipulate this.
So if you type C D and let's say we want to go into the mall go into the user's directory first.
So you just type C E C D into somewhere.
Basically just go to this directory.
It's the C drive.
And then what you need to do is you need to take two forward slashes sorry to backslash us click enter.
It's important to have two black slashes because it won't work or there was like on the normal directories.
So if we go over to our target machine go to just the file explorer and we go to our desktop through
the C drive uses a user which is this user account desktop.
And if we go up to the the address bar here as you can see it's just go on backslash between each thing
but within maturity you need to.
So if I type Alice.
Now as you can see it's listing everything in the C drive.
So this is where we are currently in their computer.
As you can see this program files in 86 so if we go to a file explorer and the target machine currently
here as you can see it corresponds to each thing that we're looking at.
So we want to go into the user to so you can just type C.D. users click enter.
Now we're in use this type Alice to list everything in that directory.
There we go.
This is every user on their computer.
So this is very useful to know because if you target a computer and you don't know your way around the
directory because it could be completely different they could have completely separate folders and they
might not have a user's folder they might not have a windows folder that might not even have a C drive
everything might be stored on a f drive.
It's the same thing you can find your way around their computers directory and this is important for
the next part when uploading and downloading files because you can't actually go to the target's computer
and just you know go to the address bar in their file explorer and copy the directory it's not as easy
as that because you won't have access to the computers File Explorer so now we're in the users directory
as you can see here.
So let's just see deep into a user click enter and then what we want to do is we just want to go straight
to the desktop now you can type less I know I just want to get to the desktop so I just type C.D. desktop.
So if a type alas and it lists everything on their desktop.
So we go back to the computer.
This is the target well not you can see this this text file e eu L.A. And as you can see here it's right
there.
So now we're on the desktop and that's essentially the way around their computer.
So it's very basic you just need to know the less for list in the commands and then the C.D. you've
got to make sure when you're typing as well.
So when you first type the C.D. command you want to use two back.
You'll find out more about this when uploading and downloading files
so.
Right.
Well we'll do it now is will make a directory so you can there's two ways to do in this.
So you can just do it directly through the temperature by M.K. desire and then type the name of the
folder.
Now this creates a folder.
So it will say made with a terminal.
So M.K. desire made to a terminal and now because we're already in this directory of C users I use in
the desktop it will create this folder on the desktop because that's where we are currently to click
enter to create the directory so we go to the target machine as you can see there's a new folder on
the desktop made with terminal.
So that's a very basic thing to do with the make directory.
Essentially if you type desire it lists everything.
So it's the same as Alice now I'm gonna show you an execute command so I'm gonna talk more detail with
this in the next video.
I'm gonna show you how to upload download and execute files but I'll just show and execute now.
So once you get to a same point in their directory like on the desktop it doesn't matter where you can
execute the CND.
Now when you execute ACM D essentially will I don't want to say upload but you can execute their CMG
commands through your terminal so essentially you own the CMB it's like you just open and c MDA and
type in the same day commands.
Except they don't know that you're doing it.
So if you don't execute.
So this is just the execute command so don't worry I'll go into much more detail and execute upload
and download and the next part but we'll just type execute haven F because you need F to start every
execute command to list the name of the application that you want to execute.
So you type CMT the vaccine and then you want to type hyphen hate each hyphen ie with a lowercase i
the Hage is so it's hidden from the process because if I remove the hate then when we go to the target
machine it will actually open CND and the person is using this computer will see that CMG is just open
so we don't want to.
Which is why this command is so powerful as the base and won't even though see d open so execute haven
FSM date click enter and we'll execute C and D.
And now because we typed hyphen I would attach the process so automatically using CMT so as you can
see it's windows vision and this is what it looks like when you open CMT and if we go to the target
machine there's no evidence or trace of CMT being open.
So just scroll down you can see there's no CMT so close out of there.
So this person doesn't know the same DVD used and we're automatically in the C i.e. uses desktop directory
and it's because we were already in a through the metastasis section.
So depending on where you are with 10 percent it depends where it will open in the same day.
So we're already on the same date at the desktop through CMT.
Because if I type unless this is used in CMT commands now so this is Windows commands.
As you can see this is lists all the things on the desktop.
So there's the folder that we made.
You can do the same thing again.
So if I type M.K. desire which is the same command make directory and I'll say this is made with CMT
click enter and it will make the folder go back to our talking machine there we go.
We've got two folders now and this one is made with CMT so we're using this DMD so it might help improve
this because of the type help and weight as you can see these are CMT commands this task kill this make
link make diet rectory move these are all most of these like colour for example at the CMT command and
we're using this on a Kali machine through our terminal.
So this is why it's so powerful because now we essentially have CMT we have access to actually anything
we can upload files execute them upload ransom whereas execute them downloads certain files from their
desktop all of that will be in the next video.
So hopefully this just gave you a better understanding of how to work around the desktop.
If you're in the CMT command come unprompted on the terminal because now in the user's directory desktop
directory if you want to change out of it you can just type C D and then if you type C D then we go
to the desktop can type C D go back to the C drive C just type C and then type C colon click onto sorry
not C colon you need the type type CDC colon and then the backslash backslash click enter.
It's important to always have the backslash to back slashes together as you can see now to work because
they never.
So wherever it says here is where you on the directory and this is on the C.M. D1 not the metal splitter.
So let's type alas no this will spam a lot because we're in the C drive they become a go program files
again and we can make directories delete directories etc. so we can essentially destroy the machine
by delete system 32 now if you wanted to exit out of this you just take exit because we're inside the
CMT terminal.
So we want to exit out of that and get back to Mr. Blitzer she just type exit and there we go back to
the tape.
So now if we type alas as you can see we're still on the desktop even though we changed in the CRM D
to the C drive was still in the material secession basically in the mid tape it's a window was still
in on the desktop.
So think of the same day and then the present as two separate command terminals but the only thing is
is when you start with the interpreter and you locate her directory and then open the CMT by executing
it then it will open in that directory which I showed you before just to go over one last time when
we before we opened or executed CMT.
As you can see here we were already in this directory and that's why when we typed alas it's because
we was in the same directory again there.
So hopefully you understand that you can just type exit to out of it.
Now we're back in a bit separate secession types this program and you're back to the start so hopefully
that gives you a better understanding of how the directories work and how you can execute the same to
get better commands.
So that's it for this video if it did help please leave like comments if you stuck with anything.
I'll be happy to help subscribe for future content and I will see you all in the next video.