Cleaning up the tracks
In this recipe we will use Metasploit to erase our tracks. Cleaning up after compromising a host is an extremely important step because you don't want to go through all of the trouble of gaining access only to get caught. Luckily for us, Metasploit has a way for us to clean up our tracks very easily.
Getting ready
To execute this recipe we will need the following:
A connection to the Internet or intranet
A compromised machine using the Metasploit framework is also required
How to do it...
The steps to be performed are as follows:
Let's begin the process of cleaning our tracks from a Meterpreter shell. You will have to use Metasploit to attack a host in order to gain a Meterpreter shell. You can use one of the recipes in Chapter 6, Exploiting Vulnerabilities, to gain access to a host using Metasploit. Once you have gained access to your victim using a Metasploit exploit with a Meterpreter payload, await for your Meterpreter prompt to display:
Next, we need to run the IRB in...