beefproject / beef

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

'This site can’t be reached' outside vm #2309

Closed Prohecker closed 2 years ago

Prohecker commented 2 years ago

Summary

Q: Please provide a brief summary of the issue that you experienced. A: Hi, I am a beginner in these things so pls forgive and rectify me in case of any mistakes. The prob I am facing is that I cant access the beef hook website outside the vm. I am Using Kali Linux as the host OS in Oracle VirtualBox. Windows and my ipad for the hook os. The browser of the host is Firefox, for the windows machine it is Opera GX and for the ipad it is Safari. My issue is that if I try to hook a browser outside the VM it is not working. The error is showing the site cant be reached. So pls help me. I reffered to multiple issues I found the prob multiple times but no correct answer was given. Again I request pls help me

Environment

Please identify the environment in which your issue occurred.

  1. BeEF Version: - 0.5.4.0-pre

  2. Ruby Version: - 2.5

  3. Browser Details (e.g. Chrome v81.0): - Firefox

  4. Operating System (e.g. OSX Catalina): - Kali Linux

Configuration

Q: Have you made any changes to your BeEF configuration? A: - Yup only changed the debug and client_debug to true as instructed by the beginning of the post.

Q: Have you enabled or disabled any BeEF extensions? A: No

Expected vs. Actual Behaviour

Expected Behaviour:
It should load into the hook page Actual Behaviour:
It does not load instead gives the error for the site cant be reached

Steps to Reproduce

Please provide steps to reproduce this issue.

  1. I dunno how to do dis

Additional Information

image_2022-02-21_102206 This is the log file: log.txt

Prohecker commented 2 years ago

A quick help wud be really appreciated

bcoles commented 2 years ago

I reffered to multiple issues I found the prob multiple times but no correct answer was given.

The correct answer has been given dozens of times. Your question relates to network routing.

If you want to access network services running in a VM from your LAN, you will need to bridge the VM network adapter.

If you want to access network services running in a VM from the Internet, you will need to bridge the VM network adapter, then forward a port from your router.

Prohecker commented 2 years ago

As I told u bfore I am a beginner in all of this. So how to do all da things u mentioned up??

bcoles commented 2 years ago

As I told u bfore I am a beginner in all of this. So how to do all da things u mentioned up??

In the screenshot you show attempting to access 127.0.0.1. This is the local loopback network interface. Try using the LAN interface. This should allow you to access BeEF from the host operating system and other virtual machines in the virtual LAN.

If you want to access BeEF from other hosts in the LAN you'll need to bridge the network adapter in the virtual machine then restart BeEF.

These may help:

Prohecker commented 2 years ago

My VM is now connected to the bridge network but after that in the first link I didnt understand anything. Like the things they did in the terminal

bcoles commented 2 years ago

My VM is now connected to the bridge network

Now that the virtual machine network adapter is bridged you should be able to reach the BeEF server from other hosts on your LAN.

Prohecker commented 2 years ago

I actually cant The same error is being shown

DeezyE commented 2 years ago

@Prohecker I've written a post outline some steps you might take, it's just a draft at the moment but you are welcome to follow it if you like: https://medium.com/@beefproject/installing-and-using-beef-on-kali-linux-2021-e6dde1c0283b

theverygoodwebsite commented 2 years ago

I also have the same problem

DeezyE commented 2 years ago

closing due to inactivity. Reopen if necessary

Prohecker commented 2 years ago

Hi I know this was closed for many days as I had exams and all. After many days I reopened virtualbox and need help with this problem

Bot25692 commented 1 year ago

same here

bcoles commented 1 year ago

https://github.com/beefproject/beef/wiki/Using-BeEF-With-NGROK https://github.com/beefproject/beef/wiki/FAQ#how-do-i-configure-beef-on-a-server-behind-nat