You can watch the full video with setup instructions on YouTube
How to prevent a BeEF Attack?
Disabling Java in your Browser is the best way to prevent this type of Java attack. You can enable Java on the trusted sites that require Java.
Change Security for Internet to High
Internet Options, Security, Security Level for this Zone, Adjust to High
Add Site to Trusted Site that need Java Support.
Allowed – Turn Off
Allow – Add sites that need Java Support
Toggle to False