We know now that BeEF is a great framework for exploiting the browser and that Metasploit is a great framework for exploiting a host. In this recipe, we'll see how we can use BeEF and Metasploit together. After hooking a browser with BeEF, we redirect the victim's browser to an executable that creates a reverse shell.
Integrating BeEF and Metasploit
Getting ready
BeEF comes preinstalled on Kali Linux. In the examples provided, an instance of Metasploitable2 is used to demonstrate hooking a browser via XSS. For more information on how to set up systems in a local lab environment, refer to the Installing Metasploitable2 and Installing Windows Server recipes in Chapter 1, Getting Started. Additionally, this section will require a script to be written to the...