How to do it...

  1. To start creating channels, we will use the –f operator with the execute command:
meterpreter > execute -f notepad.exe -cProcess 3128 created.Channel 1 created.

Notice the use of different parameters. The –f parameter is used for setting up an executable command, and the –c operator is used to set up a channelized I/O.

  1. Now, we can run the execute command again to start another channel without terminating the current channel:
meterpreter > execute -f cmd.exe -cProcess 3348 created.Channel 2 created.meterpreter > execute -f mspaint.exe -cProcess 3359 created.Channel 3 created.

We now have three different channels running simultaneously on the victim machine. To list the available channels, we can use the channel –l command. ...

Get Metasploit Penetration Testing Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.