Nmap Development mailing list archives

Re: DNS based service discovery script


From: Duarte Silva <duartejcsilva () gmail com>
Date: Mon, 5 Oct 2009 22:13:33 +0100

Hi,

There is also BounjourFoxy (plug-in for Firefox). I captured some of
the data sent by the plug-in and got the following

475     920.180925      192.x.x.x       224.0.0.251     MDNS    Standard query PTR
_http._tcp.local, "QM" question

This seems to be the usual request for finding services on a network,
I guess you could try that out if you have a MAC and see the responses
you get using Wireshark. By the way, iTunes is a total waste since it
doesn't seem to provide any service to a network and only makes
queries to find out if there is an Apple TV hardware around in the
network.

Best regards,
Duarte

On Mon, Oct 5, 2009 at 9:05 PM, David Fifield <david () bamsoftware com> wrote:
On Sun, Oct 04, 2009 at 10:09:03PM +0100, Duarte Silva wrote:
Hi Raqvipriya,

That doesn't seem to me as a valid DNS request. I think you should try
to use the nmap NSE DNS library.

require "dns"

action = function(host, port)
    dns.query("_services._dns-sd._tcp.local", {host = host.ip, port =
port.number, dtype = 1})
end

Don't know if it will work but its worth the shot.

Yes, it will have to be something like that. The dns library will take
care of encoding the query and decoding the reply. I recommend that you
use Wireshark (http://www.wireshark.org/) to capture the traffic from a
program that makes these requests, then adjust your script until it
makes the same queries. On Mac OS X you can use the dns-sd tool. There
is probably a similar tool that comes with Avahi (http://avahi.org/).

David Fifield

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


Current thread: