x-falcon / Virtual-Hosts

hosts for android,implement by vpn mode,supports wildcard DNS records
GNU General Public License v3.0
1.23k stars 218 forks source link

Infinite Loop When Trying To Perform A Redirect Dns Poisoning! #49

Closed hari01584 closed 2 years ago

hari01584 commented 4 years ago

So let me get my point clear, I'm trying to poison a game by dns poisoning, so what I'm trying to do is that consider I have three websites, A, X And Y in format like (A.com, etc), now let us assume the site X is of game site, what I'm trying to do is to setup a vpn using virtual hosts and inject the IP of site A (which is attacker's site), so that the game will contact site A as a whole, but then the site A will check what game is requesting, if it is a request to get no of golds and currency of user then the site will smartly inject its own response and send it to client, but if that might not be the case, then the site will simply send a redirect request following to the original site (Site X Or Y)

Y is canonical name of site X, both refer to same place, but they are canonical names, ie let x and y be X - server.xyzgames.com Y - gdh22hs32.cloudfront.com

Now here comes the issue, when going to site Y through a redirect done by Site A, the game request backs the site Y again, this in turn once again inject the Y's ip address with Site A's Ip, and hence an infinite Loop is formed, which results in no receiving of data and on server site infinite requests!

Is there any way to fix this problem? Also I have fully imported and using your codes right now, they are amazing!

x-falcon commented 4 years ago

can intercept the redirect response packet, then change the host name with domain dynamic.

hari01584 commented 4 years ago

I don't really get it, can ya please elaborate? With some examples? Or some sample codes and settings I need to tweak in order to get it?

Well, I understand that what you r saying is that to create a script which will identify which is real packet going and which one is redirected packet, but sorry to say, I m little newbie here, I am not able to understand how to code that in your classes files! Please give me codes required, or atleast some explanation and/or technique about how you do it :) On Wed 18 Dec, 2019, 8:52 AM xfalcon, notifications@github.com wrote:

can intercept the redirect response packet, then change the host name with domain dynamic.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/x-falcon/Virtual-Hosts/issues/49?email_source=notifications&email_token=AHSMPZR6FC5744D4DRTMOHTQZGJP3A5CNFSM4J36S7YKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHEXCYQ#issuecomment-566849890, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHSMPZR3MO6SJKALHWQ72YDQZGJP3ANCNFSM4J36S7YA .

hari01584 commented 4 years ago

Hello? Any reply? I'm waiting!

x-falcon commented 4 years ago

This can be a very complicated job

hari01584 commented 4 years ago

I understand so! But even so anything would be preferable!

On Mon 30 Dec, 2019, 4:12 PM xfalcon, notifications@github.com wrote:

This can be a very complicated job

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/x-falcon/Virtual-Hosts/issues/49?email_source=notifications&email_token=AHSMPZXL7XCF467D4NB5XZDQ3HF7RA5CNFSM4J36S7YKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEH2AVUQ#issuecomment-569641682, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHSMPZS4MJCPLVZGYKSTDVDQ3HF7RANCNFSM4J36S7YA .

hari01584 commented 2 years ago

Made tweaks to prevent loopback, and using Hexene (Virtual Hosts using VPN Interceptor Library) we can even directly modify the source and destination address according to situation (Needs to recalculate IP and TCP checksums tho). therefore I am closing this issue.