I need a programmer who can write code for a DNS spoofing/redirect mechanism. The final goal is to develop a physical device that can be added to someones (home) network that intercepts and changes DNS request from other nodes on this network (phones/ipads/etc).
Example: Router (also DNS relayer) uses: 192.168.1.1 DNSspoofer uses: 192.168.1.45 iPhone uses: 192.168.1.10 iPhone requests: google.com on the DNS server of the home router (192.168.1.1) DNSSpoofer 192.168.1.45 sees this request on the subnet and quickly responds as if it was the response of the router, returning not: 8.8.8.8 (real address) but 192.168.1.45 (address of the DNSspoofer) The iPhone should then route it's HTTP request for google.com to 192.168.1.45.
My first questions are: 1). how can it be done (theoretically) 2). is it foolproof? it other words; will it always work? or will the router sometimes 'win'. My assumption is that the DNSspoofer is always quicker than a remote DNS relayer because it's local, but not sure if that's true
Alternatively: DHCP spoofer. Instead of intercepting DNS requests an alternative would be to intercept the DHCP requests within the LAN. For example: the homerouter would assign this to an iPhone: Host: 192.168.1.10 (iPhone) Subnetmask: 255.255.255.0 Gateway: 192.168.1.1 (router) DNS: 192.168.1.1 (router)
But the DHCPSpoofer should intercept this DHCP request from the iPhone and produce this: Host: 192.168.1.10 (iPhone) Subnetmask: 255.255.255.0 Gateway: 192.168.1.1 (router) DNS: 192.168.1.45 (DNSSpoofer)