![geek tools ip lookup geek tools ip lookup](https://hackerswindow.com/wp-content/uploads/2018/03/yt-1814-RED-HAWK-V2-Kali-Linux-Best-Information-Gathering-ToolVulnerability-Scanner.jpg)
Otherwise, make a new DNS request and send the response back to the requesting host.Swap source/dest UDP ports and IP addresses.If the request is for our special domain name, send a spoofed DNS response.Filtering for UDP port 53 destined to the server's IP address.Sniff with Scapy to listen for incoming DNS requests.This is going to jump up in complexity quite a bit from our previous example but the process is still pretty simple: This is similar to how the DNS server part of the PlexConnect utility works to hijack some communications from the AppleTV. How about hand building a DNS service that can handle DNS forwarding, but with the added functionality of handing out a custom IP address for a certain domain name. Ok, so sending a DNS query was fun, but let's build on that. Just think about what this means we could read in a list of hostnames to resolve and send the IP addresses off to some function to do some more tests such as ping or TCP scans. Without too much work we were able to write a short script to query some DNS name to IP address resolutions. The DNS layer summary is printed showing the IP address of the hostname requested Received 5 packets, got 1 answers, remaining 0 packets Since DNS runs over IP and UDP, we will need to use those in our packet: #! /usr/bin/env python3įrom scapy.all import DNS, DNSQR, IP, sr1, UDP Using the sr1() function, we can craft a DNS request and capture the returned DNS response. Next on our list of protocols to work with are UDP and DNS. We've been able to work with Ethernet, ARP, IP, ICMP, and TCP pretty easily so far thanks to Scapy's built in protocol support.