Nmap Development mailing list archives

Re: DNS based service discovery script


From: Duarte Silva <duartejcsilva () gmail com>
Date: Sun, 4 Oct 2009 22:09:03 +0100

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.

Best regards,
Duarte


On Sun, Oct 4, 2009 at 3:31 AM, Ravipriya Thushara <rthushara () gmail com> wrote:
Hi,
I didn't use -sU when I run the script. That was the reason for always
portrule was false.
But I have more problems with script as I continue. I wanted to get a
reply from DNS-SD by sending  "_services._dns-sd._udp.local" . But it
always give TIMEOUT. I try following codes
and also tried to query DNS-SD continuously (using a code similar to
sendPackets method in DNS library)
___________________________________________________________________________
local request = "_services._dns-sd._udp.local"
local status, result = comm.exchange(host, 5353, request, {proto="udp"})

-- status=false     result=TIMEOUT      (result was same even if set timeout=10000)
___________________________________________________________________________

local socket = nmap.new_socket()
local result
local status
socket:set_timeout(10000);
socket:connect(host.ip, 5353)
socket:send("_services._dns-sd._udp.local")
status, result = socket:receive_lines(1)
socket:close()
return result

-- result=TIMEOUT
___________________________________________________________________________
I don't know if I can do this using only script or have to edit
'nmap-service-probes' file and have to write a probe there.
I still couldn't figure out what is the problem with my code. So
please help me...

That is too bad that your project wasn't approved. You might tell your
instructors that there are other jobs to do, but they are mostly little
things at least until you become more familiar with the code.

It's good that you are going to continue with the script because I think
it will be an important one.
I choose to write a 'Fuzzer for Open Office' for my project and it was approved.
Anyway I'll be with Nmap too. I think my Fuzzer experience will be useful to
Nmap security review(If I can do it at future)

Ravipriya Thushara

_______________________________________________
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: