stormshadow07 / BeeF-Over-Wan

Browser Exploitation Framework is a Open-source penetration testing tool that focuses on browser-based vulnerabilities .This Python Script does the changes Required to make hooked Linked Accessible Over WAN .So anyone can use this framework and Attack Over WAN without Port Forwarding [NGROK or any Localhost to Webhost Service Required ]
GNU General Public License v3.0
158 stars 90 forks source link

File Permission Errors When Running BeeF-Over-Wan.py #68

Open thedirtypeach opened 2 years ago

thedirtypeach commented 2 years ago

Hello all.

Here is the error I get when running BeeF-Over-Wan.py without sudo:

cp: cannot create regular file '/var/www/html/beef.html': Permission denied cp: cannot create regular file '/var/www/html/hook.js': Permission denied chmod: cannot access '/var/www/html/hook.js': No such file or directory

The program will still run, however, I cannot access the admin console. I assume this is due to not being able to create files within the following (and above) directory, "/var/www/html".

When I try running BeeFOverWan.py with sudo, I then get the below error:

┌──(kali㉿kali)-[~/Downloads/BeeF-Over-Wan] └─$ sudo python2 BeeFOverWan.py

Traceback (most recent call last): File "BeeFOverWan.py", line 8, in from termcolor import colored ImportError: No module named termcolor

I have installed termcolor: └─$ pip2 install termcolor DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Requirement already satisfied: termcolor in /home/kali/.local/lib/python2.7/site-packages (1.1.0)

thedirtypeach commented 2 years ago

I've also tried changing permissions in the following directory, "/var/www/html" with "chmod +rwx /var/www/html" but that didn't seem to do the trick.

Thanks in advance for any help!

thedirtypeach commented 2 years ago

I was able to fix the error mentioned above by doing the following:

Navigate to /var/www/html

Run the following command (this changes the permissions for users, hence the "o" before the "+rwx"): sudo chmod o+rwx /var/www/html

thedirtypeach commented 2 years ago

┌──(kali㉿kali)-[~] └─$ sudo netstat -tulpn | grep LISTEN [sudo] password for kali: tcp 0 0 0.0.0.0:8000 0.0.0.0: LISTEN 4404/python3
tcp 0 0 127.0.0.1:4040 0.0.0.0:
LISTEN 5278/ngrok
tcp6 0 0 :::80 :::* LISTEN 1630/apache2

Upon viewing the currently open ports on my system, I have discovered that the issue is the fact that port 3000 is never being opened/used. I don't believe that "BeeF-Over-Wan.py" application is configured properly as I am following all of the steps to get it running, and am receiving zero errors. Gentlemen, I just want to mess with my friends. Why must this be so complicated? :dagger: