mirror of
https://github.com/nmap/nmap.git
synced 2025-12-08 13:41:29 +00:00
of scripts chosen from when using -sC (but it's still just another category and so can be chosen with --script like any other). On top of updating the docs with information about this new category, I've also updated sections to emphasize that the "default" category, -sC and -A are considered intrusive and should not be run against target networks without permission. The new list is very similar to the previous "safe,intrusive" list: Added: finger, ircServerInfo, RealVNC_auth_bypass Removed: HTTPpasswd Here are the 21 scripts in this new category: anonFTP dns-test-open-recursion finger ftpbounce HTTPAuth HTTP_open_proxy ircServerInfo MSSQLm MySQLinfo nbstat RealVNC_auth_bypass robots rpcinfo showHTMLTitle showOwner SMTPcommands SNMPsysdesr SSHv1-support SSLv2-support UPnP-info zoneTrans
37 lines
1.2 KiB
Lua
37 lines
1.2 KiB
Lua
id = "Nameserver open recursive querys (CVE-1999-0024) (BID 136, 678)"
|
|
|
|
description = "Checks whether a Nameserver on udp/53 allows querys for third-party names. If is expected that recursion will be enabled on your own internal nameserver."
|
|
|
|
author = "Felix Groebert <felix@groebert.org>"
|
|
|
|
license = "Same as Nmap--See http://nmap.org/book/man-legal.html"
|
|
|
|
categories = {"default", "intrusive"}
|
|
|
|
require "bit"
|
|
require "shortport"
|
|
|
|
portrule = shortport.portnumber(53, "udp")
|
|
|
|
action = function(host, port)
|
|
|
|
-- generate dns query, Transaction-ID 0xdead, www.wikipedia.org (type A, class IN)
|
|
local request = string.char(0xde, 0xad, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03) .. "www" .. string.char(0x09) .. "wikipedia" .. string.char(0x03) .. "org" .. string.char(0x00, 0x00, 0x01, 0x00, 0x01)
|
|
|
|
local socket = nmap.new_socket()
|
|
socket:connect(host.ip, port.number, "udp")
|
|
socket:send(request)
|
|
|
|
local status, result = socket:receive();
|
|
socket:close()
|
|
|
|
-- parse response for dns flags
|
|
if (bit.band(string.byte(result,3), 0x80) == 0x80
|
|
and bit.band(string.byte(result,4), 0x85) == 0x80)
|
|
then
|
|
return "Recursion seems enabled"
|
|
end
|
|
|
|
return
|
|
end
|