Logging can be very important when processing a large number of sessions and helpful when you are writing the penetration testing report and forgot to take notes while performing the test.
We can find the available logging options using the show options
command in msfconsole
.
msf > set ConsoleLogging true Console logging is now enabled. ConsoleLogging => true msf >
- Now every command typed will be logged in a file named
console.log
in the~/.msf4/logs
directory:
- 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
option totrue
:
msf > set SessionLogging true Session logging will be enabled for future sessions. SessionLogging => true msf >
- Each session log is saved in the
~/.msf4/logs/sessions
directory:
When trying to troubleshoot a problem...