beefproject / beef

The Browser Exploitation Framework Project
https://beefproject.com
9.84k stars 2.18k forks source link

Connection to Metasploit backend failed. #279

Closed passbe closed 12 years ago

passbe commented 12 years ago

What steps will reproduce the problem?

  1. Configured BeEF.rc in the install directory of metaspoilt
  2. Configured Config.yaml to enable metaspoilt with the host and callback_host information to point to the metaspoilt credentials
  3. Running ruby beef throws the following errors : [ 7:51:57][!] Connection to Metasploit backend failed. [ 7:51:57][!] Could not authenticate to Metasploit xmlrpc.

What is the expected output? What do you see instead? MSF integration should be successful

What version/revision of the product are you using? On what browser? On what operating system? Beef 0.4.2.7-alpha , Ubuntu

Please provide any additional information and screen shots below. Config.yaml : metasploit: enable: true host: "127.0.0.1" url-path: "/RPC2" port: 55553 user: "msf" pass: "xxxxx" callback_host: "192.168.141.138" autopwn_url: "autopwn"

BeEF.rc File : $ cat BeEF.rc load xmlrpc ServerHost=192.168.141.138 PASS=xxxxx ServerType=Web



Google Code Issue: http://code.google.com/p/beef/issues/detail?id=527

passbe commented 12 years ago

metasplo...@gmail.com on September 28, 2011 18:24:09:

into the beef.rc file set the serverhost=localhost and the in beef/extensions/metasploit/config.yaml set the into this config.yaml host=localhost and the callback_host=localhost work this???

metasploit and beef on the same computer or metasploit installed?

Google Code Comment: http://code.google.com/p/beef/issues/detail?id=527#c1

passbe commented 12 years ago

metasplo...@gmail.com on September 28, 2011 18:24:51:

on my machine it works:)

Metasploit:~/beef sudo ./beef [20:17:58][] Browser Exploitation Framework (BeEF) [20:17:58] | Version 0.4.2.10-alpha [20:17:58] | Site http://beefproject.com [20:17:58] |_ Run 'svn update' to update to the latest revision. [20:17:58][] BeEF server starting... [20:17:58][] Successful connection with Metasploit. [20:18:02][] Loaded 159 Metasploit exploits. [20:18:02][] BeEF is loading. Wait a few seconds... [20:18:05][] 10 extensions loaded: [20:18:05] | XSSRays [20:18:05] | Requester [20:18:05] | Proxy [20:18:05] | Metasploit [20:18:05] | Initialization [20:18:05] | Events [20:18:05] | Demos [20:18:05] | Console [20:18:05] | Autoloader [20:18:05] | Admin UI [20:18:05][] 202 modules enabled. [20:18:05][] 5 network interfaces were detected. [20:18:05][+] running on network interface: ::1 [20:18:05] | Hook URL: http://::1:3000/hook.js [20:18:05] | UI URL: http://::1:3000/ui/panel [20:18:05][+] running on network interface: 192.168.235.1 [20:18:05] | Hook URL: http://192.168.235.1:3000/hook.js [20:18:05] | UI URL: http://192.168.235.1:3000/ui/panel [20:18:05][+] running on network interface: 192.168.229.1 [20:18:05] | Hook URL: http://192.168.229.1:3000/hook.js [20:18:05] | UI URL: http://192.168.229.1:3000/ui/panel [20:18:05][+] running on network interface: 192.168.1.3 [20:18:05] | Hook URL: http://192.168.1.3:3000/hook.js [20:18:05] | UI URL: http://192.168.1.3:3000/ui/panel [20:18:05][+] running on network interface: 127.0.0.1 [20:18:05] | Hook URL: http://127.0.0.1:3000/hook.js [20:18:05] | UI URL: http://127.0.0.1:3000/ui/panel [20:18:05][+] HTTP Proxy: http://127.0.0.1:6789 [20:18:05][*] BeEF server started (press control+c to stop)

Google Code Comment: http://code.google.com/p/beef/issues/detail?id=527#c2

passbe commented 12 years ago

aravinda...@gmail.com on September 29, 2011 06:04:19:

yes, beef and metaspoilt are on the same system (virtual machine) version - metasploit v3.4.2-dev , beef 0.4.2.7-alpha.

Have the same issue even after changing the settings to "localhost" in the beef.rc and config.yaml files.



Google Code Comment: http://code.google.com/p/beef/issues/detail?id=527#c3

passbe commented 12 years ago

metasplo...@gmail.com on September 29, 2011 18:07:32:

if you update beef 0.4.2.7 to beef 0.4.2.10 and work it?

you run old version beef!

Google Code Comment: http://code.google.com/p/beef/issues/detail?id=527#c4

passbe commented 12 years ago

metasplo...@gmail.com on September 29, 2011 18:09:50:

you run metasploit with the msfconsole -r beef.rc command? put beef.rc file into msf3 map!

Google Code Comment: http://code.google.com/p/beef/issues/detail?id=527#c5

passbe commented 12 years ago

metasplo...@gmail.com on September 29, 2011 18:10:28:

show me your commands and the outputs? can you do that for me?

Google Code Comment: http://code.google.com/p/beef/issues/detail?id=527#c6

passbe commented 12 years ago

A.M.Saafan on October 11, 2011 09:22:54:

In config.yaml for the metasploit extension, can you change the host to your local IP address instead of 127.0.0.1?

Config.yaml : metasploit: enable: true host: "<your IP instead of 127.0.0.1> "

Google Code Comment: http://code.google.com/p/beef/issues/detail?id=527#c8

passbe commented 12 years ago

A.M.Saafan on October 25, 2011 13:12:27:

The connection is working for me. I could reproduce the issue, but it works fine when I change "127.0.0.1" to the internal IP as described above.

Google Code Comment: http://code.google.com/p/beef/issues/detail?id=527#c10