Pivoting with Meterpreter
So far, Meterpreter has proven to be one of the most powerful tools for post-exploitation. In this recipe, we will cover another useful technique called pivoting. Let's begin with the recipe by first understanding the meaning of pivoting, why is it needed, and how Metasploit can be useful for pivoting.
Getting ready
Before starting with the recipe, let's first understand pivoting in detail. Pivoting refers to the method used by penetration testers which uses a compromised system to attack other systems on the same network. This is a multilayered attack in which we can even access areas of the network that are only available for local internal use, such as the intranet. Consider the scenario shown in the following diagram:
The attacker can compromise a web server that is connected to the internet. Then, the attacker uses the compromised server to access the internal network. This is a typical scenario that involves pivoting. In our lab, we use a dual home server to...