The background command

While carrying out post-exploitation, we may run into a situation where we need to perform additional tasks, such as testing for a different exploit, or running a privilege escalation exploit. In such cases, we need to put our current Meterpreter session in the background. We can do this by issuing the background command, as shown in the following screenshot:

We can see in the preceding screenshot that we successfully managed to put our session in the background and re-interacted with the session using the sessions -i command followed by the session identifier, which is 1 in the case of the preceding screenshot.

Get Mastering Metasploit - 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.