Basically I need a simple application that will scan for open resolver servers.
I am conducting a research study that utilizes open resolver DNS servers that can respond to any DNS queries.
There are hundreds of thousands of servers out there, and this application should generate random IP addresses and send a small DNS query (any query is fine, something as simple as A record would work fine), and then analyze the response to see:
1. Did it respond?
2. Is the data correct?
If it responds, and the data returned is what is expected of the query then it will be saved in a new line in a log file.
This application should run under linux systems such as Debian, CentOS, and the like.
A general outline of the program is as follows:
(pseudocode)
while (1)
{
stringIP = GenerateIP(randomSeed);
dnsPacket = GenerateDNSPacket(stringIP);
send(sSocket, dnsPacket, packetSize, 0);
dataReceived = recv(...);
if (CheckReply(dataReceived) == TRUE)
{
LogToFile(stringIP);
}
randomSeed = GenerateNewSeed();
}
If anyone knows how to do this, please contact me.
Upon being hired, I will give you a few open resolver DNS servers, along with a few DNS servers that are NOT open resolvers.
Then you can analyze the response to an "A" record query to each of the servers and figure out what to look for.
I am looking for a quick completion on this, it should be fairly simple for those who know what needs to be done.
Thanks.