Mastering the Metasploit CLI (MSFCLI)
In this recipe, we will explore the Metasploit CLI (MSFCLI). Metasploit requires the use of an interface in order to perform its tasks. The MSFCLI is such an interface. It is a good interface for learning Metasploit or testing/writing a new exploit. It also serves well in the case of using scripts and applying basic automation to tasks.
One major issue with using the MSFCLI is that you can only open one shell at a time. You will also notice that as we are exploring some of our commands it functions a bit slower and is a little more complicated than the MSFCONSOLE. Finally, you have to know the exact exploit that you would like to run in order to use the MSFCLI. This can make it a little difficult for new penetration testers who are not familiar with the Metasploit list of exploits.
Some commands for MSFCLI are:
msfcli
: This loads a list of all available exploits accessible to MSFCLImsfcli –h
: Displays the MSFCLI help filemsfcli [PATH TO EXPLOIT] [options...