Unable to install MITMf in Kali Linux — something to do with python and pip version 3 compatibilty

So i decided to install the MITMf (Man-In-The-Middle Framework) https://github.com/byt3bl33d3r/MITMf for Kali, but even after following the exact steps in the installation guide, i keep coming back to a error that I think has to do with Python 2.7’s end of life. When I run mitmf.py using the latest version of Python(3.8), i get SyntaxErrors. But when I run it with Python2/2.7, I get ImportErrors, which i am unsure of how to fix. I tried exporting the python modules to my .bashrc, but I don’t think I did it the right way. Here are some errors that i get when using Python2/2.7 :

  File "mitmf.py", line 29, in <module>     import core.responder.settings as settings   File "/home/kali/MITMf/core/responder/settings.py", line 24, in <module>     from core.configwatcher import ConfigWatcher   File "/home/kali/MITMf/core/configwatcher.py", line 20, in <module>     import pyinotify ImportError: No module named pyinotify 

And here is the simple syntax error when i use Python3.8:

File "../mitmf.py", line 38     print get_banner()           ^ SyntaxError: invalid syntax 

I do know Python3, but not enought to convert the whole program. I tried using 2to3 https://docs.python.org/2/library/2to3.html but it didn’t work quite right. What can i do?

MITMF Is not connecting Metasploit (HTTP Injection)

I am attempting to inject malicious payload into http request. I own a personal lamp server, a Kali VM and a the most WindowsXP VM imaginable. and everything is on my network and legal. I have been following this tutorial.

I ran metasploit with the following

use exploit/multi/handler set PAYLOAD windows/meterpreter/reverse_tcp set LHOST set LPORT 8843 exploit -j 

When watching the video, Metasploit says

[*] Starting the payload handler... 

On my end, it starts by saying that, then brings me back to the console. Odd, but whatever I guess.

Now I am trying to run mitmf in a different terminal window

sudo ./mitmf.py --spoof --arp -i eth0 --gateway --target --filepwn 

Now this is the error message I am receiving from mitmf.

    [*] MITMf v0.9.8 - 'The Dark Side' | |_ Net-Creds v1.0 online |_ Spoof v0.6 |  |_ ARP spoofing enabled |_ FilePwn v0.3 |  |_ BDFProxy v0.3.2 online 2018-07-17 02:23:27 [ARPpoisoner] Restoring connection <-> with 2 packets per host [Msfrpc] Error connecting to Metasploit: HTTPConnectionPool(host='', port=55552): Max retries exceeded with url: /api/ (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fd9b7772290>: Failed to establish a new connection: [Errno 111] Connection refused',)) 

I did some googling and I found this thread.


I followed his 2 command instructions instructions and started the whole process over again with no luck. I even tried changing the LPORT to 55552 but that failed as well. I am not an expert with Metasploit so I wouldn’t even begin to know what to look for. How can I further troubleshoot this?

При установке MITMF возникла проблемка

root@Orion:~/MITMf# pip install -r requirements.txt DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7. Collecting git+https://github.com/kti/python-netfilterqueue (from -r requirements.txt (line 1)) Cloning https://github.com/kti/python-netfilterqueue to /tmp/pip-req-build-X6RvkB Requirement already satisfied: pyinotify in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 2)) (0.9.6) Requirement already satisfied: pycrypto in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 3)) (2.6.1) Requirement already satisfied: pyasn1 in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 4)) (0.4.2) Requirement already satisfied: cryptography in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 5)) (2.3) Requirement already satisfied: Pillow in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 6)) (5.3.0) Requirement already satisfied: netaddr in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 7)) (0.7.19) Requirement already satisfied: scapy in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 8)) (2.4.0) Requirement already satisfied: dnslib in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 9)) (0.9.7) Requirement already satisfied: Twisted in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 10)) (18.9.0) Requirement already satisfied: lxml in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 11)) (4.2.5) Requirement already satisfied: pefile in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 12)) (2018.8.8) Requirement already satisfied: ipy in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 13)) (0.83) Collecting user_agents (from -r requirements.txt (line 14)) Using cached https://files.pythonhosted.org/packages/1f/70/d16ec8a5c854d4a2c5f8edf5013e733cd18ad945067dea8e21319352ffb0/user_agents-1.1.0-py2-none-any.whl Requirement already satisfied: pyopenssl in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 15)) (18.0.0) Requirement already satisfied: service_identity in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 16)) (16.0.0) Requirement already satisfied: configobj in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 17)) (5.0.6) Requirement already satisfied: Flask in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 18)) (1.0.2) Requirement already satisfied: dnspython in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 19)) (1.16.0) Requirement already satisfied: beautifulsoup4 in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 20)) (4.6.3) Collecting capstone (from -r requirements.txt (line 21)) Using cached https://files.pythonhosted.org/packages/11/5d/ae2689ae2da1ccc6d007296f876be2ba88ae4773b365cf1a648752dbe554/capstone-4.0.1-py2.py3-none-manylinux1_i686.whl Requirement already satisfied: python-magic in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 22)) (0.4.16) Collecting msgpack-python (from -r requirements.txt (line 23)) Using cached https://files.pythonhosted.org/packages/8a/20/6eca772d1a5830336f84aca1d8198e5a3f4715cd1c7fc36d3cc7f7185091/msgpack-python-0.5.6.tar.gz Requirement already satisfied: requests in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 24)) (2.11.1) Collecting pypcap (from -r requirements.txt (line 25)) Using cached https://files.pythonhosted.org/packages/33/21/d1f24d8a93e4e11bf604d77e04080c05ecb0308a5606936a051bd2b2b5da/pypcap-1.2.2.tar.gz Complete output from command python setup.py egg_info: pcap.h not found


Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-install-TYUp09/pypcap/

MITMF takes too long to start

When i write the following command, it starts normally without any error but seems to stop at SMB server online. Alhought i tried keeping it for minutes and realized that it started working after around 10 minutes of waiting.

Usage: root@kali:~# mitmf –arp –spoof -i wlan0 –gateway –target

[*] MITMf v0.9.8 – ‘The Dark Side’

|_ Spoof v0.6

| |_ ARP spoofing enabled

| |_ Sergio-Proxy v0.2.1 online

|_ SSLstrip v0.9 by Moxie Marlinspike online

| |_ Net-Creds v1.0 online

|_ MITMf-API online

|_ HTTP server online

  • Running on (Press CTRL+C to quit)

|_ DNSChef v0.4 online

|_ SMB server online

But even when it actually starts, it apparently doesn’t work correctly since i only got these 2 lines after connecting to instagram and searching youtube.com:

2019-01-17 06:18:01 [type:Other-Other os:Other] cdn.content.prod.cms.msn.com 2019-01-17 06:24:15 [type:Other-Other os:Other] tile-service.weather.microsoft.com

DNS spoofing using MITMF

is there a way to redirect ALL request to a single website? i’m using MITMF to do the DNS spoofing and here is what I have [[[A]]] # Queries for IPv4 address records *.(website request)=(ip to redirect)

But, I only know how to redirect from a specific website. Could anyone help me? thanks everybody