How to do it...

We can find the available logging options using the show options command in msfconsole.

  1. To enable all console input and output, we need to set the ConsoleLogging option to true:
msf > set ConsoleLogging trueConsole logging is now enabled.ConsoleLogging => truemsf >
  1. Now every command typed will be logged in a file named console.log in the ~/.msf4/logs directory:
  1. Note that, when we interacted with a session, we neither saw the commands nor the output typed in the session. To enable session logging, we need to set the  SessionLogging ...

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.