The final stage in every penetration test is cleaning up all that has been done during the testing process. For this reason, during a penetration test, you must keep track of all the payloads you may have dropped to disk and which modules you may need to clean up after you have run them.
Cleaning up
How to do it...
Take, for example, the Windows Manage Enable Remote Desktop post exploitation module; this module enables Remote Desktop Service (RDP), and as you can see from the following screenshot, it provides a Meterpreter resource file to revert the changes made to the target system.
After we have used RDP to access the target, collected evidence, or possible pivot to other targets, we should use the Meterpreter...