I tried connecting to a windows box and create a reverse shell back to my Kali Linux machine. Reverse shell is created and I get the meterpreter prompt. Commands Used:

Payload: windows/shell/reverse_tcp

Encryption: x86/shikata_ga_nai

Handler: exploit/multi/handler

Once the session is created I'm able to run commands like "pwd", "ls" etc. but not able to run commands like "python" or "nmap.exe". These commands cannot be used even when the corresponding executables are in the same working directory. Trying these commands end in "Unknown Command:"

Will I be able to run these applications using rever shell, or should I use some other payload to achieve this?

enter image description here

  • Does it work if you type shell first?
    – Joe
    May 11, 2018 at 7:31

1 Answer 1


Meterpreter session allows you to perform a wide range of post exploitation activities. Those activities are either performed through the built-in commands or through post exploitation modules. Type help on the meterpreter session and you can see all the built-in commands in the stdapi plugin that is loaded by default. If you want to load another plugin, you can use the load <plugin name> command such as load kiwi and it will load the mimikatz plugin of meterpreter.

In other to perform port scan of the target network on which you have got the session, first create a route through the session and then use a module which has the capability to tunnel the traffic through the connected session. e.g.

meterpreter > route add 1
meterpreter > use auxiliary/scanner/portscan/tcp
meterpreter (tcp) > set RHOSTS
meterpreter (tcp) > set THREADS 15
meterpreter (tcp) > run

If will scan the target network while route all the traffic through the session ID 1 that is specified in the route command at the end.

Take a look at https://www.sans.org/reading-room/whitepapers/testing/post-exploitation-metasploit-pivot-port-33909 for further details.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .