Once we have successfully hooked a browser, we are ready to use BeEF to exploit it. This recipe covers how we can use some basic BeEF commands to collect information and exploit a victim's browser.
Collecting information with BeEF
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 filesystem using a text editor, such as Vim or GNU nano. For more information on how to write scripts, refer to the Using text...