Pivoting with meterpreter
So far, we have covered most of the major meterpreter commands and script. You must have noticed how powerful meterpreter can be during post exploitation phase. In this recipe, we will discuss one of the coolest and my favorite concept called pivoting. Let us begin with the recipe by first understanding the meaning of pivoting, why is it needed and at last how can Metasploit be useful for pivoting.
Getting ready
Before starting with the recipe, let us first understand pivoting in detail. Pivoting refers to the method used by penetration testers that uses a compromised system to attack other systems on the same network. This is a multi-layered attack in which we can access even those areas of the network which are only available for local internal use such as the intranet. Consider the scenario shown in the following diagram.
The attacker can compromise the outside nodes of a network which are connected to the Internet. These nodes are then connected with a firewall...