Closed pokevas closed 5 years ago
It seems to be working correctly, it's just that there's no http server serving anything on port 80 for example.com
, so you get an ERR_CONNECTION_REFUSED
... once you use dns.spoof
, you also need to serve something from your IP.
Moreover, since you'll need to serve files yourself given you're hijacking DNS records, what's the point of using http.proxy
to inject beef?
You might just want to try a simpler combination of arp.spoof
and http.proxy
as dns.spoof
doesn't seem to be required in this case ...
Perhaps you misunderstood me. I dont need to replace the site content, I need to add JS code to the content on the fly. Why won't dns.spoof be needed if I want to do this: Client connect to my DNS server (i set Fake DNS in Network Adapters settings), bettercap dns fake server return ip address oneself, when user try to reach site content by ip address of bettercap server, bettercap inject js code to content and return user modified content. For this i need spoof dns + bettercap proxy with js injection. or I'm wrong?
yes you are wrong, on several levels:
Thanks. Indeed, I was wrong on some basic concepts. Removed dns spoofing and set up extra moments and it all worked.
Caplet code:
beef-inject.js code:
Note: I try intercept only http sites, without https.
I setup DNS on Windows 10 machine in Network Adapter. When try to open http://example.com (oh, do you know, that this site exist and working?) i saw this error:
In bettercap terminal i saw:
But website not load. Where problem? I want user Fake DNS Server (built in bettercap) to forward to proxy module (same machine and ip address) and inject .js code. When i try to connect bettercap proxy server without DNS server - all okay. But when from DNS request - not load :(
Where problem in config or maybe in server?
Thanks.