We have now seen some of the power of BeEF. Wouldn't it be great if we could automate some of that power? With the BeEF autorule engine, we can do just that. As an example, it would be great to create a persistent connection automatically with our victim as soon as the browser is hooked. This recipe looks into this and some other ideas.
Using the BeEF autorule engine
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...