1、需要apache支持
$ sudo systemctl start apache2
$ sudo systemctl enable apache2
2、打开Beef-xss
初始需要安装:
$ beef-xss
会提示是否安装
3、登录地址
http://127.0.0.1:3000/ui/panel 默认账户密码:beef/beef 可以再配置文件里修改
4、添加Metasploit插件
1、关闭Beff和Metasploit
2、─$ cd /usr/share/beef-xss
└─$ sudo vim config.yaml
metasploit
enable:false----->true
3、转root权限
└─# cd extensions/metasploit
# vim config.yaml
metasploit
enable:false----->true
{os: 'kali', path: '/usr/share/metasploit-framework/'},
{os: 'custom', path: '/usr/share/metasploit-framework/'}
记住:
user: "msf" pass: "abc123"
4、└─# ln -s /usr/share/beef-xss/core /var/lib/beef-xss/core
###否则报错提示你没有找到“/var/lib/beef-xss/core/main/router/router.rb
”
5、─# systemctl restart postgresql.service
6、└─# msfconsole
7、msf6 > load msgrpc ServerHost=127.0.0.1 Pass=abc123 SSL=y
[*] MSGRPC Service: 127.0.0.1:55552 (SSL)
[*] MSGRPC Username: msf
[*] MSGRPC Password: abc123
[*] Successfully loaded plugin: msgrpc
8、另开窗口
─# cd /usr/share/beef-xss
─# ./beef
9、等待加载完成
10、打开登录界面
http://IP:3000/ui/panel