Naming conventions
In a sizeable penetration test scenario, we may have a large number of systems and Meterpreter shells. In such cases, it is better to name all the shells for easy identification. Consider the following scenario:
Figure 12.9 – Listing sessions with the sessions command
We can name a shell using the -n switch with the sessions command. Let's issue sessions -i 1 -n "Initial Access Shell on Windows" and sessions -i 2 -n "Upgraded Meterpreter on Windows", as shown in the following screenshot:
Figure 12.10 – Renaming sessions in Metasploit
The naming seems better and easier to remember, as we can see in the preceding screenshot.
I often forget the LHOST value or the workspace I am currently working with. Well, we can make use of the Metasploit prompt in such a way that we will never forget such details. Let's learn how to do this in the next section.