Understanding the Meterpreter filesystem commands
In this recipe, we will move on to filesystem commands. These commands can be helpful in exploring the target system to perform various tasks, such as searching for files, downloading files, and changing the directory. You will notice how easy it is to control the target machine using Meterpreter. So, let's start working with some of the useful filesystem commands.
How to do it...
- We will start with the simple
pwd
command, which lists our present working directory on the target machine. Similarly, we can use thecd
command to change our working directory to our preferred location:
meterpreter > pwd C:\Windows\system32 meterpreter > cd \ meterpreter > pwd C:\
As you can see, we first listed our working directory using the pwd
command and then changed our working directory to C:
by using the cd
command. We can also use the ls
command to list the available files in the current directory.
- Now that we can work with directories, our next task...