How to do it...

  1. Before starting to add new transports, we will use the transport command with the -h flag to display the help menu for the command:
  1. To list the current active transports, we can use the transport command with the list option:
meterpreter > transport listSession Expiry : @ 2017-11-23 16:11:07 ID Curr URL Comms T/O Retry Total Retry Wait-- ---- --- --------- ----------- ----------1 * tcp://192.168.216.5:4444 300 3600 10
  1. Adding new transports allows Metasploit to keep the sessions alive for longer. To add a new transport, we can use the transport command followed by the transport mechanism we are using:
meterpreter > transport ...

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.